Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- include/vkd3d_shader.h | 44 ++++++++++++++++++++++---------------------- libs/vkd3d-shader/spirv.c | 32 ++++++++++++++++---------------- 2 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/include/vkd3d_shader.h b/include/vkd3d_shader.h index 61785be..054b512 100644 --- a/include/vkd3d_shader.h +++ b/include/vkd3d_shader.h @@ -650,27 +650,27 @@ enum vkd3d_shader_component_type VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_COMPONENT_TYPE), };
-enum vkd3d_sysval_semantic -{ - VKD3D_SV_NONE = 0, - VKD3D_SV_POSITION = 1, - VKD3D_SV_CLIP_DISTANCE = 2, - VKD3D_SV_CULL_DISTANCE = 3, - VKD3D_SV_RENDER_TARGET_ARRAY_INDEX = 4, - VKD3D_SV_VIEWPORT_ARRAY_INDEX = 5, - VKD3D_SV_VERTEX_ID = 6, - VKD3D_SV_PRIMITIVE_ID = 7, - VKD3D_SV_INSTANCE_ID = 8, - VKD3D_SV_IS_FRONT_FACE = 9, - VKD3D_SV_SAMPLE_INDEX = 10, - VKD3D_SV_TESS_FACTOR_QUADEDGE = 11, - VKD3D_SV_TESS_FACTOR_QUADINT = 12, - VKD3D_SV_TESS_FACTOR_TRIEDGE = 13, - VKD3D_SV_TESS_FACTOR_TRIINT = 14, - VKD3D_SV_TESS_FACTOR_LINEDET = 15, - VKD3D_SV_TESS_FACTOR_LINEDEN = 16, - - VKD3D_FORCE_32_BIT_ENUM(VKD3D_SYSVAL_SEMANTIC), +enum vkd3d_shader_sysval_semantic +{ + VKD3D_SHADER_SV_NONE = 0x00, + VKD3D_SHADER_SV_POSITION = 0x01, + VKD3D_SHADER_SV_CLIP_DISTANCE = 0x02, + VKD3D_SHADER_SV_CULL_DISTANCE = 0x03, + VKD3D_SHADER_SV_RENDER_TARGET_ARRAY_INDEX = 0x04, + VKD3D_SHADER_SV_VIEWPORT_ARRAY_INDEX = 0x05, + VKD3D_SHADER_SV_VERTEX_ID = 0x06, + VKD3D_SHADER_SV_PRIMITIVE_ID = 0x07, + VKD3D_SHADER_SV_INSTANCE_ID = 0x08, + VKD3D_SHADER_SV_IS_FRONT_FACE = 0x09, + VKD3D_SHADER_SV_SAMPLE_INDEX = 0x0a, + VKD3D_SHADER_SV_TESS_FACTOR_QUADEDGE = 0x0b, + VKD3D_SHADER_SV_TESS_FACTOR_QUADINT = 0x0c, + VKD3D_SHADER_SV_TESS_FACTOR_TRIEDGE = 0x0d, + VKD3D_SHADER_SV_TESS_FACTOR_TRIINT = 0x0e, + VKD3D_SHADER_SV_TESS_FACTOR_LINEDET = 0x0f, + VKD3D_SHADER_SV_TESS_FACTOR_LINEDEN = 0x10, + + VKD3D_FORCE_32_BIT_ENUM(VKD3D_SHADER_SYSVAL_SEMANTIC), };
enum vkd3d_shader_minimum_precision @@ -687,7 +687,7 @@ struct vkd3d_shader_signature_element const char *semantic_name; unsigned int semantic_index; unsigned int stream_index; - enum vkd3d_sysval_semantic sysval_semantic; + enum vkd3d_shader_sysval_semantic sysval_semantic; enum vkd3d_shader_component_type component_type; unsigned int register_index; unsigned int mask; diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 257b443..667d851 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -132,30 +132,30 @@ static const void *vkd3d_find_struct_(const struct vkd3d_struct *chain, return NULL; }
-static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval_indexed(enum vkd3d_sysval_semantic sysval, +static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval_indexed(enum vkd3d_shader_sysval_semantic sysval, unsigned int index) { switch (sysval) { - case VKD3D_SV_NONE: + case VKD3D_SHADER_SV_NONE: return VKD3D_SIV_NONE; - case VKD3D_SV_POSITION: + case VKD3D_SHADER_SV_POSITION: return VKD3D_SIV_POSITION; - case VKD3D_SV_CLIP_DISTANCE: + case VKD3D_SHADER_SV_CLIP_DISTANCE: return VKD3D_SIV_CLIP_DISTANCE; - case VKD3D_SV_CULL_DISTANCE: + case VKD3D_SHADER_SV_CULL_DISTANCE: return VKD3D_SIV_CULL_DISTANCE; - case VKD3D_SV_TESS_FACTOR_QUADEDGE: + case VKD3D_SHADER_SV_TESS_FACTOR_QUADEDGE: return VKD3D_SIV_QUAD_U0_TESS_FACTOR + index; - case VKD3D_SV_TESS_FACTOR_QUADINT: + case VKD3D_SHADER_SV_TESS_FACTOR_QUADINT: return VKD3D_SIV_QUAD_U_INNER_TESS_FACTOR + index; - case VKD3D_SV_TESS_FACTOR_TRIEDGE: + case VKD3D_SHADER_SV_TESS_FACTOR_TRIEDGE: return VKD3D_SIV_TRIANGLE_U_TESS_FACTOR + index; - case VKD3D_SV_TESS_FACTOR_TRIINT: + case VKD3D_SHADER_SV_TESS_FACTOR_TRIINT: return VKD3D_SIV_TRIANGLE_INNER_TESS_FACTOR; - case VKD3D_SV_TESS_FACTOR_LINEDET: + case VKD3D_SHADER_SV_TESS_FACTOR_LINEDET: return VKD3D_SIV_LINE_DETAIL_TESS_FACTOR; - case VKD3D_SV_TESS_FACTOR_LINEDEN: + case VKD3D_SHADER_SV_TESS_FACTOR_LINEDEN: return VKD3D_SIV_LINE_DENSITY_TESS_FACTOR; default: FIXME("Unhandled sysval %#x, index %u.\n", sysval, index); @@ -163,7 +163,7 @@ static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval_indexed(enu } }
-static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval(enum vkd3d_sysval_semantic sysval) +static enum vkd3d_shader_input_sysval_semantic vkd3d_siv_from_sysval(enum vkd3d_shader_sysval_semantic sysval) { return vkd3d_siv_from_sysval_indexed(sysval, 0); } @@ -4325,11 +4325,11 @@ static void vkd3d_dxbc_compiler_emit_shader_signature_outputs(struct vkd3d_dxbc_
switch (e->sysval_semantic) { - case VKD3D_SV_CLIP_DISTANCE: + case VKD3D_SHADER_SV_CLIP_DISTANCE: calculate_clip_or_cull_distance_mask(e, &clip_distance_mask); break;
- case VKD3D_SV_CULL_DISTANCE: + case VKD3D_SHADER_SV_CULL_DISTANCE: calculate_clip_or_cull_distance_mask(e, &cull_distance_mask); break;
@@ -4360,13 +4360,13 @@ static void vkd3d_dxbc_compiler_emit_shader_signature_outputs(struct vkd3d_dxbc_
switch (e->sysval_semantic) { - case VKD3D_SV_CLIP_DISTANCE: + case VKD3D_SHADER_SV_CLIP_DISTANCE: compiler->output_info[i].id = clip_distance_id; compiler->output_info[i].component_type = VKD3D_SHADER_COMPONENT_FLOAT; compiler->output_info[i].array_element_mask = clip_distance_mask; break;
- case VKD3D_SV_CULL_DISTANCE: + case VKD3D_SHADER_SV_CULL_DISTANCE: compiler->output_info[i].id = cull_distance_id; compiler->output_info[i].component_type = VKD3D_SHADER_COMPONENT_FLOAT; compiler->output_info[i].array_element_mask = cull_distance_mask;