mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/ir: Run validation after materializing PHI SSAs to TEMPs.
This commit is contained in:
parent
fade5dd54c
commit
4a28433ef5
Notes:
Henri Verbeet
2024-09-05 16:38:53 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1043
@ -3060,7 +3060,8 @@ static void ssas_to_temps_block_info_cleanup(struct ssas_to_temps_block_info *bl
|
||||
vkd3d_free(block_info);
|
||||
}
|
||||
|
||||
static enum vkd3d_result vsir_program_materialise_phi_ssas_to_temps(struct vsir_program *program)
|
||||
static enum vkd3d_result vsir_program_materialise_phi_ssas_to_temps(struct vsir_program *program,
|
||||
struct vsir_normalisation_context *ctx)
|
||||
{
|
||||
size_t ins_capacity = 0, ins_count = 0, phi_count, incoming_count, i;
|
||||
struct ssas_to_temps_block_info *info, *block_info = NULL;
|
||||
@ -6658,13 +6659,12 @@ enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t
|
||||
|
||||
vsir_transform(&ctx, vsir_program_lower_instructions);
|
||||
|
||||
if (ctx.result < 0)
|
||||
return ctx.result;
|
||||
|
||||
if (program->shader_version.major >= 6)
|
||||
{
|
||||
if ((result = vsir_program_materialise_phi_ssas_to_temps(program)) < 0)
|
||||
return result;
|
||||
vsir_transform(&ctx, vsir_program_materialise_phi_ssas_to_temps);
|
||||
|
||||
if (ctx.result < 0)
|
||||
return ctx.result;
|
||||
|
||||
if ((result = lower_switch_to_if_ladder(program)) < 0)
|
||||
return result;
|
||||
@ -6680,6 +6680,9 @@ enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ctx.result < 0)
|
||||
return ctx.result;
|
||||
|
||||
if (program->shader_version.type != VKD3D_SHADER_TYPE_PIXEL)
|
||||
{
|
||||
if ((result = vsir_program_remap_output_signature(program, compile_info, message_context)) < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user