This way, when NIR_PASS_V makes a clone of the shader (for testing
nir_clone), the new and lowered version gets re-assigned to prog->nir.
[jordan.l.justen@intel.com: Tested NIR_TEST_CLONE=1 with valgrind]
Tested-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
continue;
struct gl_program *prog = shader->Program;
- nir_shader *nir = shader->Program->nir;
- brw_shader_gather_info(nir, prog);
+ brw_shader_gather_info(prog->nir, prog);
- NIR_PASS_V(nir, nir_lower_samplers, shProg);
- NIR_PASS_V(nir, nir_lower_atomics, shProg);
+ NIR_PASS_V(prog->nir, nir_lower_samplers, shProg);
+ NIR_PASS_V(prog->nir, nir_lower_atomics, shProg);
infos[stage] = &prog->nir->info;