mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-10-14 02:58:14 +08:00
vkd3d-shader: Remove the no longer used flat_constant_count field from struct vsir_program.
This commit is contained in:

committed by
Henri Verbeet

parent
2be9c880ff
commit
937b80f3f2
Notes:
Henri Verbeet
2025-10-13 19:31:51 +02:00
Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1769
@@ -1566,12 +1566,12 @@ int d3dbc_parse(const struct vkd3d_shader_compile_info *compile_info, uint64_t c
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(program->flat_constant_count); ++i)
|
||||
for (i = 0; i < 3; ++i)
|
||||
{
|
||||
struct vkd3d_shader_register_range range = {.space = 0, .first = i, .last = i};
|
||||
unsigned int size = get_external_constant_count(&sm1, i);
|
||||
|
||||
if ((program->flat_constant_count[i] = size))
|
||||
if (size)
|
||||
{
|
||||
if (!(d = vsir_program_add_descriptor(program, VKD3D_SHADER_DESCRIPTOR_TYPE_CBV,
|
||||
i, &range, VKD3D_SHADER_RESOURCE_BUFFER, VSIR_DATA_U32)))
|
||||
|
@@ -10185,10 +10185,7 @@ static void sm1_generate_vsir(struct hlsl_ctx *ctx, const struct vkd3d_shader_co
|
||||
struct hlsl_ir_function_decl *func, struct list *semantic_vars,
|
||||
struct hlsl_block *body, uint64_t config_flags, struct vsir_program *program)
|
||||
{
|
||||
struct hlsl_ir_var *var;
|
||||
struct hlsl_block block;
|
||||
struct hlsl_reg *reg;
|
||||
unsigned int *count;
|
||||
|
||||
program->ssa_count = 0;
|
||||
program->temp_count = 0;
|
||||
@@ -10203,17 +10200,6 @@ static void sm1_generate_vsir(struct hlsl_ctx *ctx, const struct vkd3d_shader_co
|
||||
|
||||
sm1_generate_vsir_block(ctx, body, program);
|
||||
|
||||
count = &program->flat_constant_count[VKD3D_SHADER_D3DBC_FLOAT_CONSTANT_REGISTER];
|
||||
LIST_FOR_EACH_ENTRY(var, &ctx->extern_vars, struct hlsl_ir_var, extern_entry)
|
||||
{
|
||||
if (!var->is_uniform)
|
||||
continue;
|
||||
|
||||
if (!(reg = &var->regs[HLSL_REGSET_NUMERIC])->allocation_size)
|
||||
continue;
|
||||
|
||||
*count = max(*count, reg->id + reg->allocation_size);
|
||||
}
|
||||
program->ssa_count = ctx->ssa_count;
|
||||
program->temp_count = ctx->temp_count;
|
||||
|
||||
|
@@ -1597,7 +1597,6 @@ struct vsir_program
|
||||
|
||||
unsigned int input_control_point_count, output_control_point_count;
|
||||
struct vsir_thread_group_size thread_group_size;
|
||||
unsigned int flat_constant_count[3];
|
||||
unsigned int block_count; /* maximum block count in any function */
|
||||
unsigned int temp_count;
|
||||
unsigned int ssa_count;
|
||||
|
Reference in New Issue
Block a user