mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Use hlsl_is_numeric_type() in type_has_object_components().
This commit is contained in:
parent
54f2dfe403
commit
106cbc02de
Notes:
Alexandre Julliard
2024-04-03 00:21:18 +02:00
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/745
@ -2093,24 +2093,23 @@ static void initialize_var_components(struct hlsl_ctx *ctx, struct hlsl_block *i
|
|||||||
|
|
||||||
static bool type_has_object_components(const struct hlsl_type *type)
|
static bool type_has_object_components(const struct hlsl_type *type)
|
||||||
{
|
{
|
||||||
if (type->class == HLSL_CLASS_OBJECT)
|
|
||||||
return true;
|
|
||||||
if (type->class == HLSL_CLASS_ARRAY)
|
if (type->class == HLSL_CLASS_ARRAY)
|
||||||
return type_has_object_components(type->e.array.type);
|
return type_has_object_components(type->e.array.type);
|
||||||
|
|
||||||
if (type->class == HLSL_CLASS_STRUCT)
|
if (type->class == HLSL_CLASS_STRUCT)
|
||||||
{
|
{
|
||||||
unsigned int i;
|
for (unsigned int i = 0; i < type->e.record.field_count; ++i)
|
||||||
|
|
||||||
for (i = 0; i < type->e.record.field_count; ++i)
|
|
||||||
{
|
{
|
||||||
if (type_has_object_components(type->e.record.fields[i].type))
|
if (type_has_object_components(type->e.record.fields[i].type))
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return !hlsl_is_numeric_type(type);
|
||||||
|
}
|
||||||
|
|
||||||
static bool type_has_numeric_components(struct hlsl_type *type)
|
static bool type_has_numeric_components(struct hlsl_type *type)
|
||||||
{
|
{
|
||||||
if (hlsl_is_numeric_type(type))
|
if (hlsl_is_numeric_type(type))
|
||||||
|
Loading…
Reference in New Issue
Block a user