[PATCH vkd3d v2 7/9] vkd3d-shader/hlsl: Do not handle vector types in major_size() and minor_size().

Giovanni Mascellani gmascellani at codeweavers.com
Thu Apr 21 10:44:27 CDT 2022


Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
 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;
-- 
2.35.2




More information about the wine-devel mailing list