pub struct RdefBinding {
pub word: usize,
pub name: String,
pub kind: u32,
pub returns: u32,
pub dimension: u32,
pub samples: u32,
pub register: u32,
pub count: u32,
pub flags: u32,
pub space: u32,
pub id: Option<u32>,
}Expand description
One resource binding record as stored.
Fields§
§word: usizeWhere the record starts, in words of the part.
name: StringThe resource’s name.
kind: u32D3D_SHADER_INPUT_TYPE.
returns: u32D3D_RESOURCE_RETURN_TYPE.
dimension: u32D3D_SRV_DIMENSION.
samples: u32A multisampled texture’s sample count; a structured buffer’s stride.
register: u32The first register the resource is bound to.
count: u32How many consecutive registers it is bound to.
flags: u32D3D_SHADER_INPUT_FLAGS.
space: u32The register space; 0 in the layouts before Shader Model 5.1, which have no spaces.
id: Option<u32>The resource’s id, where the layout stores one (Shader Model 5.1): the number the program’s declarations and instructions name the resource by in place of its register.
Implementations§
Source§impl RdefBinding
impl RdefBinding
Sourcepub fn type_name(&self) -> &'static str
pub fn type_name(&self) -> &'static str
D3D_SHADER_INPUT_TYPE as Microsoft’s disassembler names it in the Type column (cbuffer, texture,
sampler_c for a comparison sampler, UAV).
Sourcepub fn format_name(&self) -> String
pub fn format_name(&self) -> String
What the binding returns, as Microsoft’s disassembler names it in the Format column (float4, struct,
byte; NA for a buffer or sampler, which return none).
Sourcepub fn dimension_name(&self) -> String
pub fn dimension_name(&self) -> String
The resource’s shape, as Microsoft’s disassembler names it in the Dim column (2d, 2dMS4, r/w, NA).
Sourcepub fn register_prefix(&self) -> &'static str
pub fn register_prefix(&self) -> &'static str
The register file the binding is in: cb, s, u or t.