mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d-shader/hlsl: Remove incorrect criteria for accepting implicit casts.
This commit is contained in:
committed by
Alexandre Julliard
parent
d93ce28995
commit
1c77811648
Notes:
Alexandre Julliard
2022-10-25 22:39:01 +02:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Zebediah Figura (@zfigura) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/35
@@ -222,22 +222,6 @@ static bool implicit_compatible_data_types(struct hlsl_type *src, struct hlsl_ty
|
||||
return true;
|
||||
}
|
||||
|
||||
if (src->type == HLSL_CLASS_ARRAY && dst->type == HLSL_CLASS_ARRAY)
|
||||
{
|
||||
return hlsl_type_component_count(src) == hlsl_type_component_count(dst);
|
||||
}
|
||||
|
||||
if ((src->type == HLSL_CLASS_ARRAY && dst->type <= HLSL_CLASS_LAST_NUMERIC)
|
||||
|| (src->type <= HLSL_CLASS_LAST_NUMERIC && dst->type == HLSL_CLASS_ARRAY))
|
||||
{
|
||||
/* e.g. float4[3] to float4 is allowed */
|
||||
if (src->type == HLSL_CLASS_ARRAY && hlsl_types_are_equal(src->e.array.type, dst))
|
||||
return true;
|
||||
if (hlsl_type_component_count(src) == hlsl_type_component_count(dst))
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (src->type <= HLSL_CLASS_VECTOR && dst->type <= HLSL_CLASS_VECTOR)
|
||||
{
|
||||
if (src->dimx >= dst->dimx)
|
||||
|
||||
Reference in New Issue
Block a user