[Mesa-dev] [PATCH] i965: Use NIR by default for vertex shaders on GEN8+
Kenneth Graunke
kenneth at whitecape.org
Thu May 7 17:35:30 PDT 2015
On Thursday, May 07, 2015 04:50:39 PM Jason Ekstrand wrote:
> GLSL IR vs. NIR shader-db results for SIMD8 vertex shaders on Broadwell:
>
> total instructions in shared programs: 2724483 -> 2711790 (-0.47%)
> instructions in affected programs: 1860859 -> 1848166 (-0.68%)
> helped: 4387
> HURT: 4758
> GAINED: 1499
>
> The gained programs are ARB vertext programs that were previously going
> through the vec4 backend. Now that we have prog_to_nir, ARB vertex
> programs can go through the scalar backend so they show up as "gained" in
> the shader-db results.
> ---
> src/mesa/drivers/dri/i965/brw_context.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
> index fd7420a..8615e5e 100644
> --- a/src/mesa/drivers/dri/i965/brw_context.c
> +++ b/src/mesa/drivers/dri/i965/brw_context.c
> @@ -588,7 +588,7 @@ brw_initialize_context_constants(struct brw_context *brw)
> ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].EmitNoIndirectTemp = true;
> ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].OptimizeForAOS = false;
>
> - if (brw_env_var_as_boolean("INTEL_USE_NIR", false))
> + if (brw_env_var_as_boolean("INTEL_USE_NIR", true))
> ctx->Const.ShaderCompilerOptions[MESA_SHADER_VERTEX].NirOptions = &nir_options;
> }
>
>
We definitely want to throw the switch before 10.6, so that all the
scalar backends are using NIR, and we'll be able to delete the
deprecated ones post-release.
Acked-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/20150507/3ced5be7/attachment.sig>
More information about the mesa-dev
mailing list