mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Implement ternary operator for SM1.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Alexandre Julliard
parent
522a0dfb56
commit
76e42fbd21
Notes:
Alexandre Julliard
2023-11-08 23:02:17 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/371
@@ -578,7 +578,10 @@ enum hlsl_ir_expr_op
|
||||
/* MOVC(a, b, c) returns c if a is bitwise zero and b otherwise.
|
||||
* TERNARY(a, b, c) returns c if a == 0 and b otherwise.
|
||||
* They differ for floating point numbers, because
|
||||
* -0.0 == 0.0, but it is not bitwise zero. */
|
||||
* -0.0 == 0.0, but it is not bitwise zero. CMP(a, b, c) returns b
|
||||
if a >= 0, and c otherwise. It's used only for SM1-SM3 targets, while
|
||||
SM4+ is using MOVC in such cases. */
|
||||
HLSL_OP3_CMP,
|
||||
HLSL_OP3_MOVC,
|
||||
HLSL_OP3_TERNARY,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user