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 <apinheiro@igalia.com>
This commit is contained in:
@@ -1189,7 +1189,7 @@ brw_compile_tes(const struct brw_compiler *compiler,
|
||||
const struct brw_tes_prog_key *key,
|
||||
const struct brw_vue_map *input_vue_map,
|
||||
struct brw_tes_prog_data *prog_data,
|
||||
const nir_shader *src_shader,
|
||||
nir_shader *nir,
|
||||
struct gl_program *prog,
|
||||
int shader_time_index,
|
||||
char **error_str)
|
||||
@@ -1198,7 +1198,6 @@ brw_compile_tes(const struct brw_compiler *compiler,
|
||||
const bool is_scalar = compiler->scalar_stage[MESA_SHADER_TESS_EVAL];
|
||||
const unsigned *assembly;
|
||||
|
||||
nir_shader *nir = nir_shader_clone(mem_ctx, src_shader);
|
||||
nir->info.inputs_read = key->inputs_read;
|
||||
nir->info.patch_inputs_read = key->patch_inputs_read;
|
||||
|
||||
|
Reference in New Issue
Block a user