mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/ir: Check for vocp usage during IR normalization.
The hull shader barrier used for this was broken by I/O normalization, since vocp is no longer exposed to the spirv backend. Restore this barrier by checking for vocp during normalization instead.
This commit is contained in:
parent
8b42f523f2
commit
b73d2c978d
Notes:
Alexandre Julliard
2023-11-06 23:17:08 +01:00
Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/421
@ -550,6 +550,8 @@ struct io_normaliser
|
||||
uint8_t input_range_map[MAX_REG_OUTPUT][VKD3D_VEC4_SIZE];
|
||||
uint8_t output_range_map[MAX_REG_OUTPUT][VKD3D_VEC4_SIZE];
|
||||
uint8_t pc_range_map[MAX_REG_OUTPUT][VKD3D_VEC4_SIZE];
|
||||
|
||||
bool use_vocp;
|
||||
};
|
||||
|
||||
static bool io_normaliser_is_in_fork_or_join_phase(const struct io_normaliser *normaliser)
|
||||
@ -1031,6 +1033,10 @@ static void shader_instruction_normalise_io_params(struct vkd3d_shader_instructi
|
||||
if (normaliser->shader_type == VKD3D_SHADER_TYPE_HULL)
|
||||
{
|
||||
reg = &ins->declaration.dst.reg;
|
||||
|
||||
if (reg->type == VKD3DSPR_OUTCONTROLPOINT)
|
||||
normaliser->use_vocp = true;
|
||||
|
||||
/* We don't need to keep OUTCONTROLPOINT or PATCHCONST input declarations since their
|
||||
* equivalents were declared earlier, but INCONTROLPOINT may be the first occurrence. */
|
||||
if (reg->type == VKD3DSPR_OUTCONTROLPOINT || reg->type == VKD3DSPR_PATCHCONST)
|
||||
@ -1138,6 +1144,7 @@ static enum vkd3d_result shader_normalise_io_registers(struct vkd3d_shader_parse
|
||||
shader_instruction_normalise_io_params(&normaliser.instructions.elements[i], &normaliser);
|
||||
|
||||
parser->instructions = normaliser.instructions;
|
||||
parser->shader_desc.use_vocp = normaliser.use_vocp;
|
||||
return VKD3D_OK;
|
||||
}
|
||||
|
||||
|
@ -6146,9 +6146,6 @@ static void spirv_compiler_emit_dcl_input(struct spirv_compiler *compiler,
|
||||
spirv_compiler_emit_input(compiler, dst);
|
||||
else
|
||||
spirv_compiler_emit_input_register(compiler, dst);
|
||||
|
||||
if (dst->reg.type == VKD3DSPR_OUTCONTROLPOINT)
|
||||
compiler->use_vocp = true;
|
||||
}
|
||||
|
||||
static void spirv_compiler_emit_dcl_input_sysval(struct spirv_compiler *compiler,
|
||||
@ -9722,6 +9719,7 @@ static int spirv_compiler_generate_spirv(struct spirv_compiler *compiler,
|
||||
memset(&shader_desc->input_signature, 0, sizeof(shader_desc->input_signature));
|
||||
memset(&shader_desc->output_signature, 0, sizeof(shader_desc->output_signature));
|
||||
memset(&shader_desc->patch_constant_signature, 0, sizeof(shader_desc->patch_constant_signature));
|
||||
compiler->use_vocp = parser->shader_desc.use_vocp;
|
||||
|
||||
if (compiler->shader_type != VKD3D_SHADER_TYPE_HULL)
|
||||
spirv_compiler_emit_shader_signature_outputs(compiler);
|
||||
|
@ -958,6 +958,8 @@ struct vkd3d_shader_desc
|
||||
{
|
||||
uint32_t used, external;
|
||||
} flat_constant_count[3];
|
||||
|
||||
bool use_vocp;
|
||||
};
|
||||
|
||||
struct vkd3d_shader_register_semantic
|
||||
|
Loading…
Reference in New Issue
Block a user