Skip to content
Snippets Groups Projects
Commit 1c778116 authored by Francisco Casas's avatar Francisco Casas Committed by Alexandre Julliard
Browse files

vkd3d-shader/hlsl: Remove incorrect criteria for accepting implicit casts.

parent d93ce289
No related branches found
No related tags found
1 merge request!35vkd3d-shader/hlsl: Support complex implicit casts, complex explicit casts and complex broadcasts. (PART 2/3 v2)
......@@ -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};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment