mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/tpf: Use 'movc' to implement ternary operator.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
committed by
Alexandre Julliard
parent
2fb0c2d187
commit
1002a6b357
Notes:
Alexandre Julliard
2023-09-07 23:01:33 +02: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/268
@@ -6562,6 +6562,7 @@ conditional_expr:
|
||||
struct hlsl_ir_node *cond = node_from_block($1);
|
||||
struct hlsl_ir_node *first = node_from_block($3);
|
||||
struct hlsl_ir_node *second = node_from_block($5);
|
||||
struct hlsl_ir_node *args[HLSL_MAX_OPERANDS] = { 0 };
|
||||
struct hlsl_type *common_type;
|
||||
|
||||
hlsl_block_add_block($1, $3);
|
||||
@@ -6578,7 +6579,10 @@ conditional_expr:
|
||||
if (!(second = add_implicit_conversion(ctx, $1, second, common_type, &@5)))
|
||||
YYABORT;
|
||||
|
||||
if (!hlsl_add_conditional(ctx, $1, cond, first, second))
|
||||
args[0] = cond;
|
||||
args[1] = first;
|
||||
args[2] = second;
|
||||
if (!add_expr(ctx, $1, HLSL_OP3_TERNARY, args, common_type, &@1))
|
||||
YYABORT;
|
||||
$$ = $1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user