Module: vkd3d Branch: master Commit: dd5e42d3479133bc57c47bac8dd3a5c043beb0e8 URL: https://gitlab.winehq.org/wine/vkd3d/-/commit/dd5e42d3479133bc57c47bac8dd3a5...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Fri Feb 23 01:11:40 2024 +0100
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
---
libs/vkd3d-shader/hlsl.y | 4 ---- tests/hlsl/technique-fx_2.shader_test | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index 9475a3c8..8cdc8226 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -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; } diff --git a/tests/hlsl/technique-fx_2.shader_test b/tests/hlsl/technique-fx_2.shader_test index b84bbc16..3b71d0a3 100644 --- a/tests/hlsl/technique-fx_2.shader_test +++ b/tests/hlsl/technique-fx_2.shader_test @@ -76,7 +76,7 @@ float4 main() : sv_target return fxGroup; }
-[effect todo] +[effect] technique { }