i965: use nir_shader_gather_info() over do_set_program_inouts()
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 27 Oct 2016 01:22:36 +0000 (12:22 +1100)
committerTimothy Arceri <timothy.arceri@collabora.com>
Fri, 11 Nov 2016 09:39:09 +0000 (20:39 +1100)
This takes us one step closer to being able to drop the GLSL IR
optimisation passes during linking in favour of the NIR passes.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_link.cpp
src/mesa/drivers/dri/i965/brw_program.c

index f75b384d67356fe093390c7e0bcfc118767a9222..12db8d46497d25769ba0c41a51e2850e03111527 100644 (file)
@@ -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
index ffe4c277776a5843d8c4d39d8502008623d0d2e0..45f8603abd2bb71b183794007feeb4a2f622aa27 100644 (file)
@@ -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);