ReactOS 0.4.17-dev-934-g091855f
vkd3d_shader_descriptor_offset_info Struct Reference

#include <vkd3d_shader.h>

Collaboration diagram for vkd3d_shader_descriptor_offset_info:

Public Attributes

enum vkd3d_shader_structure_type type
 
const void * next
 
unsigned int descriptor_table_offset
 
unsigned int descriptor_table_count
 
const struct vkd3d_shader_descriptor_offset * binding_offsets
 
const struct vkd3d_shader_descriptor_offset * uav_counter_offsets
 

Detailed Description

A chained structure containing descriptor offsets.

This structure is optional.

This structure extends vkd3d_shader_interface_info.

This structure contains only input parameters.

Since
1.3

Definition at line 1126 of file vkd3d_shader.h.

Member Data Documentation

◆ binding_offsets

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:

register_space = 0
register_index = 0
binding.set = 3
binding.binding = 2
binding.count = 4
register_space = 0
register_index = 6
binding.set = 3
binding.binding = 2
binding.count = 2
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
static RPC_BINDING_HANDLE binding
Definition: server.c:166
@ VKD3D_SHADER_DESCRIPTOR_TYPE_CBV
Definition: vkd3d_shader.h:435

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.

Definition at line 1183 of file vkd3d_shader.h.

Referenced by d3d12_pipeline_state_init_compute(), and d3d12_pipeline_state_init_graphics().

◆ descriptor_table_count

unsigned int vkd3d_shader_descriptor_offset_info::descriptor_table_count

Size, in elements, of the descriptor table push constant array.

Definition at line 1140 of file vkd3d_shader.h.

Referenced by d3d12_pipeline_state_init_compute(), and d3d12_pipeline_state_init_graphics().

◆ descriptor_table_offset

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.

Definition at line 1138 of file vkd3d_shader.h.

Referenced by d3d12_pipeline_state_init_compute(), and d3d12_pipeline_state_init_graphics().

◆ next

const void* vkd3d_shader_descriptor_offset_info::next

Optional pointer to a structure containing further parameters.

Definition at line 1131 of file vkd3d_shader.h.

Referenced by d3d12_pipeline_state_init_compute(), and d3d12_pipeline_state_init_graphics().

◆ type

enum vkd3d_shader_structure_type vkd3d_shader_descriptor_offset_info::type

Must be set to VKD3D_SHADER_STRUCTURE_TYPE_DESCRIPTOR_OFFSET_INFO.

Definition at line 1129 of file vkd3d_shader.h.

Referenced by d3d12_pipeline_state_init_compute(), and d3d12_pipeline_state_init_graphics().

◆ uav_counter_offsets

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.

Definition at line 1190 of file vkd3d_shader.h.

Referenced by d3d12_pipeline_state_init_compute(), and d3d12_pipeline_state_init_graphics().


The documentation for this struct was generated from the following file: