vkd3d
1.3
The vkd3d 3D Graphics Library
|
A chained structure containing descriptor offsets. More...
#include <vkd3d_shader.h>
Data Fields | |
enum vkd3d_shader_structure_type | type |
Must be set to VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO. | |
const void * | next |
Optional pointer to a structure containing further parameters. | |
unsigned int | descriptor_table_offset |
Byte offset within the push constants of an array of 32-bit descriptor array offsets. More... | |
unsigned int | descriptor_table_count |
Size, in elements, of the descriptor table push constant array. | |
const struct vkd3d_shader_descriptor_offset * | binding_offsets |
Pointer to an array of struct vkd3d_shader_descriptor_offset objects. More... | |
const struct vkd3d_shader_descriptor_offset * | uav_counter_offsets |
Pointer to an array of offsets into the descriptor arrays referenced by the 'uav_counters' array in struct vkd3d_shader_interface_info. More... | |
A chained structure containing descriptor offsets.
This structure is optional.
This structure extends vkd3d_shader_interface_info.
This structure contains only input parameters.
const struct vkd3d_shader_descriptor_offset* vkd3d_shader_descriptor_offset_info::binding_offsets |
Pointer to an array of struct vkd3d_shader_descriptor_offset objects.
The 'static_offset' field contains an offset into the descriptor arrays referenced by the 'bindings' array in struct vkd3d_shader_interface_info. This allows mapping multiple shader resource arrays to a single binding point in the target environment.
'dynamic_offset_index' in struct vkd3d_shader_descriptor_offset allows offsets to be set at runtime. The 32-bit descriptor table push constant at this index will be added to 'static_offset' to calculate the final binding offset.
If runtime offsets are not required, set all 'dynamic_offset_index' values to ~0u
and 'descriptor_table_count' to zero.
For example, to map Direct3D constant buffer registers 'cb0[0:3]' and 'cb1[6:7]' to descriptors 8-12 and 4-5 in the Vulkan descriptor array in descriptor set 3 and with binding 2, set the following values in the 'bindings' array in struct vkd3d_shader_interface_info:
and then pass {8
, 4}
as static binding offsets here.
This field may be NULL, in which case the corresponding offsets are specified to be 0.
unsigned int vkd3d_shader_descriptor_offset_info::descriptor_table_offset |
Byte offset within the push constants of an array of 32-bit descriptor array offsets.
See the description of 'binding_offsets' below.
const struct vkd3d_shader_descriptor_offset* vkd3d_shader_descriptor_offset_info::uav_counter_offsets |
Pointer to an array of offsets into the descriptor arrays referenced by the 'uav_counters' array in struct vkd3d_shader_interface_info.
This works the same way as binding_offsets above.