From 562448b75a7ab9035954d539dc3002a02e6263f8 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Thu, 8 Nov 2018 22:10:03 -0800 Subject: i965: Do NIR shader cloning in the caller. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- src/intel/compiler/brw_vec4_tcs.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/intel/compiler/brw_vec4_tcs.cpp') diff --git a/src/intel/compiler/brw_vec4_tcs.cpp b/src/intel/compiler/brw_vec4_tcs.cpp index 18c6dae8c10..be0969dda12 100644 --- a/src/intel/compiler/brw_vec4_tcs.cpp +++ b/src/intel/compiler/brw_vec4_tcs.cpp @@ -378,7 +378,7 @@ brw_compile_tcs(const struct brw_compiler *compiler, void *mem_ctx, const struct brw_tcs_prog_key *key, struct brw_tcs_prog_data *prog_data, - const nir_shader *src_shader, + nir_shader *nir, int shader_time_index, char **error_str) { @@ -387,7 +387,6 @@ brw_compile_tcs(const struct brw_compiler *compiler, const bool is_scalar = compiler->scalar_stage[MESA_SHADER_TESS_CTRL]; const unsigned *assembly; - nir_shader *nir = nir_shader_clone(mem_ctx, src_shader); nir->info.outputs_written = key->outputs_written; nir->info.patch_outputs_written = key->patch_outputs_written; -- cgit v1.2.3