[Mesa-dev] [PATCH 5/6] i965: use nir_shader_gather_info() over do_set_program_inouts()

Kenneth Graunke kenneth at whitecape.org
Fri Nov 11 06:33:32 UTC 2016


On Thursday, October 27, 2016 1:00:47 PM PST Timothy Arceri wrote:
> This takes us one step closer to being able to drop the GLSL IR
> optimisation passes during linking in favour of the NIR passes.
> ---
>  src/mesa/drivers/dri/i965/brw_link.cpp  | 2 --
>  src/mesa/drivers/dri/i965/brw_program.c | 2 ++
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp
> index f75b384..12db8d4 100644
> --- a/src/mesa/drivers/dri/i965/brw_link.cpp
> +++ b/src/mesa/drivers/dri/i965/brw_link.cpp
> @@ -233,8 +233,6 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
>  
>        process_glsl_ir(brw, shProg, shader);
>  
> -      do_set_program_inouts(shader->ir, prog, shader->Stage);
> -
>        _mesa_copy_linked_program_data(shProg, shader);
>  
>        /* Make a pass over the IR to add state references for any built-in
> diff --git a/src/mesa/drivers/dri/i965/brw_program.c b/src/mesa/drivers/dri/i965/brw_program.c
> index 8f01502..c15c0b1 100644
> --- a/src/mesa/drivers/dri/i965/brw_program.c
> +++ b/src/mesa/drivers/dri/i965/brw_program.c
> @@ -105,6 +105,8 @@ brw_create_nir(struct brw_context *brw,
>     NIR_PASS(progress, nir, nir_lower_system_values);
>     NIR_PASS_V(nir, brw_nir_lower_uniforms, is_scalar);
>  
> +   nir_shader_gather_info(nir, nir_shader_get_entrypoint(nir));
> +
>     if (shader_prog) {
>        NIR_PASS_V(nir, nir_lower_samplers, shader_prog);
>        NIR_PASS_V(nir, nir_lower_atomics, shader_prog);
> 

Patches 5-6 are:
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20161110/dc84c281/attachment.sig>


More information about the mesa-dev mailing list