i965/link: Use prog->nir instead of creating a temporary
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>
This commit is contained in:
parent
006533d5ef
commit
2df897cf1f
|
@ -316,11 +316,10 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg)
|
|||
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;
|
||||
|
||||
|
|
Loading…
Reference in New Issue