Module: vkd3d Branch: master Commit: 98c6e85b339196d6fb4f14319b7fd84a7f771079 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/98c6e85b339196d6fb4f14319b7fd8...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Jan 17 21:35:22 2024 +0100
vkd3d-shader/ir: Store control point counts in struct vsir_program.
---
libs/vkd3d-shader/spirv.c | 4 ++-- libs/vkd3d-shader/tpf.c | 8 ++++---- libs/vkd3d-shader/vkd3d_shader_private.h | 3 +-- 3 files changed, 7 insertions(+), 8 deletions(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 9286e87d..4441db16 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -9806,8 +9806,8 @@ static int spirv_compiler_generate_spirv(struct spirv_compiler *compiler, compiler->block_names = parser->shader_desc.block_names; compiler->block_name_count = parser->shader_desc.block_name_count;
- compiler->input_control_point_count = shader_desc->input_control_point_count; - compiler->output_control_point_count = shader_desc->output_control_point_count; + compiler->input_control_point_count = program->input_control_point_count; + compiler->output_control_point_count = program->output_control_point_count;
if (compiler->shader_type != VKD3D_SHADER_TYPE_HULL) spirv_compiler_emit_shader_signature_outputs(compiler); diff --git a/libs/vkd3d-shader/tpf.c b/libs/vkd3d-shader/tpf.c index df10cd25..50146c2c 100644 --- a/libs/vkd3d-shader/tpf.c +++ b/libs/vkd3d-shader/tpf.c @@ -1051,7 +1051,7 @@ static void shader_sm4_read_dcl_input_primitive(struct vkd3d_shader_instruction { ins->declaration.primitive_type.type = VKD3D_PT_PATCH; ins->declaration.primitive_type.patch_vertex_count = primitive_type - VKD3D_SM5_INPUT_PT_PATCH1 + 1; - priv->p.shader_desc.input_control_point_count = ins->declaration.primitive_type.patch_vertex_count; + priv->p.program.input_control_point_count = ins->declaration.primitive_type.patch_vertex_count; } else if (primitive_type >= ARRAY_SIZE(input_primitive_type_table)) { @@ -1060,7 +1060,7 @@ static void shader_sm4_read_dcl_input_primitive(struct vkd3d_shader_instruction else { ins->declaration.primitive_type.type = input_primitive_type_table[primitive_type].vkd3d_type; - priv->p.shader_desc.input_control_point_count = input_primitive_type_table[primitive_type].control_point_count; + priv->p.program.input_control_point_count = input_primitive_type_table[primitive_type].control_point_count; }
if (ins->declaration.primitive_type.type == VKD3D_PT_UNDEFINED) @@ -1174,9 +1174,9 @@ static void shader_sm5_read_control_point_count(struct vkd3d_shader_instruction >> VKD3D_SM5_CONTROL_POINT_COUNT_SHIFT;
if (opcode == VKD3D_SM5_OP_DCL_INPUT_CONTROL_POINT_COUNT) - priv->p.shader_desc.input_control_point_count = ins->declaration.count; + priv->p.program.input_control_point_count = ins->declaration.count; else - priv->p.shader_desc.output_control_point_count = ins->declaration.count; + priv->p.program.output_control_point_count = ins->declaration.count; }
static void shader_sm5_read_dcl_tessellator_domain(struct vkd3d_shader_instruction *ins, uint32_t opcode, diff --git a/libs/vkd3d-shader/vkd3d_shader_private.h b/libs/vkd3d-shader/vkd3d_shader_private.h index 887c47fc..332b39af 100644 --- a/libs/vkd3d-shader/vkd3d_shader_private.h +++ b/libs/vkd3d-shader/vkd3d_shader_private.h @@ -1020,8 +1020,6 @@ struct vkd3d_shader_desc struct shader_signature output_signature; struct shader_signature patch_constant_signature;
- unsigned int input_control_point_count, output_control_point_count; - unsigned int block_count;
struct @@ -1271,6 +1269,7 @@ struct vsir_program struct vkd3d_shader_version shader_version; struct vkd3d_shader_instruction_array instructions;
+ unsigned int input_control_point_count, output_control_point_count; unsigned int temp_count; unsigned int ssa_count; bool use_vocp;