i965: move brw_nir_lower_gl_images call
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 5 Sep 2018 10:39:35 +0000 (12:39 +0200)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 5 Sep 2018 15:02:28 +0000 (17:02 +0200)
commit8969777686307c5649916d0e2d1024ae1e1af1ce
treeb39057f38c22514fae950740f754cddad419be09
parent2a6182fe06731b09d89cdd819e887606d683ed2f
i965: move brw_nir_lower_gl_images call

At this moment that lowering is using info coming from the
UniformStorage, so for the ARB_gl_spirv codepath, it needs to be done
after calling gl_nir_link_uniforms. As for the GLSL codepath it can
also be called later, we just move the call on both cases, to avoid
adding several shader->spirv_data checks, and keep the patch as small
as possible.

This is the first patch needed to fix the following piglit tests:

  tests/spec/arb_gl_spirv/linker/uniform/multisampler.shader_test
  tests/spec/arb_gl_spirv/linker/uniform/multisampler-array.shader_test

but fixes thousands of tests when borrowing the tests from other specs
(that needs to be done manually right now).

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/mesa/drivers/dri/i965/brw_link.cpp
src/mesa/drivers/dri/i965/brw_program.c