vkd3d-shader/glsl: Implement VSIR_OP_UDIV_SIMPLE.

This commit is contained in:
Henri Verbeet
2025-08-08 15:31:22 +02:00
parent 86656b7544
commit d30c992039
Notes: Henri Verbeet 2025-08-28 20:32:38 +02:00
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1696
3 changed files with 9 additions and 6 deletions

View File

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

View File

@@ -10,7 +10,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 5.0 16.0 0.0 0.0 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) probe (0, 0) rgba (21.0, -11.0, 80.0, 0.0)
[pixel shader] [pixel shader]
@@ -40,7 +40,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 42.0 5.0 0.0 0.0 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) probe (0, 0) rgba (8.0, -8.0, -8.0, 8.0)
[pixel shader] [pixel shader]
@@ -70,7 +70,7 @@ float4 main() : SV_TARGET
[test] [test]
uniform 0 float4 45.0 5.0 0.0 0.0 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) probe (0, 0) rgba (9.0, -9.0, -9.0, 9.0)
[pixel shader] [pixel shader]
@@ -150,7 +150,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 999.0 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(16798, -16798, -16798, 16798)
if(sm>=4) probe (0, 0) rgba(16799, -16799, -16799, 16799) if(sm>=4) probe (0, 0) rgba(16799, -16799, -16799, 16799)
@@ -167,7 +167,7 @@ float4 main() : sv_target
[test] [test]
uniform 0 float 999.0 uniform 0 float 999.0
todo(glsl | msl) draw quad todo(msl) draw quad
probe (0, 0) rgba(16798, -16798, -16798, 16798) probe (0, 0) rgba(16798, -16798, -16798, 16798)
[require] [require]

View File

@@ -203,7 +203,7 @@ uniform 0 uint 0xfffe
uniform 4 uint 0xb uniform 4 uint 0xb
uniform 8 uint 0xffff uniform 8 uint 0xffff
uniform 12 uint 0xffff uniform 12 uint 0xffff
todo(msl | glsl) draw quad todo(msl) draw quad
probe (0, 0) u32(0x10, 2, 0x10, 0x3333) probe (0, 0) u32(0x10, 2, 0x10, 0x3333)
[require] [require]