mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-12-15 08:03:30 -08: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.
This commit is contained in:
Notes:
Henri Verbeet
2025-10-13 19:32:21 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1775
@@ -69,7 +69,7 @@ void main(out uint4 dst : sv_target)
|
||||
uniform 0 uint4 0 0 1 0
|
||||
todo(msl) draw quad
|
||||
% Integer division by zero is undefined for shader model 6 targets.
|
||||
if(sm<6) todo(glsl & !llvmpipe) probe (0, 0) u32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff)
|
||||
if(sm<6) probe (0, 0) u32(0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff)
|
||||
uniform 0 uint4 1 1 7 1
|
||||
todo(msl) draw quad
|
||||
probe (0, 0) u32(1, 7, 0, 0)
|
||||
|
||||
Reference in New Issue
Block a user