diff options
author | Jason Ekstrand <[email protected]> | 2017-09-28 09:58:59 -0700 |
---|---|---|
committer | Jordan Justen <[email protected]> | 2017-09-28 16:20:41 -0700 |
commit | 2df897cf1ffd5ae01ecdbb66195d292a2a15df91 (patch) | |
tree | 7fac4ae95f494e55f9f44d2dc2b33a933b5c020c /src/mesa/drivers/dri/i965/brw_link.cpp | |
parent | 006533d5ef0914ae7be258dc5b7d47ba5339ca20 (diff) |
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.
[[email protected]: Tested NIR_TEST_CLONE=1 with valgrind]
Tested-by: Jordan Justen <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_link.cpp')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_link.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_link.cpp b/src/mesa/drivers/dri/i965/brw_link.cpp index dd6f895db07..1fe5ad66f54 100644 --- a/src/mesa/drivers/dri/i965/brw_link.cpp +++ b/src/mesa/drivers/dri/i965/brw_link.cpp @@ -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; |