From 944929d0dae103869a6c87054075dbe1f1b209bb Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 30 Sep 2024 12:15:08 +0200 Subject: [PATCH] vkd3d-shader/glsl: Implement VKD3DSIH_IADD. --- libs/vkd3d-shader/glsl.c | 1 + tests/hlsl/non-const-indexing.shader_test | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/libs/vkd3d-shader/glsl.c b/libs/vkd3d-shader/glsl.c index 8a897351..51dd8f88 100644 --- a/libs/vkd3d-shader/glsl.c +++ b/libs/vkd3d-shader/glsl.c @@ -1056,6 +1056,7 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen, switch (ins->opcode) { case VKD3DSIH_ADD: + case VKD3DSIH_IADD: shader_glsl_binop(gen, ins, "+"); break; case VKD3DSIH_AND: diff --git a/tests/hlsl/non-const-indexing.shader_test b/tests/hlsl/non-const-indexing.shader_test index 66b902bd..0b9cebf1 100644 --- a/tests/hlsl/non-const-indexing.shader_test +++ b/tests/hlsl/non-const-indexing.shader_test @@ -77,16 +77,16 @@ float4 main() : SV_TARGET [test] uniform 0 float 0 -todo(sm<4 | glsl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (21.0, 1.0, 24.0, 0.0) uniform 0 float 1 -todo(sm<4 | glsl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (22.0, 0.0, 23.0, 1.0) uniform 0 float 2 -todo(sm<4 | glsl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (23.0, 1.0, 22.0, 0.0) uniform 0 float 3 -todo(sm<4 | glsl) draw quad +todo(sm<4) draw quad probe (0, 0) rgba (24.0, 0.0, 21.0, 1.0)