From 74273ccaddf4699bd978ed3152b0166073650528 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Fri, 22 Apr 2022 12:25:03 +0200 Subject: [PATCH] vkd3d-shader/hlsl: Do not handle vector types in major_size() and minor_size(). Signed-off-by: Giovanni Mascellani Signed-off-by: Henri Verbeet Signed-off-by: Zebediah Figura Signed-off-by: Alexandre Julliard --- libs/vkd3d-shader/hlsl_codegen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/vkd3d-shader/hlsl_codegen.c b/libs/vkd3d-shader/hlsl_codegen.c index f22841fb..f31bfe9f 100644 --- a/libs/vkd3d-shader/hlsl_codegen.c +++ b/libs/vkd3d-shader/hlsl_codegen.c @@ -676,7 +676,7 @@ static bool split_struct_copies(struct hlsl_ctx *ctx, struct hlsl_ir_node *instr static unsigned int minor_size(const struct hlsl_type *type) { - if (type->type == HLSL_CLASS_VECTOR || type->modifiers & HLSL_MODIFIER_ROW_MAJOR) + if (type->modifiers & HLSL_MODIFIER_ROW_MAJOR) return type->dimx; else return type->dimy; @@ -684,7 +684,7 @@ static unsigned int minor_size(const struct hlsl_type *type) static unsigned int major_size(const struct hlsl_type *type) { - if (type->type == HLSL_CLASS_VECTOR || type->modifiers & HLSL_MODIFIER_ROW_MAJOR) + if (type->modifiers & HLSL_MODIFIER_ROW_MAJOR) return type->dimy; else return type->dimx;