[Mesa-dev] [PATCH] ac/nir_to_llvm: add missing parentheses in get_inst_tessfactor_writemask()
Timothy Arceri
tarceri at itsqueeze.com
Mon Jan 7 23:28:41 UTC 2019
Cc: Marek Olšák <maraeo at gmail.com>
---
src/amd/common/ac_nir_to_llvm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/amd/common/ac_nir_to_llvm.c b/src/amd/common/ac_nir_to_llvm.c
index 84dbe17457..c9e11142eb 100644
--- a/src/amd/common/ac_nir_to_llvm.c
+++ b/src/amd/common/ac_nir_to_llvm.c
@@ -4086,9 +4086,9 @@ get_inst_tessfactor_writemask(nir_intrinsic_instr *intrin)
unsigned num_comps = intrin->dest.ssa.num_components;
if (location == VARYING_SLOT_TESS_LEVEL_INNER)
- writemask = ((1 << num_comps + 1) - 1) << first_component;
+ writemask = ((1 << (num_comps + 1)) - 1) << first_component;
else if (location == VARYING_SLOT_TESS_LEVEL_OUTER)
- writemask = (((1 << num_comps + 1) - 1) << first_component) << 4;
+ writemask = (((1 << (num_comps + 1)) - 1) << first_component) << 4;
return writemask;
}
--
2.20.1
More information about the mesa-dev
mailing list