vkd3d-shader/hlsl: Avoid crashing when emitting a dereference with non-constant offset.

Some places assert() that the register is allocated.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2021-08-24 01:18:07 -05:00 committed by Alexandre Julliard
parent 864e816de8
commit ac88631755

View File

@ -1200,7 +1200,7 @@ struct hlsl_reg hlsl_reg_from_deref(const struct hlsl_deref *deref, const struct
if (offset_node && offset_node->type != HLSL_IR_CONSTANT)
{
FIXME("Dereference with non-constant offset of type %s.\n", hlsl_node_type_to_string(offset_node->type));
return ret;
offset_node = NULL;
}
ret = var->reg;