vkd3d-shader/hlsl: Allow technique10 {} blocks for fx_2_0.

Such techniques are ignored later, but do not cause compilation errors.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
This commit is contained in:
Nikolay Sivov 2024-02-23 01:11:40 +01:00 committed by Alexandre Julliard
parent 5edbccd33b
commit dd5e42d347
Notes: Alexandre Julliard 2024-03-06 23:29:49 +01: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/676
2 changed files with 1 additions and 5 deletions

View File

@ -5538,10 +5538,6 @@ technique10:
struct hlsl_scope *scope = ctx->cur_scope;
hlsl_pop_scope(ctx);
if (ctx->profile->type == VKD3D_SHADER_TYPE_EFFECT && ctx->profile->major_version == 2)
hlsl_error(ctx, &@1, VKD3D_SHADER_ERROR_HLSL_INVALID_SYNTAX,
"The 'technique10' keyword is invalid for this profile.");
if (!add_technique(ctx, $2, scope, $3, "technique10", &@1))
YYABORT;
}

View File

@ -76,7 +76,7 @@ float4 main() : sv_target
return fxGroup;
}
[effect todo]
[effect]
technique
{
}