From d30c992039e529d711c0112dec25497738346ad2 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Fri, 8 Aug 2025 15:31:22 +0200 Subject: [PATCH] vkd3d-shader/glsl: Implement VSIR_OP_UDIV_SIMPLE. --- libs/vkd3d-shader/glsl.c | 3 +++ tests/hlsl/arithmetic-int-uniform.shader_test | 10 +++++----- tests/hlsl/arithmetic-uint.shader_test | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/libs/vkd3d-shader/glsl.c b/libs/vkd3d-shader/glsl.c index aac7d5507..7325661ea 100644 --- a/libs/vkd3d-shader/glsl.c +++ b/libs/vkd3d-shader/glsl.c @@ -1647,6 +1647,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen, case VSIR_OP_SWITCH: shader_glsl_switch(gen, ins); break; + case VSIR_OP_UDIV_SIMPLE: + shader_glsl_binop(gen, ins, "/"); + break; case VSIR_OP_XOR: shader_glsl_binop(gen, ins, "^"); break; diff --git a/tests/hlsl/arithmetic-int-uniform.shader_test b/tests/hlsl/arithmetic-int-uniform.shader_test index 0922c7f81..2a0d0e583 100644 --- a/tests/hlsl/arithmetic-int-uniform.shader_test +++ b/tests/hlsl/arithmetic-int-uniform.shader_test @@ -10,7 +10,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 (21.0, -11.0, 80.0, 0.0) [pixel shader] @@ -40,7 +40,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 probe (0, 0) rgba (8.0, -8.0, -8.0, 8.0) [pixel shader] @@ -70,7 +70,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 probe (0, 0) rgba (9.0, -9.0, -9.0, 9.0) [pixel shader] @@ -150,7 +150,7 @@ float4 main() : sv_target [test] uniform 0 float 999.0 -todo(glsl | msl) draw quad +todo(msl) draw quad if(sm<4) probe (0, 0) rgba(16798, -16798, -16798, 16798) if(sm>=4) probe (0, 0) rgba(16799, -16799, -16799, 16799) @@ -167,7 +167,7 @@ float4 main() : sv_target [test] uniform 0 float 999.0 -todo(glsl | msl) draw quad +todo(msl) draw quad probe (0, 0) rgba(16798, -16798, -16798, 16798) [require] diff --git a/tests/hlsl/arithmetic-uint.shader_test b/tests/hlsl/arithmetic-uint.shader_test index 087bb2e7c..6a1bbd79d 100644 --- a/tests/hlsl/arithmetic-uint.shader_test +++ b/tests/hlsl/arithmetic-uint.shader_test @@ -203,7 +203,7 @@ uniform 0 uint 0xfffe uniform 4 uint 0xb uniform 8 uint 0xffff uniform 12 uint 0xffff -todo(msl | glsl) draw quad +todo(msl) draw quad probe (0, 0) u32(0x10, 2, 0x10, 0x3333) [require]