Commit 8ea8eb20 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

d3dcompiler: Rename HLSL_MODIFIERS_COMPARISON_MASK to…

d3dcompiler: Rename HLSL_MODIFIERS_COMPARISON_MASK to HLSL_MODIFIERS_MAJORITY_MASK and use it in more places. Signed-off-by: 's avatarZebediah Figura <zfigura@codeweavers.com> Signed-off-by: 's avatarMatteo Bruni <mbruni@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent f9ce3c7c
...@@ -741,7 +741,7 @@ struct hlsl_ir_node ...@@ -741,7 +741,7 @@ struct hlsl_ir_node
HLSL_MODIFIER_CONST | HLSL_MODIFIER_ROW_MAJOR | \ HLSL_MODIFIER_CONST | HLSL_MODIFIER_ROW_MAJOR | \
HLSL_MODIFIER_COLUMN_MAJOR) HLSL_MODIFIER_COLUMN_MAJOR)
#define HLSL_MODIFIERS_COMPARISON_MASK (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR) #define HLSL_MODIFIERS_MAJORITY_MASK (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)
struct reg_reservation struct reg_reservation
{ {
......
...@@ -117,7 +117,7 @@ static void debug_dump_decl(struct hlsl_type *type, DWORD modifiers, const char ...@@ -117,7 +117,7 @@ static void debug_dump_decl(struct hlsl_type *type, DWORD modifiers, const char
static void check_invalid_matrix_modifiers(DWORD modifiers, struct source_location loc) static void check_invalid_matrix_modifiers(DWORD modifiers, struct source_location loc)
{ {
if (modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR)) if (modifiers & HLSL_MODIFIERS_MAJORITY_MASK)
{ {
hlsl_report_message(loc, HLSL_LEVEL_ERROR, hlsl_report_message(loc, HLSL_LEVEL_ERROR,
"'row_major' or 'column_major' modifiers are only allowed for matrices"); "'row_major' or 'column_major' modifiers are only allowed for matrices");
...@@ -175,8 +175,7 @@ static DWORD add_modifiers(DWORD modifiers, DWORD mod, const struct source_locat ...@@ -175,8 +175,7 @@ static DWORD add_modifiers(DWORD modifiers, DWORD mod, const struct source_locat
hlsl_report_message(loc, HLSL_LEVEL_ERROR, "modifier '%s' already specified", debug_modifiers(mod)); hlsl_report_message(loc, HLSL_LEVEL_ERROR, "modifier '%s' already specified", debug_modifiers(mod));
return modifiers; return modifiers;
} }
if (mod & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR) if ((mod & HLSL_MODIFIERS_MAJORITY_MASK) && (modifiers & HLSL_MODIFIERS_MAJORITY_MASK))
&& modifiers & (HLSL_MODIFIER_ROW_MAJOR | HLSL_MODIFIER_COLUMN_MAJOR))
{ {
hlsl_report_message(loc, HLSL_LEVEL_ERROR, "more than one matrix majority keyword"); hlsl_report_message(loc, HLSL_LEVEL_ERROR, "more than one matrix majority keyword");
return modifiers; return modifiers;
......
...@@ -892,8 +892,8 @@ BOOL compare_hlsl_types(const struct hlsl_type *t1, const struct hlsl_type *t2) ...@@ -892,8 +892,8 @@ BOOL compare_hlsl_types(const struct hlsl_type *t1, const struct hlsl_type *t2)
return FALSE; return FALSE;
if (t1->base_type == HLSL_TYPE_SAMPLER && t1->sampler_dim != t2->sampler_dim) if (t1->base_type == HLSL_TYPE_SAMPLER && t1->sampler_dim != t2->sampler_dim)
return FALSE; return FALSE;
if ((t1->modifiers & HLSL_MODIFIERS_COMPARISON_MASK) if ((t1->modifiers & HLSL_MODIFIERS_MAJORITY_MASK)
!= (t2->modifiers & HLSL_MODIFIERS_COMPARISON_MASK)) != (t2->modifiers & HLSL_MODIFIERS_MAJORITY_MASK))
return FALSE; return FALSE;
if (t1->dimx != t2->dimx) if (t1->dimx != t2->dimx)
return FALSE; return FALSE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment