nicegraf
|
Data Fields | ||
uint32_t | target_set | |
uint32_t | target_binding | |
ngf_descriptor_type | type | |
union { | ||
ngf_buffer_bind_info buffer | ||
ngf_texel_buffer_view texel_buffer_view | ||
ngf_image_sampler_bind_info image_sampler | ||
} | info | |
Specifies a resource binding operation.
The resource binding model in nicegraf is similar to that of Vulkan. Shaders group their resources into "sets", and individual slot within thosse sets are referred to as "bindings". The main difference in nicegraf is that one does not have to explicitly allocate descriptor pools like in Vulkan. Instead, the application code simply says which set and binding to assign a particular resource to. Internally, some optimization may be performed to avoid redundant binds. For backends that don't have a similar resource binding model (e.g. Metal), a special comment musst be added to the shader code that maps the backend's "native" binding model onto this one. See ngf_shader_stage_info::content for more details on that.
union { ... } ngf_resource_bind_op::info |
The details about the resource being bound, depending on type.
uint32_t ngf_resource_bind_op::target_binding |
Target binding ID.
uint32_t ngf_resource_bind_op::target_set |
Target set ID.
ngf_descriptor_type ngf_resource_bind_op::type |
The type of the resource being bound.