Henri Verbeet pushed to branch master at wine / vkd3d
Commits: 90cbe25d by Henri Verbeet at 2025-10-13T19:00:05+02:00 vkd3d-shader/spirv: Do not handle division by zero for VSIR_OP_IDIV or VSIR_OP_IREM.
These correspond to the DXIL SDiv and SRem instructions, for which division by zero is undefined. Division by zero is also undefined for DXIL UDiv and URem; addressing those is slightly more involved.
- - - - - 7aa6f4f8 by Henri Verbeet at 2025-10-13T19:00:05+02:00 tests: Replace the test_shader_instructions() "ps_udiv" test with a shader runner test.
- - - - - 433adab6 by Henri Verbeet at 2025-10-13T19:00:05+02:00 vkd3d-shader/glsl: Handle integer operands in shader_glsl_movc().
We don't use these yet, but we're about to.
- - - - - 9de22992 by Henri Verbeet at 2025-10-13T19:00:05+02:00 vkd3d-shader/ir: Handle integer division by zero in vsir_program_lower_udiv().
This achieves two things: - The GLSL backend no longer needs to handle this by itself. Likwise, the MSL backend won't have to either. - We no longer handle division by zero for DXIL UDiv and URem instructions, which leave this undefined.
- - - - -
5 changed files:
- libs/vkd3d-shader/glsl.c - libs/vkd3d-shader/ir.c - libs/vkd3d-shader/spirv.c - tests/d3d12.c - tests/hlsl/arithmetic-uint.shader_test
View it on GitLab: https://gitlab.winehq.org/wine/vkd3d/-/compare/dd55b15865be45aed432e9ff5f016...