[Mesa-dev] [PATCH 02.5/11] i965/vec4: Stop pretending to support indirect output stores

Kenneth Graunke kenneth at whitecape.org
Fri Nov 27 19:23:10 PST 2015


On Thursday, November 26, 2015 12:10:15 AM Jason Ekstrand wrote:
> Since we're using nir_lower_outputs_to_temporaries to shadow all our
> outputs, it's impossible to actually get an indirect store.  The code we
> had to "handle" this was pretty bogus as it created a register with a
> reladdr and then stuffed it in a fixed varying slot without so much as a
> MOV.  Not only does this not do the MOV, it also puts the indirect on the
> wrong side of the transaction.  Let's just delete the broken dead code.
> ---
> 
> This was squashed into patch 3 but probably deserves its own patch.
> 
>  src/mesa/drivers/dri/i965/brw_vec4_nir.cpp | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> index 96787db..8e06d6b 100644
> --- a/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_vec4_nir.cpp
> @@ -393,21 +393,15 @@ vec4_visitor::nir_emit_intrinsic(nir_intrinsic_instr *instr)
>     }
>  
>     case nir_intrinsic_store_output_indirect:
> -      has_indirect = true;
> -      /* fallthrough */
> +      unreachable("nir_lower_outputs_to_temporaries should prevent this");
> +
>     case nir_intrinsic_store_output: {
>        int varying = instr->const_index[0];
>  
>        src = get_nir_src(instr->src[0], BRW_REGISTER_TYPE_F,
>                          instr->num_components);
> -      dest = dst_reg(src);
>  
> -      if (has_indirect) {
> -         dest.reladdr = new(mem_ctx) src_reg(get_nir_src(instr->src[1],
> -                                                         BRW_REGISTER_TYPE_D,
> -                                                         1));
> -      }
> -      output_reg[varying] = dest;
> +      output_reg[varying] = dst_reg(src);
>        break;
>     }
>  
> 

This patch is:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20151127/89fbc066/attachment.sig>


More information about the mesa-dev mailing list