Re: [Mesa-dev] [PATCH] ac/nir_to_llvm: add missing parentheses in get_inst_tessfactor_writemask()

2019-01-07 Thread Timothy Arceri

On 8/1/19 10:50 am, Bas Nieuwenhuizen wrote:

I think this got fixed by
https://gitlab.freedesktop.org/mesa/mesa/commit/be6cee51c06dc72ac159bd75b4201c61952515bd
already?


ok thanks. Hadn't pulled that one in yet.



On Tue, Jan 8, 2019 at 12:28 AM Timothy Arceri  wrote:


Cc: Marek Olšák 
---
  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

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH] ac/nir_to_llvm: add missing parentheses in get_inst_tessfactor_writemask()

2019-01-07 Thread Bas Nieuwenhuizen
I think this got fixed by
https://gitlab.freedesktop.org/mesa/mesa/commit/be6cee51c06dc72ac159bd75b4201c61952515bd
already?

On Tue, Jan 8, 2019 at 12:28 AM Timothy Arceri  wrote:
>
> Cc: Marek Olšák 
> ---
>  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
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] ac/nir_to_llvm: add missing parentheses in get_inst_tessfactor_writemask()

2019-01-07 Thread Timothy Arceri
Cc: Marek Olšák 
---
 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

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev