diff options
author | Eduardo Lima Mitev <[email protected]> | 2019-01-13 20:10:34 +0100 |
---|---|---|
committer | Eduardo Lima Mitev <[email protected]> | 2019-03-13 21:19:44 +0100 |
commit | 9dd0cfafc9ec4b4efb1e2df0329afc7a5a534231 (patch) | |
tree | 0752c6c7dcdcaec22ab5c4330d69196e6dc653ed /src/freedreno/ir3/ir3_nir.h | |
parent | 6ff50a488a12f86069bff88e3ad1b6473a76f014 (diff) |
ir3/nir: Add a new pass 'ir3_nir_lower_io_offsets'
This NIR->NIR pass implements offset computations that are currently
done on the IR3 backend compiler, to give NIR a better chance of
optimizing them.
For now, it supports lowering the dword-offset computation for SSBO
instructions. It will take an SSBO intrinsic and replace it with the
new ir3-specific version that adds an extra source. That source will
hold the SSA value resulting from inserting a division by 4 (an SHR op)
of the original byte-offset source already provided by NIR in one of
the intrinsic sources.
Note that on a6xx the original byte-offset is not needed, so we could
potentially replace that source instead of adding a new one. But to
keep things simple and consistent we always add the new source and
a6xx will just ignore the original one.
Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/freedreno/ir3/ir3_nir.h')
-rw-r--r-- | src/freedreno/ir3/ir3_nir.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/freedreno/ir3/ir3_nir.h b/src/freedreno/ir3/ir3_nir.h index 74201d34160..7983b74af2c 100644 --- a/src/freedreno/ir3/ir3_nir.h +++ b/src/freedreno/ir3/ir3_nir.h @@ -36,6 +36,7 @@ void ir3_nir_scan_driver_consts(nir_shader *shader, struct ir3_driver_const_layo bool ir3_nir_apply_trig_workarounds(nir_shader *shader); bool ir3_nir_lower_tg4_to_tex(nir_shader *shader); +bool ir3_nir_lower_io_offsets(nir_shader *shader); const nir_shader_compiler_options * ir3_get_compiler_options(struct ir3_compiler *compiler); bool ir3_key_lowers_nir(const struct ir3_shader_key *key); |