diff options
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_cs.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_gs.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_tcs.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_tes.c | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_vs.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 2 |
6 files changed, 7 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_cs.c b/src/mesa/drivers/dri/i965/brw_cs.c index 3ae54830f78..4d968c26656 100644 --- a/src/mesa/drivers/dri/i965/brw_cs.c +++ b/src/mesa/drivers/dri/i965/brw_cs.c @@ -58,7 +58,7 @@ brw_codegen_cs_prog(struct brw_context *brw, struct brw_cs_prog_data prog_data; bool start_busy = false; double start_time = 0; - nir_shader *nir = cp->program.nir; + nir_shader *nir = nir_shader_clone(mem_ctx, cp->program.nir); memset(&prog_data, 0, sizeof(prog_data)); diff --git a/src/mesa/drivers/dri/i965/brw_gs.c b/src/mesa/drivers/dri/i965/brw_gs.c index 55c2923bded..a35ce97db3e 100644 --- a/src/mesa/drivers/dri/i965/brw_gs.c +++ b/src/mesa/drivers/dri/i965/brw_gs.c @@ -89,7 +89,7 @@ brw_codegen_gs_prog(struct brw_context *brw, void *mem_ctx = ralloc_context(NULL); - nir_shader *nir = gp->program.nir; + nir_shader *nir = nir_shader_clone(mem_ctx, gp->program.nir); assign_gs_binding_table_offsets(devinfo, &gp->program, &prog_data); diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c b/src/mesa/drivers/dri/i965/brw_tcs.c index 6e60a44fc10..86c09b92168 100644 --- a/src/mesa/drivers/dri/i965/brw_tcs.c +++ b/src/mesa/drivers/dri/i965/brw_tcs.c @@ -84,7 +84,7 @@ brw_codegen_tcs_prog(struct brw_context *brw, struct brw_program *tcp, void *mem_ctx = ralloc_context(NULL); if (tcp) { - nir = tcp->program.nir; + nir = nir_shader_clone(mem_ctx, tcp->program.nir); } else { const nir_shader_compiler_options *options = ctx->Const.ShaderCompilerOptions[MESA_SHADER_TESS_CTRL].NirOptions; diff --git a/src/mesa/drivers/dri/i965/brw_tes.c b/src/mesa/drivers/dri/i965/brw_tes.c index 8f8f68530b7..567fed6f808 100644 --- a/src/mesa/drivers/dri/i965/brw_tes.c +++ b/src/mesa/drivers/dri/i965/brw_tes.c @@ -70,7 +70,6 @@ brw_codegen_tes_prog(struct brw_context *brw, const struct brw_compiler *compiler = brw->screen->compiler; const struct gen_device_info *devinfo = &brw->screen->devinfo; struct brw_stage_state *stage_state = &brw->tes.base; - nir_shader *nir = tep->program.nir; struct brw_tes_prog_data prog_data; bool start_busy = false; double start_time = 0; @@ -79,6 +78,8 @@ brw_codegen_tes_prog(struct brw_context *brw, void *mem_ctx = ralloc_context(NULL); + nir_shader *nir = nir_shader_clone(mem_ctx, tep->program.nir); + brw_assign_common_binding_table_offsets(devinfo, &tep->program, &prog_data.base.base, 0); diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c index d557e82f9fc..01ddf9a4851 100644 --- a/src/mesa/drivers/dri/i965/brw_vs.c +++ b/src/mesa/drivers/dri/i965/brw_vs.c @@ -174,7 +174,7 @@ brw_codegen_vs_prog(struct brw_context *brw, mem_ctx = ralloc_context(NULL); - nir_shader *nir = vp->program.nir; + nir_shader *nir = nir_shader_clone(mem_ctx, vp->program.nir); brw_assign_common_binding_table_offsets(devinfo, &vp->program, &prog_data.base.base, 0); diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 8ca6b9a84e9..536e47638e6 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -139,7 +139,7 @@ brw_codegen_wm_prog(struct brw_context *brw, bool start_busy = false; double start_time = 0; - nir_shader *nir = fp->program.nir; + nir_shader *nir = nir_shader_clone(mem_ctx, fp->program.nir); memset(&prog_data, 0, sizeof(prog_data)); |