diff options
author | Kenneth Graunke <[email protected]> | 2018-11-08 22:10:03 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2018-11-20 15:53:46 -0800 |
commit | 562448b75a7ab9035954d539dc3002a02e6263f8 (patch) | |
tree | 120b315b41ba225c79404d773f2ef45d46f61578 /src/intel/compiler/brw_vec4.cpp | |
parent | 6a10dd08f4311c9d46231269fb35f7cf8cb124c7 (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/intel/compiler/brw_vec4.cpp')
-rw-r--r-- | src/intel/compiler/brw_vec4.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/intel/compiler/brw_vec4.cpp b/src/intel/compiler/brw_vec4.cpp index 74a4d09fc79..6ed07b72f31 100644 --- a/src/intel/compiler/brw_vec4.cpp +++ b/src/intel/compiler/brw_vec4.cpp @@ -2828,12 +2828,11 @@ brw_compile_vs(const struct brw_compiler *compiler, void *log_data, void *mem_ctx, const struct brw_vs_prog_key *key, struct brw_vs_prog_data *prog_data, - const nir_shader *src_shader, + nir_shader *shader, int shader_time_index, char **error_str) { const bool is_scalar = compiler->scalar_stage[MESA_SHADER_VERTEX]; - nir_shader *shader = nir_shader_clone(mem_ctx, src_shader); shader = brw_nir_apply_sampler_key(shader, compiler, &key->tex, is_scalar); const unsigned *assembly = NULL; |