vkd3d-shader: Disallow object structure fields for fx profiles.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-06-30 02:10:12 +02:00 committed by Henri Verbeet
parent c8720f1229
commit 3dc43e8945
Notes: Henri Verbeet 2024-07-08 18:55:58 +02:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/931
2 changed files with 5 additions and 2 deletions

View File

@ -2518,8 +2518,11 @@ static void declare_var(struct hlsl_ctx *ctx, struct parse_variable_def *v)
if (!(modifiers & HLSL_STORAGE_STATIC)) if (!(modifiers & HLSL_STORAGE_STATIC))
var->storage_modifiers |= HLSL_STORAGE_UNIFORM; var->storage_modifiers |= HLSL_STORAGE_UNIFORM;
if (ctx->profile->major_version < 5 && (var->storage_modifiers & HLSL_STORAGE_UNIFORM)) if ((ctx->profile->major_version < 5 || ctx->profile->type == VKD3D_SHADER_TYPE_EFFECT)
&& (var->storage_modifiers & HLSL_STORAGE_UNIFORM))
{
check_invalid_object_fields(ctx, var); check_invalid_object_fields(ctx, var);
}
if ((func = hlsl_get_first_func_decl(ctx, var->name))) if ((func = hlsl_get_first_func_decl(ctx, var->name)))
{ {

View File

@ -9,7 +9,7 @@ struct s
float4 f; float4 f;
}; };
[effect fail todo] [effect fail]
struct s struct s
{ {
Texture t; Texture t;