[Mesa-dev] [PATCH 02/44] nir: Get rid of the variable on vote intrinsics

Lionel Landwerlin lionel.g.landwerlin at intel.com
Tue Oct 3 17:14:54 UTC 2017


Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>

On 05/09/17 16:12, Jason Ekstrand wrote:
> This looks like a copy+paste error.  They don't actually write into that
> variable as would be implied by putting the return there.
> ---
>   src/compiler/glsl/glsl_to_nir.cpp | 2 --
>   src/compiler/nir/nir_intrinsics.h | 6 +++---
>   2 files changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp
> index bb2ba17..c984c16 100644
> --- a/src/compiler/glsl/glsl_to_nir.cpp
> +++ b/src/compiler/glsl/glsl_to_nir.cpp
> @@ -1165,8 +1165,6 @@ nir_visitor::visit(ir_call *ir)
>         case nir_intrinsic_vote_eq: {
>            nir_ssa_dest_init(&instr->instr, &instr->dest, 1, 32, NULL);
>   
> -         instr->variables[0] = evaluate_deref(&instr->instr, ir->return_deref);
> -
>            ir_rvalue *value = (ir_rvalue *) ir->actual_parameters.get_head();
>            instr->src[0] = nir_src_for_ssa(evaluate_rvalue(value));
>   
> diff --git a/src/compiler/nir/nir_intrinsics.h b/src/compiler/nir/nir_intrinsics.h
> index ea51525..0de7080 100644
> --- a/src/compiler/nir/nir_intrinsics.h
> +++ b/src/compiler/nir/nir_intrinsics.h
> @@ -121,9 +121,9 @@ BARRIER(memory_barrier_shared)
>   INTRINSIC(discard_if, 1, ARR(1), false, 0, 0, 0, xx, xx, xx, 0)
>   
>   /** ARB_shader_group_vote intrinsics */
> -INTRINSIC(vote_any, 1, ARR(1), true, 1, 1, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
> -INTRINSIC(vote_all, 1, ARR(1), true, 1, 1, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
> -INTRINSIC(vote_eq,  1, ARR(1), true, 1, 1, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
> +INTRINSIC(vote_any, 1, ARR(1), true, 1, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
> +INTRINSIC(vote_all, 1, ARR(1), true, 1, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
> +INTRINSIC(vote_eq,  1, ARR(1), true, 1, 0, 0, xx, xx, xx, NIR_INTRINSIC_CAN_ELIMINATE)
>   
>   /**
>    * Basic Geometry Shader intrinsics.




More information about the mesa-dev mailing list