mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2024-11-21 16:46:41 -08:00
vkd3d-shader/hlsl: Check for majority modifiers on non-matrices in apply_type_modifiers().
This commit is contained in:
parent
1ee7a4e82a
commit
af65287423
Notes:
Alexandre Julliard
2023-02-20 22:45:26 +01: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/98
@ -903,6 +903,10 @@ static struct hlsl_type *apply_type_modifiers(struct hlsl_ctx *ctx, struct hlsl_
|
|||||||
else
|
else
|
||||||
default_majority = HLSL_MODIFIER_ROW_MAJOR;
|
default_majority = HLSL_MODIFIER_ROW_MAJOR;
|
||||||
}
|
}
|
||||||
|
else if (type->type != HLSL_CLASS_MATRIX)
|
||||||
|
{
|
||||||
|
check_invalid_matrix_modifiers(ctx, *modifiers, loc);
|
||||||
|
}
|
||||||
|
|
||||||
if (!default_majority && !(*modifiers & HLSL_TYPE_MODIFIERS_MASK))
|
if (!default_majority && !(*modifiers & HLSL_TYPE_MODIFIERS_MASK))
|
||||||
return type;
|
return type;
|
||||||
@ -2041,9 +2045,6 @@ static struct list *declare_vars(struct hlsl_ctx *ctx, struct hlsl_type *basic_t
|
|||||||
}
|
}
|
||||||
vkd3d_free(v->arrays.sizes);
|
vkd3d_free(v->arrays.sizes);
|
||||||
|
|
||||||
if (type->type != HLSL_CLASS_MATRIX)
|
|
||||||
check_invalid_matrix_modifiers(ctx, modifiers, v->loc);
|
|
||||||
|
|
||||||
if (modifiers & (HLSL_STORAGE_IN | HLSL_STORAGE_OUT))
|
if (modifiers & (HLSL_STORAGE_IN | HLSL_STORAGE_OUT))
|
||||||
{
|
{
|
||||||
struct vkd3d_string_buffer *string;
|
struct vkd3d_string_buffer *string;
|
||||||
|
@ -48,7 +48,7 @@ float4 main() : sv_target
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[pixel shader fail todo]
|
[pixel shader fail]
|
||||||
column_major float4 f;
|
column_major float4 f;
|
||||||
|
|
||||||
float4 main() : sv_target
|
float4 main() : sv_target
|
||||||
@ -68,7 +68,7 @@ float4 main() : sv_target
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[pixel shader fail todo]
|
[pixel shader fail]
|
||||||
struct apple
|
struct apple
|
||||||
{
|
{
|
||||||
float4x4 m;
|
float4x4 m;
|
||||||
@ -80,7 +80,7 @@ float4 main() : sv_target
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[pixel shader fail todo]
|
[pixel shader fail]
|
||||||
typedef float4x4 myarray_t[2];
|
typedef float4x4 myarray_t[2];
|
||||||
|
|
||||||
row_major myarray_t a;
|
row_major myarray_t a;
|
||||||
@ -90,13 +90,13 @@ float4 main() : sv_target
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[pixel shader fail todo]
|
[pixel shader fail]
|
||||||
float4 main(uniform row_major float4 f) : sv_target
|
float4 main(uniform row_major float4 f) : sv_target
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
[pixel shader fail todo]
|
[pixel shader fail]
|
||||||
struct apple
|
struct apple
|
||||||
{
|
{
|
||||||
row_major float4 f;
|
row_major float4 f;
|
||||||
|
Loading…
Reference in New Issue
Block a user