mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Avoid assuming that expressions have at least one argument.
This commit is contained in:
committed by
Alexandre Julliard
parent
22a1a478ea
commit
30550c0831
Notes:
Alexandre Julliard
2023-01-13 22:23:38 +01:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/47
@@ -509,6 +509,8 @@ bool hlsl_fold_constant_exprs(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr,
|
||||
if (instr->type != HLSL_IR_EXPR)
|
||||
return false;
|
||||
expr = hlsl_ir_expr(instr);
|
||||
if (!expr->operands[0].node)
|
||||
return false;
|
||||
|
||||
if (instr->data_type->type > HLSL_CLASS_VECTOR)
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user