CF_ShaderWgslBinding¶
Category: graphics
GitHub: cute_shader_bytecode.h
One group/binding pair declared by a shader's WGSL source, with everything a bind group layout entry needs.
| Struct Members | Description |
|---|---|
const char* name |
The sampler, image or block this binding serves, as declared in the shader. |
CF_ShaderWgslBindingKind kind |
What the binding holds. |
int set |
The CF descriptor set, equal to the WGSL group. |
int slot |
The resource's binding within its CF set, as declared in the shader. |
int binding |
The WGSL binding. |
CF_TextureType dimension |
Sampled, split-load and storage textures: the texture's shape. |
CF_ShaderWgslSampleType sample_type |
Sampled and split-load textures: the sample type. |
bool multisampled |
Sampled textures: true for texture_multisampled_2d and texture_depth_multisampled_2d. |
CF_PixelFormat storage_format |
Storage and split-load textures: the image's texel format, or CF_PIXEL_FORMAT_INVALID for a format CF_PixelFormat lacks (r32ui). |
CF_ShaderWgslAccess storage_access |
Storage textures and storage buffers: the access mode. |
bool comparison |
Samplers: true for sampler_comparison. |
Remarks¶
Members that do not apply to the binding's kind are zero.
Related Pages¶
CF_ShaderWgslBindingKind
CF_ShaderWgslSampleType
CF_ShaderWgslAccess
CF_ShaderWgslSplit
CF_ShaderInfo