mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Remove incorrect criteria for accepting implicit casts.
This commit is contained in:
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)
|
||||
|
@ -226,7 +226,7 @@ float4 main() : sv_target
|
||||
}
|
||||
|
||||
|
||||
[pixel shader fail todo]
|
||||
[pixel shader fail]
|
||||
float main() : SV_TARGET
|
||||
{
|
||||
float arr[3] = {1, 2, 3};
|
||||
@ -237,7 +237,7 @@ float main() : SV_TARGET
|
||||
}
|
||||
|
||||
|
||||
[pixel shader fail todo]
|
||||
[pixel shader fail]
|
||||
float main() : SV_TARGET
|
||||
{
|
||||
float2 arr[3] = {1, 2, 3, 4, 5, 6};
|
||||
@ -248,7 +248,7 @@ float main() : SV_TARGET
|
||||
}
|
||||
|
||||
|
||||
[pixel shader fail todo]
|
||||
[pixel shader fail]
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
int arr1[4] = {1, 2, 3, 4};
|
||||
@ -270,7 +270,7 @@ float4 main() : SV_TARGET
|
||||
}
|
||||
|
||||
|
||||
[pixel shader fail todo]
|
||||
[pixel shader fail]
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
float4 f = {1, 2, 3, 4};
|
||||
@ -281,7 +281,7 @@ float4 main() : SV_TARGET
|
||||
}
|
||||
|
||||
|
||||
[pixel shader fail todo]
|
||||
[pixel shader fail]
|
||||
float4 main() : SV_TARGET
|
||||
{
|
||||
float arr[4] = {1, 2, 3, 4};
|
||||
|
Loading…
Reference in New Issue
Block a user