aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_cs.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2018-11-08 22:10:03 -0800
committerKenneth Graunke <[email protected]>2018-11-20 15:53:46 -0800
commit562448b75a7ab9035954d539dc3002a02e6263f8 (patch)
tree120b315b41ba225c79404d773f2ef45d46f61578 /src/mesa/drivers/dri/i965/brw_cs.c
parent6a10dd08f4311c9d46231269fb35f7cf8cb124c7 (diff)
i965: Do NIR shader cloning in the caller.
This moves nir_shader_clone() to the driver-specific compile function, rather than the shared src/intel/compiler code. This allows i965 to do key-specific passes before calling brw_compile_*. Vulkan should not need this cloning as it doesn't compile multiple variants. We do need to continue cloning in the compute shader code because we lower various things in NIR based on the SIMD width. Reviewed-by: Alejandro PiƱeiro <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_cs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_cs.c2
1 files changed, 1 insertions, 1 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));