vkd3d-shader/glsl: Implement VSIR_OP_UREM.

This commit is contained in:
Henri Verbeet
2025-08-08 15:39:45 +02:00
parent 71ed37f26d
commit 9b375b3dae
Notes: Henri Verbeet 2025-09-01 15:21:55 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1705
3 changed files with 9 additions and 6 deletions

View File

@@ -1650,6 +1650,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen,
case VSIR_OP_UDIV_SIMPLE:
shader_glsl_binop(gen, ins, "/");
break;
case VSIR_OP_UREM:
shader_glsl_binop(gen, ins, "%");
break;
case VSIR_OP_XOR:
shader_glsl_binop(gen, ins, "^");
break;

View File

@@ -25,7 +25,7 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 5.0 16.0 0.0 0.0
todo(glsl | msl) draw quad
todo(msl) draw quad
probe (0, 0) rgba (5.0, 5.0, -5.0, 3.0)
[pixel shader]
@@ -55,7 +55,7 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 42.0 5.0 0.0 0.0
todo(glsl | msl) draw quad
todo(msl) draw quad
bug(mvk<1.2.11) probe (0, 0) rgba (2.0, -2.0, 2.0, -2.0)
[pixel shader]
@@ -85,7 +85,7 @@ float4 main() : SV_TARGET
[test]
uniform 0 float4 45.0 5.0 0.0 0.0
todo(glsl | msl) draw quad
todo(msl) draw quad
bug(mvk<1.2.11) probe (0, 0) rgba (0.0, 0.0, 0.0, 0.0)
[pixel shader]
@@ -117,7 +117,7 @@ float4 main() : sv_target
[test]
uniform 0 float4 45.0 5.0 50.0 10.0
uniform 4 float4 3.0 8.0 2.0 5.0
todo(glsl | msl) draw quad
todo(msl) draw quad
probe (0, 0) rgba (9.0, 5.0, 1.0, 3.0)
[pixel shader]
@@ -133,7 +133,7 @@ float4 main() : sv_target
[test]
uniform 0 float 10.0
todo(glsl | msl) draw quad
todo(msl) draw quad
if(sm<4) probe (0, 0) rgba(6, 6, -6, -6)
if(sm>=4) bug(mvk<1.2.11) probe (0, 0) rgba(7, 7, -7, -7)

View File

@@ -34,7 +34,7 @@ uint4 main(float4 pos : sv_position) : sv_target
% Initialise the UAV and RTV.
[test]
todo(glsl) draw triangle list 3
draw triangle list 3
probe (0, 0) u32(0xaaaaaaaa)
probe uav 1 (0, 0, 640, 480) u32(0x55555555)