vulkan/nir: call nir_opt_constant_folding() during vk_spirv_to_nir()

This prevents bugged CTS tests from tripping over with the following commits.

dEQP-VK.spirv_assembly.instruction.compute.float_controls.fp32.generated_args.denorm_sstep_denorm_flush_to_zero
dEQP-VK.spirv_assembly.instruction.graphics.float_controls.fp32.generated_args.denorm_sstep_denorm_flush_to_zero_*

These tests exhibit undefined values where the result depends on the ordering
of nir_opt_algebraic and nir_opt_constant_folding.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37195>
This commit is contained in:
Daniel Schürmann
2025-10-30 17:05:50 +01:00
committed by Marge Bot
parent 870616af34
commit 280eb2d689
+1
View File
@@ -164,6 +164,7 @@ vk_spirv_to_nir(struct vk_device *device,
NIR_PASS(_, nir, nir_lower_returns);
NIR_PASS(_, nir, nir_inline_functions);
NIR_PASS(_, nir, nir_copy_prop);
NIR_PASS(_, nir, nir_opt_constant_folding);
NIR_PASS(_, nir, nir_opt_deref);
/* Pick off the single entrypoint that we want */