From: Giovanni Mascellani gmascellani@codeweavers.com
--- libs/vkd3d-shader/hlsl.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/libs/vkd3d-shader/hlsl.h b/libs/vkd3d-shader/hlsl.h index 04e681a9..1b5ae172 100644 --- a/libs/vkd3d-shader/hlsl.h +++ b/libs/vkd3d-shader/hlsl.h @@ -550,9 +550,16 @@ enum hlsl_ir_expr_op HLSL_OP2_NEQUAL, HLSL_OP2_RSHIFT,
+ /* DP2ADD(a, b, c) computes the scalar product of a.xy and b.xy, + * then adds c. */ HLSL_OP3_DP2ADD, + /* LERP(a, b, c) computes a * (1-z) + b * z or, equivalently, + * a + z * (b - c). */ HLSL_OP3_LERP, - /* TERNARY is used specifically for ternary operator, and later lowered according to profile to e.g. MOVC. */ + /* MOVC(a, b, c) returns c is a is bitwise zero and b + * otherwise. TERNARY(a, b, c) returns c if a == 0 and y + * otherwise. They differ for floating point numbers, because + * -0.0 == 0.0, but it is not bitwise zero. */ HLSL_OP3_MOVC, HLSL_OP3_TERNARY, };