From: Conor McCarthy cmccarthy@codeweavers.com
--- libs/vkd3d-shader/spirv.c | 2 ++ tests/hlsl/trigonometry.shader_test | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d-shader/spirv.c b/libs/vkd3d-shader/spirv.c index 299b4e965..d9196a5d1 100644 --- a/libs/vkd3d-shader/spirv.c +++ b/libs/vkd3d-shader/spirv.c @@ -6979,6 +6979,7 @@ static enum GLSLstd450 spirv_compiler_map_ext_glsl_instruction( {VKD3DSIH_ROUND_Z, GLSLstd450Trunc}, {VKD3DSIH_RSQ, GLSLstd450InverseSqrt}, {VKD3DSIH_SQRT, GLSLstd450Sqrt}, + {VKD3DSIH_TAN, GLSLstd450Tan}, {VKD3DSIH_UMAX, GLSLstd450UMax}, {VKD3DSIH_UMIN, GLSLstd450UMin}, }; @@ -9543,6 +9544,7 @@ static int spirv_compiler_handle_instruction(struct spirv_compiler *compiler, case VKD3DSIH_ROUND_Z: case VKD3DSIH_RSQ: case VKD3DSIH_SQRT: + case VKD3DSIH_TAN: case VKD3DSIH_UMAX: case VKD3DSIH_UMIN: spirv_compiler_emit_ext_glsl_instruction(compiler, instruction); diff --git a/tests/hlsl/trigonometry.shader_test b/tests/hlsl/trigonometry.shader_test index 7f95a99fc..90eac333e 100644 --- a/tests/hlsl/trigonometry.shader_test +++ b/tests/hlsl/trigonometry.shader_test @@ -13,7 +13,7 @@ float4 main(float tex : texcoord) : sv_target }
[test] -todo(sm<4 | sm>=6) draw quad +todo(sm<4) draw quad probe ( 0, 0) rgba ( 0.00000000, 1.00000000, 0.00000000, 0.0) probe ( 1, 0) rgba ( 0.84147098, 0.54030231, 1.55740772, 0.0) 1024 probe ( 2, 0) rgba ( 0.90929743, -0.41614684, -2.18503986, 0.0) 1024 @@ -72,5 +72,5 @@ float4 main() : sv_target % tan(pi/2) is an asymtote and therefore undefined % so check 0, pi/4, 3pi/4, pi uniform 0 float4 0.0 0.78539816 2.35619449 3.14159265 -todo(sm<4 | sm>=6) draw quad +todo(sm<4) draw quad probe all rgba (0, 1000, -1000.0, 0)