mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Handle error expressions in assignments.
This commit is contained in:
parent
c94aa5e03c
commit
600f90e8b0
Notes:
Henri Verbeet
2024-10-03 19:34:42 +02:00
Approved-by: Francisco Casas (@fcasas) Approved-by: Henri Verbeet (@hverbeet) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1110
@ -2091,6 +2091,12 @@ static bool add_assignment(struct hlsl_ctx *ctx, struct hlsl_block *block, struc
|
|||||||
unsigned int writemask = 0, width = 0;
|
unsigned int writemask = 0, width = 0;
|
||||||
bool matrix_writemask = false;
|
bool matrix_writemask = false;
|
||||||
|
|
||||||
|
if (lhs->data_type->class == HLSL_CLASS_ERROR || rhs->data_type->class == HLSL_CLASS_ERROR)
|
||||||
|
{
|
||||||
|
block->value = ctx->error_instr;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if (assign_op == ASSIGN_OP_SUB)
|
if (assign_op == ASSIGN_OP_SUB)
|
||||||
{
|
{
|
||||||
if (!(rhs = add_unary_arithmetic_expr(ctx, block, HLSL_OP1_NEG, rhs, &rhs->loc)))
|
if (!(rhs = add_unary_arithmetic_expr(ctx, block, HLSL_OP1_NEG, rhs, &rhs->loc)))
|
||||||
|
Loading…
Reference in New Issue
Block a user