mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-09-13 09:16:14 -07:00
vkd3d-shader/ir: Run validation after flattening control flow constructs.
This commit is contained in:
parent
4b06729be8
commit
5c0d640d18
Notes:
Henri Verbeet
2024-09-11 15:34:39 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1058
@ -6668,9 +6668,6 @@ enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t
|
|||||||
vsir_transform(&ctx, vsir_program_structurize);
|
vsir_transform(&ctx, vsir_program_structurize);
|
||||||
vsir_transform(&ctx, vsir_program_flatten_control_flow_constructs);
|
vsir_transform(&ctx, vsir_program_flatten_control_flow_constructs);
|
||||||
vsir_transform(&ctx, vsir_program_materialize_undominated_ssas_to_temps);
|
vsir_transform(&ctx, vsir_program_materialize_undominated_ssas_to_temps);
|
||||||
|
|
||||||
if (ctx.result < 0)
|
|
||||||
return ctx.result;
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -6688,14 +6685,13 @@ enum vkd3d_result vsir_program_normalise(struct vsir_program *program, uint64_t
|
|||||||
vsir_transform(&ctx, vsir_program_remove_dead_code);
|
vsir_transform(&ctx, vsir_program_remove_dead_code);
|
||||||
vsir_transform(&ctx, vsir_program_normalise_combined_samplers);
|
vsir_transform(&ctx, vsir_program_normalise_combined_samplers);
|
||||||
|
|
||||||
|
if (compile_info->target_type != VKD3D_SHADER_TARGET_GLSL)
|
||||||
|
vsir_transform(&ctx, vsir_program_flatten_control_flow_constructs);
|
||||||
|
}
|
||||||
|
|
||||||
if (ctx.result < 0)
|
if (ctx.result < 0)
|
||||||
return ctx.result;
|
return ctx.result;
|
||||||
|
|
||||||
if (compile_info->target_type != VKD3D_SHADER_TARGET_GLSL
|
|
||||||
&& (result = vsir_program_flatten_control_flow_constructs(program, &ctx)) < 0)
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((result = vsir_program_insert_alpha_test(program, message_context)) < 0)
|
if ((result = vsir_program_insert_alpha_test(program, message_context)) < 0)
|
||||||
return result;
|
return result;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user