i965/spirv: Lower shared memory later
authorCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Thu, 8 Aug 2019 17:55:50 +0000 (10:55 -0700)
committerCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
Sun, 11 Aug 2019 05:15:35 +0000 (22:15 -0700)
commit925e9142bdd119bf371dbad2ec32e0c161e583e0
tree24a94bb81d602a08d0a7c1731453c41048c9d210
parent61d6be84f3e06fd8d0a4c958bb9c5a0f834313fa
i965/spirv: Lower shared memory later

Instead of asking spirv_to_nir to lower the workgroup (shared memory)
to offsets, keep them as derefs longer, then lower it later on.

Because Workgroup memory doesn't have explicit offsets, we need to set
those using nir_lower_vars_to_explicit_types before calling the I/O
lowering pass.

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