class GpuPipelineParameterSetLayout

Contains information about a single GPU program parameter set.

Public

Methods

~GpuPipelineParameterSetLayout

virtual ~GpuPipelineParameterSetLayout() = default

GetResourceCount

u32 GetResourceCount() const

Returns the total number of elements in the set.

GetResourceCount

u32 GetResourceCount(GpuParameterType type) const

Returns the number of elements in a particular set for the specified parameter type.

GetBindingCount

u32 GetBindingCount() const

Returns the total number of binding slots in the set.

GetBindingCount

u32 GetBindingCount(GpuParameterType type) const

Returns the number of binding slots in the set for the specified parameter type.

GetSequentialResourceIndex

u32 GetSequentialResourceIndex(u32 slot, u32 arrayIndex) const

Converts a slot/array index combination into a sequential index that maps to the parameter in that parameter type's array.

The sequential index is relative to the set.

If the slot or array index is out of valid range, the method logs an error and returns ~0u. Only performs range checking in debug mode.

GetSequentialBindingIndex

u32 GetSequentialBindingIndex(u32 slot) const

Converts a slot into a sequential index that maps to the parameter in that parameter type's array.

This is similar to GetSequentialResourceIndex(), but does not account for array indices. The sequential index is relative to the set.

If the slot is out of valid range, the method logs an error and returns ~0u. Only performs range checking in debug mode.

GetSlot

u32 GetSlot(GpuParameterType type, u32 sequentialBindingIndex) const

Retrieves a slot from sequential binding index.

GetSlot

u32 GetSlot(const StringView &name) const

Finds slot index of a parameter with the specified name.

Slot index is set to ~0u if parameter cannot be found.

GetArraySize

u32 GetArraySize(GpuParameterType type, u32 sequentialBindingIndex) const

Returns the number of entries in the array at the specified sequential binding index.

GetDynamicOffsetCount

u32 GetDynamicOffsetCount() const

Returns the number of dynamic offset slots in the set.

GetDynamicOffsetIndex

u32 GetDynamicOffsetIndex(u32 slot, u32 arrayIndex = 0) const

Returns an index that can be used for applying a dynamic offset for buffer lookup.

The index can be provided to the command buffer after GpuParameterSet using this layout have been bound on the command buffer.

Returns ~0u if parameter at the specific slot doesn't support dynamic offsets (supported on uniform and storage buffers), or if the parameter is not found.

GetDynamicOffsetIndex

u32 GetDynamicOffsetIndex(const StringView &name, u32 arrayIndex = 0) const

Returns an index that can be used for applying a dynamic offset for buffer lookup.

The index can be provided to the command buffer after GpuParameterSet using this layout have been bound on the command buffer.

Returns ~0u if parameter at the specific set/slot combination doesn't support dynamic offsets (supported on uniform and storage buffers), or if the parameter is not found.

HasUniform

bool HasUniform(const StringView &name) const

Returns true if the layout has a uniform with the specified name.

HasUniformOfType

bool HasUniformOfType(const StringView &name, GpuParameterType type) const

Returns true if the layout has a uniform with the specified name and type.

TryGetUniformInformation

const UniformInformation *TryGetUniformInformation(const StringView &name) const

Returns information about a uniform parameter by the specified name, or null if not found.

TryGetUniformInformation

const UniformInformation *TryGetUniformInformation(GpuParameterType type, u32 sequentialBindingIndex) const

Returns information about a uniform parameter by the specified type and sequential index, or null if not found.

TryGetUniformInformation

const UniformInformation *TryGetUniformInformation(u32 slot) const

Returns information about a uniform parameter by the specified slot, or null if not found.

HasUniformBufferMember

bool HasUniformBufferMember(const StringView &name) const

Returns true if the layout has a uniform buffer member with the specified name in the set.

TryGetUniformBufferMemberInformation

const GpuUniformBufferMemberInformation *TryGetUniformBufferMemberInformation(const StringView &name) const

Returns information about a member of a uniform buffer by the specified name, or null if not found.

Protected

Constructors

GpuPipelineParameterSetLayout

GpuPipelineParameterSetLayout(const GpuProgramParameterDescription &parameterDescription)

Fields

mUniformMap

Map<String, UniformInformation, std::less<>> mUniformMap

A map of all uniforms.

mUniforms

TInlineArray<UniformInformation *, 32> mUniforms

Uniform for each slot index.

mUniformsPerType

Array<TInlineArray<UniformInformation *, 16>, (u32)GpuParameterType::Count> mUniformsPerType

mResourceCountPerType

Array<u32, (u32)GpuParameterType::Count> mResourceCountPerType

mUniformBufferMembers

Map<String, GpuUniformBufferMemberInformation, std::less<>> mUniformBufferMembers

All data parameters in all uniform buffers.

mResourceCount

u32 mResourceCount

mBindingCount

u32 mBindingCount

mDynamicOffsetCount

u32 mDynamicOffsetCount

Number of dynamic offset slots in this set.