diff --git a/libs/vkd3d-shader/glsl.c b/libs/vkd3d-shader/glsl.c index 5daeccb0..b1cac331 100644 --- a/libs/vkd3d-shader/glsl.c +++ b/libs/vkd3d-shader/glsl.c @@ -766,6 +766,9 @@ static void vkd3d_glsl_handle_instruction(struct vkd3d_glsl_generator *gen, case VKD3DSIH_RET: shader_glsl_ret(gen, ins); break; + case VKD3DSIH_ROUND_NI: + shader_glsl_intrinsic(gen, ins, "floor"); + break; case VKD3DSIH_ROUND_PI: shader_glsl_intrinsic(gen, ins, "ceil"); break; diff --git a/tests/hlsl/floor.shader_test b/tests/hlsl/floor.shader_test index 6717fe9e..96a8aca2 100644 --- a/tests/hlsl/floor.shader_test +++ b/tests/hlsl/floor.shader_test @@ -18,7 +18,7 @@ float4 main() : sv_target [test] uniform 0 float4 -0.5 6.5 7.5 3.4 -todo(glsl) draw quad +draw quad probe (0, 0) rgba (-1.0, 6.0, 7.0, 3.0) 4 [pixel shader] @@ -34,7 +34,7 @@ float4 main() : sv_target [test] uniform 0 float4 -0.5 6.5 7.5 3.4 -todo(glsl) draw quad +draw quad probe (0, 0) rgba (6.0, 7.0, -1.0, 3.0) 4 @@ -52,5 +52,5 @@ float4 main() : sv_target [test] if(sm<4) uniform 0 float4 -1 6 7 3 if(sm>=4) uniform 0 int4 -1 6 7 3 -todo(glsl) draw quad +draw quad probe (0, 0) rgba (6.0, 7.0, -1.0, 3.0) 4