Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.y:
" %s mask = %s(x >= 0.0);\n"
" result = mask * result\n"
" + (1.0 - mask) * (3.14159265 - result);\n"
" return %s;"
"}";
- static const char fn_name_acos[] = "acos";
- static const char fn_name_asin[] = "asin";
- static const char return_stmt_acos[] = "result";
- static const char return_stmt_asin[] = "-result + (3.14159265 / 2.0)";
- const char *fn_name = asin_mode
? fn_name_asin
: fn_name_acos;
- if (!(type = elementwise_intrinsic_get_common_type(ctx, params, loc)))
return false;
There's no need to call `elementwise_intrinsic_get_common_type()` when there is just one parameter.