class render::GpuParameterSet

Render thread version of GpuParameterSet.

Public

Methods

~GpuParameterSet

virtual ~GpuParameterSet() noexcept = default

GetOwnerPool

GpuParameterSetPool *GetOwnerPool() const

Returns the descriptor pool this parameter set was allocated from.

SetUniformBuffer

bool SetUniformBuffer(u32 slot, const GpuBufferSuballocation &suballocation, u32 arrayIndex = 0)

Sets uniform buffer using a pool suballocation at the specified slot.

slot
Binding slot within set.
suballocation
Pool suballocation handle.
arrayIndex
Array index if binding is an array.

Returns: True if successful, false if binding not found.

SetUniformBuffer

bool SetUniformBuffer(const StringView &name, const GpuBufferSuballocation &suballocation, u32 arrayIndex = 0)

Sets uniform buffer using a pool suballocation (by name).

name
Parameter name.
suballocation
Pool suballocation handle.
arrayIndex
Array index if binding is an array.

Returns: True if successful, false if binding not found.

TrySetUniformBuffer

bool TrySetUniformBuffer(const StringView &name, const GpuBufferSuballocation &suballocation, u32 arrayIndex = 0)

Tries to set uniform buffer using a pool suballocation (no warnings).

name
Parameter name.
suballocation
Pool suballocation handle
arrayIndex
Array index if binding is an array

Returns: True if successful, false if binding not found

~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.

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.

Protected

Constructors

GpuParameterSet

GpuParameterSet(const SPtr<GpuPipelineParameterSetLayout> &parameterLayout, u32 setIndex)

Methods

GetSelf

SPtr<GpuParameterSet> GetSelf() const override

SyncFromCoreObject

void SyncFromCoreObject(const CoreSyncData &data, FrameAllocator &allocator) override

Update internal data from provided memory buffer that was populated with data from the owning CoreObject.

Fields

mOwnerPool

GpuParameterSetPool * mOwnerPool

mUniformBufferData

UniformBufferData * mUniformBufferData

mSampledTextureData

TextureData * mSampledTextureData

mStorageTextureData

TextureData * mStorageTextureData

mStorageBufferData

StorageBufferData * mStorageBufferData

mSamplerStates

SPtr<SamplerState> * mSamplerStates