Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
---
include/vkd3d_shader.h | 18 +++++------
libs/vkd3d-shader/dxbc.c | 60 +++++++++++++++++------------------
libs/vkd3d-shader/vkd3d_shader_main.c | 4 +--
3 files changed, 41 insertions(+), 41 deletions(-)
diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h
index b5bf13a..1ce701c 100644
--- a/include/vkd3d_shader.h
+++ b/include/vkd3d_shader.h
@@ -456,20 +456,20 @@ struct vkd3d_root_descriptor
unsigned int register_space;
};
-enum vkd3d_root_parameter_type
+enum vkd3d_shader_root_parameter_type
{
- VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0,
- VKD3D_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = 1,
- VKD3D_ROOT_PARAMETER_TYPE_CBV = 2,
- VKD3D_ROOT_PARAMETER_TYPE_SRV = 3,
- VKD3D_ROOT_PARAMETER_TYPE_UAV = 4,
+ VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE = 0x0,
+ VKD3D_SHADER_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS = 0x1,
+ VKD3D_SHADER_ROOT_PARAMETER_TYPE_CBV = 0x2,
+ VKD3D_SHADER_ROOT_PARAMETER_TYPE_SRV = 0x3,
+ VKD3D_SHADER_ROOT_PARAMETER_TYPE_UAV = 0x4,
- VKD3D_FORCE_32_BIT_ENUM(VKD3D_ROOT_PARAMETER_TYPE),
+ VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_ROOT_PARAMETER_TYPE),
};
struct vkd3d_root_parameter
{
- enum vkd3d_root_parameter_type parameter_type;
+ enum vkd3d_shader_root_parameter_type parameter_type;
union
{
struct vkd3d_root_descriptor_table descriptor_table;
@@ -549,7 +549,7 @@ struct vkd3d_root_descriptor1
struct vkd3d_root_parameter1
{
- enum vkd3d_root_parameter_type parameter_type;
+ enum vkd3d_shader_root_parameter_type parameter_type;
union
{
struct vkd3d_root_descriptor_table1 descriptor_table;
diff --git a/libs/vkd3d-shader/dxbc.c b/libs/vkd3d-shader/dxbc.c
index cad2556..6297a04 100644
--- a/libs/vkd3d-shader/dxbc.c
+++ b/libs/vkd3d-shader/dxbc.c
@@ -2456,15 +2456,15 @@ static int shader_parse_root_parameters(struct root_signature_parser_context *co
switch (parameters[i].parameter_type)
{
- case VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
ret = shader_parse_descriptor_table(context, offset, ¶meters[i].u.descriptor_table);
break;
- case VKD3D_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
ret = shader_parse_root_constants(context, offset, ¶meters[i].u.constants);
break;
- case VKD3D_ROOT_PARAMETER_TYPE_CBV:
- case VKD3D_ROOT_PARAMETER_TYPE_SRV:
- case VKD3D_ROOT_PARAMETER_TYPE_UAV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_CBV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_SRV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_UAV:
ret = shader_parse_root_descriptor(context, offset, ¶meters[i].u.descriptor);
break;
default:
@@ -2504,15 +2504,15 @@ static int shader_parse_root_parameters1(struct root_signature_parser_context *c
switch (parameters[i].parameter_type)
{
- case VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
ret = shader_parse_descriptor_table1(context, offset, ¶meters[i].u.descriptor_table);
break;
- case VKD3D_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
ret = shader_parse_root_constants(context, offset, ¶meters[i].u.constants);
break;
- case VKD3D_ROOT_PARAMETER_TYPE_CBV:
- case VKD3D_ROOT_PARAMETER_TYPE_SRV:
- case VKD3D_ROOT_PARAMETER_TYPE_UAV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_CBV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_SRV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_UAV:
ret = shader_parse_root_descriptor1(context, offset, ¶meters[i].u.descriptor);
break;
default:
@@ -2678,7 +2678,7 @@ static unsigned int versioned_root_signature_get_parameter_count(const struct vk
return desc->u.v_1_1.parameter_count;
}
-static enum vkd3d_root_parameter_type versioned_root_signature_get_parameter_type(
+static enum vkd3d_shader_root_parameter_type versioned_root_signature_get_parameter_type(
const struct vkd3d_versioned_root_signature_desc *desc, unsigned int i)
{
if (desc->version == VKD3D_ROOT_SIGNATURE_VERSION_1_0)
@@ -2938,18 +2938,18 @@ static int shader_write_root_parameters(struct root_signature_writer_context *co
switch (versioned_root_signature_get_parameter_type(desc, i))
{
- case VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
if (desc->version == VKD3D_ROOT_SIGNATURE_VERSION_1_0)
ret = shader_write_descriptor_table(context, &desc->u.v_1_0.parameters[i].u.descriptor_table);
else
ret = shader_write_descriptor_table1(context, &desc->u.v_1_1.parameters[i].u.descriptor_table);
break;
- case VKD3D_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
ret = shader_write_root_constants(context, versioned_root_signature_get_root_constants(desc, i));
break;
- case VKD3D_ROOT_PARAMETER_TYPE_CBV:
- case VKD3D_ROOT_PARAMETER_TYPE_SRV:
- case VKD3D_ROOT_PARAMETER_TYPE_UAV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_CBV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_SRV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_UAV:
if (desc->version == VKD3D_ROOT_SIGNATURE_VERSION_1_0)
ret = shader_write_root_descriptor(context, &desc->u.v_1_0.parameters[i].u.descriptor);
else
@@ -3115,10 +3115,10 @@ static int validate_root_signature_desc(const struct vkd3d_versioned_root_signat
for (i = 0; i < versioned_root_signature_get_parameter_count(desc); ++i)
{
- enum vkd3d_root_parameter_type type;
+ enum vkd3d_shader_root_parameter_type type;
type = versioned_root_signature_get_parameter_type(desc, i);
- if (type == VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
+ if (type == VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
{
if (desc->version == VKD3D_ROOT_SIGNATURE_VERSION_1_0)
ret = validate_descriptor_table_v_1_0(&desc->u.v_1_0.parameters[i].u.descriptor_table);
@@ -3192,7 +3192,7 @@ static void free_descriptor_ranges(const struct vkd3d_root_parameter *parameters
{
const struct vkd3d_root_parameter *p = ¶meters[i];
- if (p->parameter_type == VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
+ if (p->parameter_type == VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
vkd3d_free((void *)p->u.descriptor_table.descriptor_ranges);
}
}
@@ -3213,7 +3213,7 @@ static int convert_root_parameters_to_v_1_0(struct vkd3d_root_parameter *dst,
p->parameter_type = p1->parameter_type;
switch (p->parameter_type)
{
- case VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
ranges = NULL;
if ((p->u.descriptor_table.descriptor_range_count = p1->u.descriptor_table.descriptor_range_count))
{
@@ -3234,12 +3234,12 @@ static int convert_root_parameters_to_v_1_0(struct vkd3d_root_parameter *dst,
ranges[j].descriptor_table_offset = ranges1[j].descriptor_table_offset;
}
break;
- case VKD3D_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
p->u.constants = p1->u.constants;
break;
- case VKD3D_ROOT_PARAMETER_TYPE_CBV:
- case VKD3D_ROOT_PARAMETER_TYPE_SRV:
- case VKD3D_ROOT_PARAMETER_TYPE_UAV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_CBV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_SRV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_UAV:
p->u.descriptor.shader_register = p1->u.descriptor.shader_register;
p->u.descriptor.register_space = p1->u.descriptor.register_space;
break;
@@ -3311,7 +3311,7 @@ static void free_descriptor_ranges1(const struct vkd3d_root_parameter1 *paramete
{
const struct vkd3d_root_parameter1 *p = ¶meters[i];
- if (p->parameter_type == VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
+ if (p->parameter_type == VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
vkd3d_free((void *)p->u.descriptor_table.descriptor_ranges);
}
}
@@ -3332,7 +3332,7 @@ static int convert_root_parameters_to_v_1_1(struct vkd3d_root_parameter1 *dst,
p1->parameter_type = p->parameter_type;
switch (p1->parameter_type)
{
- case VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE:
ranges1 = NULL;
if ((p1->u.descriptor_table.descriptor_range_count = p->u.descriptor_table.descriptor_range_count))
{
@@ -3354,12 +3354,12 @@ static int convert_root_parameters_to_v_1_1(struct vkd3d_root_parameter1 *dst,
ranges1[j].descriptor_table_offset = ranges[j].descriptor_table_offset;
}
break;
- case VKD3D_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS:
p1->u.constants = p->u.constants;
break;
- case VKD3D_ROOT_PARAMETER_TYPE_CBV:
- case VKD3D_ROOT_PARAMETER_TYPE_SRV:
- case VKD3D_ROOT_PARAMETER_TYPE_UAV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_CBV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_SRV:
+ case VKD3D_SHADER_ROOT_PARAMETER_TYPE_UAV:
p1->u.descriptor.shader_register = p->u.descriptor.shader_register;
p1->u.descriptor.register_space = p->u.descriptor.register_space;
p1->u.descriptor.flags = VKD3D_ROOT_SIGNATURE_1_0_ROOT_DESCRIPTOR_FLAGS;
diff --git a/libs/vkd3d-shader/vkd3d_shader_main.c b/libs/vkd3d-shader/vkd3d_shader_main.c
index b9caac7..f7489f6 100644
--- a/libs/vkd3d-shader/vkd3d_shader_main.c
+++ b/libs/vkd3d-shader/vkd3d_shader_main.c
@@ -486,7 +486,7 @@ static void vkd3d_shader_free_root_signature_v_1_0(struct vkd3d_root_signature_d
{
const struct vkd3d_root_parameter *parameter = &root_signature->parameters[i];
- if (parameter->parameter_type == VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
+ if (parameter->parameter_type == VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
vkd3d_free((void *)parameter->u.descriptor_table.descriptor_ranges);
}
vkd3d_free((void *)root_signature->parameters);
@@ -503,7 +503,7 @@ static void vkd3d_shader_free_root_signature_v_1_1(struct vkd3d_root_signature_d
{
const struct vkd3d_root_parameter1 *parameter = &root_signature->parameters[i];
- if (parameter->parameter_type == VKD3D_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
+ if (parameter->parameter_type == VKD3D_SHADER_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE)
vkd3d_free((void *)parameter->u.descriptor_table.descriptor_ranges);
}
vkd3d_free((void *)root_signature->parameters);
--
2.11.0