pub struct ConstantBufferBinding {
pub resource: ResourceId,
pub bound_size: Option<u32>,
}Expand description
What the source states of how it binds a constant buffer of the program, beyond what its constants are.
A program declares a constant buffer at the size it indexes it, and a source can bind more: D3D12 bounds a constant
buffer read by the size of the view the draw binds (the CBV’s SizeInBytes), not by the shader’s declaration, so a
skinning palette a program declares as two matrices is bound as the hundreds the draw uploads, and a joint index past
the declaration reads the palette, not zero. A lifter takes the rows of a buffer’s uniform array from the bound size
when it has one (iridia::BoundSizes).
Fields§
§resource: ResourceIdA constant buffer resource of the shader.
bound_size: Option<u32>The bytes the source binds the buffer with, more than the program declares and a whole number of 16-byte rows;
None is the declared size. Where the engine binds different sizes for different draws, the largest it binds:
a consumer that fills fewer rows leaves the rest zero.