class TGpuParameterSet

template<bool IsRenderProxy>

Templated version of GpuParameterSet that contains functionality for both main and render thread versions of stored data.

Public

Methods

~TGpuParameterSet<IsRenderProxy>

virtual ~TGpuParameterSet<IsRenderProxy>()

GetStructParameter

void GetStructParameter(const StringView &name, TGpuParameterStruct<IsRenderProxy> &output) const

GetSampledTextureParameter

void GetSampledTextureParameter(const StringView &name, TGpuParameterSampledTexture<IsRenderProxy> &output) const

GetStorageTextureParameter

void GetStorageTextureParameter(const StringView &name, TGpuParameterStorageTexture<IsRenderProxy> &output) const

GetStorageBufferParameter

void GetStorageBufferParameter(const StringView &name, TGpuParameterStorageBuffer<IsRenderProxy> &output) const

GetUniformBufferParameter

void GetUniformBufferParameter(const StringView &name, TGpuParameterUniformBuffer<IsRenderProxy> &output) const

GetSamplerStateParameter

void GetSamplerStateParameter(const StringView &name, TGpuParameterSampler<IsRenderProxy> &output) const

TryGetStructParameter

bool TryGetStructParameter(const StringView &name, TGpuParameterStruct<IsRenderProxy> &output) const

TryGetSampledTextureParameter

bool TryGetSampledTextureParameter(const StringView &name, TGpuParameterSampledTexture<IsRenderProxy> &output) const

TryGetStorageTextureParameter

bool TryGetStorageTextureParameter(const StringView &name, TGpuParameterStorageTexture<IsRenderProxy> &output) const

TryGetStorageBufferParameter

bool TryGetStorageBufferParameter(const StringView &name, TGpuParameterStorageBuffer<IsRenderProxy> &output) const

TryGetUniformBufferParameter

bool TryGetUniformBufferParameter(const StringView &name, TGpuParameterUniformBuffer<IsRenderProxy> &output) const

TryGetSamplerStateParameter

bool TryGetSamplerStateParameter(const StringView &name, TGpuParameterSampler<IsRenderProxy> &output) const

GetUniformBuffer

UniformBufferType GetUniformBuffer(u32 slot, u32 arrayIndex = 0) const

Gets a uniform buffer from the specified slot/array index combination.

GetSampledTexture

TextureType GetSampledTexture(u32 slot, u32 arrayIndex = 0) const

Gets a texture bound to the specified slot/array index combination.

GetStorageTexture

TextureType GetStorageTexture(u32 slot, u32 arrayIndex = 0) const

Gets a storage texture bound to the specified slot/array index combination.

GetStorageBuffer

BufferType GetStorageBuffer(u32 slot, u32 arrayIndex = 0) const

Gets a buffer bound to the specified slot/array index combination.

GetSamplerState

SPtr<SamplerState> GetSamplerState(u32 slot, u32 arrayIndex = 0) const

Gets a sampler state bound to the specified slot/array index combination.

GetTextureSurface

const TextureSurface &GetTextureSurface(u32 slot, u32 arrayIndex = 0) const

Gets information that determines which texture surfaces to bind as a sampled texture parameter.

GetStorageTextureSurface

const TextureSurface &GetStorageTextureSurface(u32 slot, u32 arrayIndex = 0) const

Gets information that determines which texture surfaces to bind as a storage texture parameter.

SetUniformBuffer

virtual bool SetUniformBuffer(u32 slot, const UniformBufferType &buffer, u32 arrayIndex = 0, u32 offset = 0)

Sets an uniform buffer at the specified slot.

It is up to the caller to guarantee the provided buffer matches uniform descriptor for this slot.

slot
Slot at which to bind the buffer, as defined by the pipeline GPU program.
buffer
Buffer to bind.
arrayIndex
In case the bind point represents an array, index to bind the buffer to.
offset
Dynamic offset in the buffer, at which the to start reading the buffer.

Returns: Returns true if the operation succeeded, otherwise logs and errors and returns false.

SetUniformBuffer

bool SetUniformBuffer(const StringView &name, const UniformBufferType &buffer, u32 arrayIndex = 0, u32 offset = 0)

Sets an uniform buffer with the specified name in all GPU programs containing a buffer with that name.

It is up to the caller to guarantee the provided buffer matches uniform buffer descriptor for this slot.

name
Name of the buffer to bind.
buffer
Buffer to bind.
arrayIndex
In case the bind point represents an array, index to bind the buffer to.
offset
Dynamic offset in the buffer, at which the to start reading the buffer.

Returns: Returns true if the operation succeeded, otherwise logs and errors and returns false.

TrySetUniformBuffer

bool TrySetUniformBuffer(const StringView &name, const UniformBufferType &uniformBuffer, u32 arrayIndex = 0, u32 offset = 0)

Equivalent to SetUniformBuffer(const String & , const UniformBufferType & , u32, u32), but doesn't warn if the parameter cannot be found.

Return true if the parameter was found.

SetSampledTexture

virtual bool SetSampledTexture(u32 slot, const TextureType &texture, const TextureSurface &surface = TextureSurface::kComplete, u32 arrayIndex = 0)

Sets a texture at the specified slot.

Returns true if the operation succeeded, otherwise logs and errors and returns false.

SetStorageTexture

virtual bool SetStorageTexture(u32 slot, const TextureType &texture, const TextureSurface &surface, u32 arrayIndex = 0)

Sets a storage texture at the specified slot.

Returns true if the operation succeeded, otherwise logs and errors and returns false.

SetStorageBuffer

virtual bool SetStorageBuffer(u32 slot, const BufferType &buffer, u32 arrayIndex = 0, GpuBufferViewInformation view = GpuBufferViewInformation())

Sets a storage buffer at the specified slot combination.

slot
Slot at which to bind the buffer, as defined by the pipeline GPU program.
buffer
Buffer to bind.
arrayIndex
In case the bind point represents an array, index to bind the buffer to.
view
Optional view information that controls how is the buffer viewed when bound to the pipeline.

Returns: Returns true if the operation succeeded, otherwise logs and errors and returns false.

SetSamplerState

virtual bool SetSamplerState(u32 slot, const SPtr<SamplerState> &sampler, u32 arrayIndex = 0)

Sets a sampler state at the specified slot.

Returns true if the operation succeeded, otherwise logs and errors and returns false.

SetSampledTexture

void SetSampledTexture(const StringView &name, const TextureType &texture, const TextureSurface &surface = TextureSurface::kComplete)

Assigns a texture to the parameter with the specified name.

SetStorageTexture

void SetStorageTexture(const StringView &name, const TextureType &texture, const TextureSurface &surface)

Assigns a load/store texture to the parameter with the specified name.

SetStorageBuffer

void SetStorageBuffer(const StringView &name, const BufferType &buffer, u32 arrayIndex = 0, GpuBufferViewInformation view = GpuBufferViewInformation())

Sets a storage buffer with the specified name.

name
Name of the buffer to bind.
buffer
Buffer to bind.
arrayIndex
In case the bind point represents an array, index to bind the buffer to.
view
Optional view information that controls how is the buffer viewed when bound to the pipeline.

SetSamplerState

void SetSamplerState(const StringView &name, const SPtr<SamplerState> &sampler)

Assigns a sampler state to the parameter with the specified name.

Protected

Constructors

TGpuParameterSet<IsRenderProxy>

TGpuParameterSet<IsRenderProxy>(const SPtr<GpuPipelineParameterSetLayout> &parameterSetLayout, u32 setIndex)

Methods

GetSelf

virtual SPtr<GpuParametersType> GetSelf() const = 0

Fields

mUniformBufferData

UniformBufferData * mUniformBufferData

mSampledTextureData

TextureData * mSampledTextureData

mStorageTextureData

TextureData * mStorageTextureData

mStorageBufferData

StorageBufferData * mStorageBufferData

mSamplerStates

SPtr<SamplerState> * mSamplerStates