From 8738e4662ed68b59047fbfb7614f71af09962491 Mon Sep 17 00:00:00 2001 From: Nikolay Sivov Date: Fri, 14 Jun 2024 02:26:19 +0200 Subject: [PATCH] vkd3d-shader/fx: Preserve parsing order of initializer components. Signed-off-by: Nikolay Sivov --- libs/vkd3d-shader/hlsl.y | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libs/vkd3d-shader/hlsl.y b/libs/vkd3d-shader/hlsl.y index b9f0deda..f5611e67 100644 --- a/libs/vkd3d-shader/hlsl.y +++ b/libs/vkd3d-shader/hlsl.y @@ -2224,6 +2224,9 @@ static unsigned int get_component_index_from_default_initializer_index(struct hl if (ctx->profile->major_version < 4) return index; + if (ctx->profile->type == VKD3D_SHADER_TYPE_EFFECT) + return index; + switch (type->class) { case HLSL_CLASS_MATRIX: