mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-01-28 13:05:02 -08:00
vkd3d-shader/hlsl: Remove redundant type check in declare_vars().
Signed-off-by: Francisco Casas <fcasas@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com> Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
84059d61c3
commit
a7e6d6b9d2
@ -1612,23 +1612,17 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
|
||||
continue;
|
||||
}
|
||||
|
||||
if (type->type == HLSL_CLASS_STRUCT)
|
||||
{
|
||||
struct_var_initializer(ctx, statements_list, var, &v->initializer);
|
||||
vkd3d_free(v);
|
||||
continue;
|
||||
}
|
||||
if (type->type > HLSL_CLASS_LAST_NUMERIC)
|
||||
if (type->type > HLSL_CLASS_LAST_NUMERIC && type->type != HLSL_CLASS_STRUCT)
|
||||
{
|
||||
FIXME("Initializers for non scalar/struct variables not supported yet.\n");
|
||||
free_parse_initializer(&v->initializer);
|
||||
vkd3d_free(v);
|
||||
continue;
|
||||
}
|
||||
if (v->arrays.count)
|
||||
|
||||
if (type->type == HLSL_CLASS_STRUCT)
|
||||
{
|
||||
hlsl_fixme(ctx, &v->loc, "Array initializer.");
|
||||
free_parse_initializer(&v->initializer);
|
||||
struct_var_initializer(ctx, statements_list, var, &v->initializer);
|
||||
vkd3d_free(v);
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user