From 5d5d8928307842a9824f0d05e581ce2597488242 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Tue, 6 May 2025 00:41:24 +0200 Subject: [PATCH] vkd3d-shader/fx: Use the same BlendState states description for both fx_4_1 and fx_5_0. Signed-off-by: Nikolay Sivov --- libs/vkd3d-shader/fx.c | 2 +- tests/hlsl/effect-variables-fx_4_1.shader_test | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/vkd3d-shader/fx.c b/libs/vkd3d-shader/fx.c index c93f01039..76c03e8f3 100644 --- a/libs/vkd3d-shader/fx.c +++ b/libs/vkd3d-shader/fx.c @@ -2686,7 +2686,7 @@ static void resolve_fx_4_state_block_values(struct hlsl_ir_var *var, struct hlsl struct hlsl_ir_node *node; unsigned int i; - if (type->class == HLSL_CLASS_BLEND_STATE && ctx->profile->major_version == 5) + if (type->class == HLSL_CLASS_BLEND_STATE && hlsl_version_ge(ctx, 4, 1)) { table.ptr = fx_5_blend_states; table.count = ARRAY_SIZE(fx_5_blend_states); diff --git a/tests/hlsl/effect-variables-fx_4_1.shader_test b/tests/hlsl/effect-variables-fx_4_1.shader_test index 462eee0d8..093141e6b 100644 --- a/tests/hlsl/effect-variables-fx_4_1.shader_test +++ b/tests/hlsl/effect-variables-fx_4_1.shader_test @@ -2,7 +2,7 @@ shader model >= 4.1 shader model < 6.0 -[effect todo] +[effect] BlendState bs { SrcBlend[0] = one; @@ -13,7 +13,7 @@ BlendState bs BlendOpAlpha[5] = add; }; -[effect todo] +[effect] BlendState bs { SrcBlend = one;