nCine::RHI::PVR::PvrShaderUniformBlocks class

Manages the uniform-block caches of a program (aliased as RHI::ShaderUniformBlocks).

Owns a PvrUniformBlockCache per active block, distributes a shared host data buffer across them, and on Bind() forwards each block where it already lives to the device so the effect running the following draw can read it - there is no streaming uniform buffer to commit into on this tier (see CommitUniformBlocks()).

Public types

using UniformHashMapType = std::vector<PvrUniformBlockCache>
using UniformRangeAllocator = RHI::BufferRange(*)(std::uint32_t bytes)
Function that suballocates a range of the given size from the streaming uniform buffer.

Public static functions

static void SetUniformRangeAllocator(UniformRangeAllocator allocator)
Sets the allocator used by CommitUniformBlocks() (registered by the pipeline at startup).

Constructors, destructors, conversion operators

PvrShaderUniformBlocks()
PvrShaderUniformBlocks(PvrShaderProgram* shaderProgram) explicit
PvrShaderUniformBlocks(PvrShaderProgram* shaderProgram, const char* includeOnly, const char* exclude)

Public functions

void SetProgram(PvrShaderProgram* shaderProgram)
void SetProgram(PvrShaderProgram* shaderProgram, const char* includeOnly, const char* exclude)
void SetUniformsDataPointer(std::uint8_t* dataPointer)
auto GetUniformBlockCount() const -> std::uint32_t
auto HasUniformBlock(const char* name) const -> bool
auto GetUniformBlock(const char* name) -> PvrUniformBlockCache*
auto GetAllUniformBlocks() const -> const UniformHashMapType&
Returns the container of all managed block caches (range-iterates as PvrUniformBlockCache&).
void CommitUniformBlocks()
void Bind()