Fix HLSL atan2() argument order

HLSL uses atan2(y, x) to represent the arctangent y/x, just like GLSL.

https://msdn.microsoft.com/en-us/library/windows/desktop/bb509575.aspx
This commit is contained in:
James Ross-Gowan 2017-09-24 02:45:33 +10:00
parent 7170864159
commit 8805d08b31

View File

@ -1916,7 +1916,7 @@ void CompilerHLSL::emit_glsl_op(uint32_t result_type, uint32_t id, uint32_t eop,
break;
case GLSLstd450Atan2:
emit_binary_func_op(result_type, id, args[1], args[0], "atan2");
emit_binary_func_op(result_type, id, args[0], args[1], "atan2");
break;
case GLSLstd450Fma: