intel/compiler: Combine nir_emit_{ssbo,shared}_atomic into one helper

These are basically identical save for:
- shared has surface hardcoded to SLM rather than an SSBO index
- shared has to handle adding the 'base' const_index (SSBO have none)
- the NIR source index for data is shifted by one

It's not worth copy and pasting the entire function for this.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20604>
This commit is contained in:
Kenneth Graunke
2023-01-09 16:23:08 -08:00
committed by Marge Bot
parent b84939c678
commit 03ddde1230
2 changed files with 31 additions and 79 deletions

View File

@@ -359,10 +359,9 @@ public:
nir_intrinsic_instr *instr);
void nir_emit_tes_intrinsic(const brw::fs_builder &bld,
nir_intrinsic_instr *instr);
void nir_emit_ssbo_atomic(const brw::fs_builder &bld,
nir_intrinsic_instr *instr);
void nir_emit_shared_atomic(const brw::fs_builder &bld,
nir_intrinsic_instr *instr);
void nir_emit_surface_atomic(const brw::fs_builder &bld,
nir_intrinsic_instr *instr,
fs_reg surface);
void nir_emit_global_atomic(const brw::fs_builder &bld,
nir_intrinsic_instr *instr);
void nir_emit_global_atomic_float(const brw::fs_builder &bld,