mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-04-13 05:43:18 -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;
|
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->type <= HLSL_CLASS_VECTOR && dst->type <= HLSL_CLASS_VECTOR)
|
||||||
{
|
{
|
||||||
if (src->dimx >= dst->dimx)
|
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 main() : SV_TARGET
|
||||||
{
|
{
|
||||||
float arr[3] = {1, 2, 3};
|
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
|
float main() : SV_TARGET
|
||||||
{
|
{
|
||||||
float2 arr[3] = {1, 2, 3, 4, 5, 6};
|
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
|
float4 main() : SV_TARGET
|
||||||
{
|
{
|
||||||
int arr1[4] = {1, 2, 3, 4};
|
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 main() : SV_TARGET
|
||||||
{
|
{
|
||||||
float4 f = {1, 2, 3, 4};
|
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
|
float4 main() : SV_TARGET
|
||||||
{
|
{
|
||||||
float arr[4] = {1, 2, 3, 4};
|
float arr[4] = {1, 2, 3, 4};
|
||||||
|
Reference in New Issue
Block a user