diff options
author | Jason Ekstrand <[email protected]> | 2018-07-23 22:20:41 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-08-23 21:47:51 -0500 |
commit | 8d8222461f9d7f497d657c2c0eff70820986429b (patch) | |
tree | 431e652e3f96fc721045384c73354e4db94a20de /src/intel/compiler/brw_nir.h | |
parent | 53072582dc9401c76bb8ef72d8f321f684fb0a15 (diff) |
intel/nir: Enable nir_opt_find_array_copies
We have to be a bit careful with this one because we want it to run in
the optimization loop but only in the first brw_nir_optimize call.
Later calls assume that we've lowered away copy_deref instructions and
we don't want to introduce any more.
Shader-db results on Kaby Lake:
total instructions in shared programs: 15176942 -> 15176942 (0.00%)
instructions in affected programs: 0 -> 0
helped: 0
HURT: 0
In spite of the lack of any shader-db improvement, this patch completely
eliminates spilling in the Batman: Arkham City tessellation shaders.
This is because we are now able to detect that the temporary array
created by DXVK for storing TCS inputs is a copy of the input arrays and
use indirect URB reads instead of making a copy of 4.5 KiB of input data
and then indirecting on it with if-ladders.
Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/intel/compiler/brw_nir.h')
-rw-r--r-- | src/intel/compiler/brw_nir.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/intel/compiler/brw_nir.h b/src/intel/compiler/brw_nir.h index 00b61731526..5c75ef2324a 100644 --- a/src/intel/compiler/brw_nir.h +++ b/src/intel/compiler/brw_nir.h @@ -153,7 +153,8 @@ bool brw_nir_opt_peephole_ffma(nir_shader *shader); nir_shader *brw_nir_optimize(nir_shader *nir, const struct brw_compiler *compiler, - bool is_scalar); + bool is_scalar, + bool allow_copies); #define BRW_NIR_FRAG_OUTPUT_INDEX_SHIFT 0 #define BRW_NIR_FRAG_OUTPUT_INDEX_MASK INTEL_MASK(0, 0) |