libs/vkd3d-shader: Introduce vkd3d_shader_interface structure.

This commit is contained in:
Józef Kucia
2017-08-16 13:11:52 +02:00
parent e6f6d01489
commit e3d6bac31b
6 changed files with 57 additions and 58 deletions

View File

@@ -57,14 +57,19 @@ enum vkd3d_descriptor_type
VKD3D_DESCRIPTOR_TYPE_SAMPLER, /* s# */
};
struct vkd3d_shader_descriptor_binding
{
uint32_t set;
uint32_t binding;
};
struct vkd3d_shader_resource_binding
{
enum vkd3d_descriptor_type type;
unsigned int register_index;
bool is_buffer;
uint32_t descriptor_set;
uint32_t binding;
struct vkd3d_shader_descriptor_binding binding;
};
struct vkd3d_shader_push_constant
@@ -76,10 +81,18 @@ struct vkd3d_shader_push_constant
unsigned int size; /* in bytes */
};
struct vkd3d_shader_interface
{
const struct vkd3d_shader_resource_binding *bindings;
unsigned int binding_count;
const struct vkd3d_shader_push_constant *push_constants;
unsigned int push_constant_count;
};
HRESULT vkd3d_shader_compile_dxbc(const struct vkd3d_shader_code *dxbc,
struct vkd3d_shader_code *spirv, uint32_t compiler_options,
const struct vkd3d_shader_resource_binding *bindings, unsigned int binding_count,
const struct vkd3d_shader_push_constant *push_constants, unsigned int push_constant_count);
const struct vkd3d_shader_interface *shader_interface);
void vkd3d_shader_free_shader_code(struct vkd3d_shader_code *code);
HRESULT vkd3d_shader_parse_root_signature(const struct vkd3d_shader_code *dxbc,