<p dir="ltr"><br>
On May 7, 2015 5:38 PM, "Ian Romanick" <<a href="mailto:idr@freedesktop.org">idr@freedesktop.org</a>> wrote:<br>
><br>
> On 05/07/2015 04:50 PM, Jason Ekstrand wrote:<br>
> > GLSL IR vs. NIR shader-db results for SIMD8 vertex shaders on Broadwell:<br>
> ><br>
> > total instructions in shared programs: 2724483 -> 2711790 (-0.47%)<br>
> > instructions in affected programs: 1860859 -> 1848166 (-0.68%)<br>
> > helped: 4387<br>
> > HURT: 4758<br>
> > GAINED: 1499<br>
> ><br>
> > The gained programs are ARB vertext programs that were previously going<br>
> > through the vec4 backend. Now that we have prog_to_nir, ARB vertex<br>
> > programs can go through the scalar backend so they show up as "gained" in<br>
> > the shader-db results.<br>
><br>
> I thought we already did this... why didn't this happen when NIR became<br>
> the default for the FS backend? And has that reason (assuming there was<br>
> one) been resolved?</p>
<p dir="ltr">We couldn't do copy propagation of values in the attribute register file. That, it turn was blocked on reworking the LOAD_PAYLOAD instruction. I pushed a series this morning that fixed both of those and cut 7.5% off of all SIMD8 VS instructions when using NIR. It also helps GLSL IR but by only 1% or so.<br>
--Jason</p>
<p dir="ltr">> > ---<br>
> > src/mesa/drivers/dri/i965/brw_context.c | 2 +-<br>
> > 1 file changed, 1 insertion(+), 1 deletion(-)<br>
> ><br>
> > diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c<br>
> > index fd7420a..8615e5e 100644<br>
> > --- a/src/mesa/drivers/dri/i965/brw_context.c<br>
> > +++ b/src/mesa/drivers/dri/i965/brw_context.c<br>
> > @@ -588,7 +588,7 @@ brw_initialize_context_constants(struct brw_context *brw)<br>
> > ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoIndirectTemp = true;<br>
> > ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = false;<br>
> ><br>
> > - if (brw_env_var_as_boolean("INTEL_USE_NIR", false))<br>
> > + if (brw_env_var_as_boolean("INTEL_USE_NIR", true))<br>
> > ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].NirOptions = &nir_options;<br>
> > }<br>
> ><br>
><br>
</p>