mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader: Sanity-check the offset data type in hlsl_reg_from_deref().
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:
parent
9f73897725
commit
0238f60d8b
@ -1171,6 +1171,11 @@ static struct hlsl_reg hlsl_reg_from_deref(const struct hlsl_deref *deref, const
|
||||
struct hlsl_reg ret = {0};
|
||||
unsigned int offset = 0;
|
||||
|
||||
/* We should always have generated a cast to UINT. */
|
||||
if (offset_node)
|
||||
assert(offset_node->data_type->type == HLSL_CLASS_SCALAR
|
||||
&& offset_node->data_type->base_type == HLSL_TYPE_UINT);
|
||||
|
||||
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));
|
||||
|
Loading…
x
Reference in New Issue
Block a user