D3D11UniformCache class
Caches the host-side value of a single uniform (aliased as RHI::UniformCache).
Mirrors the OpenGL backend's uniform cache: it holds a pointer into a shared host data buffer and the Set* methods that write values into it, plus a dirty flag. For a loose uniform, CommitValue() publishes the value pointer to the owning shader program. For a uniform living inside a block, committing is a no-op — the whole block is published by D3D11ShaderUniformBlocks.
Constructors, destructors, conversion operators
- D3D11UniformCache()
- D3D11UniformCache(const D3D11Uniform* uniform) explicit
Public functions
- auto GetUniform() const -> const D3D11Uniform*
-
auto GetDataPointer() const -> std::
uint8_t* -
void SetDataPointer(std::
uint8_t* dataPointer) - auto GetFloatVector() const -> const float*
-
auto GetFloatValue(std::
uint32_t index) const -> float -
auto GetIntVector() const -> const std::
int32_t* -
auto GetIntValue(std::
uint32_t index) const -> std:: int32_t - auto SetFloatVector(const float* vec) -> bool
- auto SetFloatValue(float v0) -> bool
- auto SetFloatValue(float v0, float v1) -> bool
- auto SetFloatValue(float v0, float v1, float v2) -> bool
- auto SetFloatValue(float v0, float v1, float v2, float v3) -> bool
-
auto SetIntVector(const std::
int32_t* vec) -> bool -
auto SetIntValue(std::
int32_t v0) -> bool -
auto SetIntValue(std::
int32_t v0, std:: int32_t v1) -> bool -
auto SetIntValue(std::
int32_t v0, std:: int32_t v1, std:: int32_t v2) -> bool -
auto SetIntValue(std::
int32_t v0, std:: int32_t v1, std:: int32_t v2, std:: int32_t v3) -> bool - auto IsDirty() const -> bool
- void SetDirty(bool isDirty)
- auto CommitValue() -> bool
- Publishes a dirty loose-uniform value to the owning program; a no-op for block members.