From 79455041f0c98532896d26f83e54d81ea87519f3 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 30 Sep 2024 00:03:15 +0200 Subject: [PATCH] vkd3d-shader/glsl: Implement VKD3DSIH_EQO. --- libs/vkd3d-shader/glsl.c | 1 + tests/hlsl/float-comparison.shader_test | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/vkd3d-shader/glsl.c b/libs/vkd3d-shader/glsl.c index c2fb58c5..63472570 100644 --- a/libs/vkd3d-shader/glsl.c +++ b/libs/vkd3d-shader/glsl.c @@ -1079,6 +1079,7 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen, case VKD3DSIH_ENDIF: shader_glsl_endif(gen); break; + case VKD3DSIH_EQO: case VKD3DSIH_IEQ: shader_glsl_relop(gen, ins, "==", "equal"); break; diff --git a/tests/hlsl/float-comparison.shader_test b/tests/hlsl/float-comparison.shader_test index 9a291f3f..5244fb39 100644 --- a/tests/hlsl/float-comparison.shader_test +++ b/tests/hlsl/float-comparison.shader_test @@ -55,7 +55,7 @@ float4 main() : sv_target [test] uniform 0 float4 0.0 1.5 1.5 0.0 -todo(glsl) draw quad +draw quad % SM1-3 apparently treats '0/0' as zero. if(sm<4) todo probe (0,0) rgba (1010101.0, 11001100.0, 1101001.0, 11.0) % SM4-5 optimises away the 'not' by inverting the condition, even though this is invalid for NaN.