From 47e931823cd227abc2122610734700665b414b7a Mon Sep 17 00:00:00 2001 From: Matteo Bruni Date: Tue, 18 Sep 2012 18:18:07 +0200 Subject: [PATCH] d3dcompiler: Only a few modifiers are relevant in type comparison. --- dlls/d3dcompiler_43/d3dcompiler_private.h | 2 ++ dlls/d3dcompiler_43/utils.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/d3dcompiler_43/d3dcompiler_private.h b/dlls/d3dcompiler_43/d3dcompiler_private.h index a191529e242..28e77d32bf4 100644 --- a/dlls/d3dcompiler_43/d3dcompiler_private.h +++ b/dlls/d3dcompiler_43/d3dcompiler_private.h @@ -732,6 +732,8 @@ struct hlsl_ir_node #define HLSL_MODIFIER_IN 0x00000800 #define HLSL_MODIFIER_OUT 0x00001000 +#define HLSL_MODIFIERS_COMPARISON_MASK (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR) + struct hlsl_ir_var { struct hlsl_ir_node node; diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index f288efc1bb1..c403a98b363 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -921,7 +921,8 @@ static BOOL compare_hlsl_types(const struct hlsl_type *t1, const struct hlsl_typ return FALSE; if (t1->base_type == HLSL_TYPE_SAMPLER && t1->sampler_dim != t2->sampler_dim) return FALSE; - if (t1->modifiers != t2->modifiers) + if ((t1->modifiers & HLSL_MODIFIERS_COMPARISON_MASK) + != (t2->modifiers & HLSL_MODIFIERS_COMPARISON_MASK)) return FALSE; if (t1->dimx != t2->dimx) return FALSE;