Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
return m_proc.inject_register(sel, swizzle, reg, map);
}
+int EmitInstruction::remap_atomic_base(int base)
+{
+ return m_proc.remap_atomic_base(base);
+}
const std::set<AluModifiers> EmitInstruction::empty = {};
bool inject_register(unsigned sel, unsigned swizzle,
const PValue& reg, bool map);
+ int remap_atomic_base(int base);
+
private:
ShaderFromNirProcessor& m_proc;
#include <vector>
#include <set>
#include <stack>
+#include <unordered_map>
struct nir_instr;
void evaluate_spi_sid(r600_shader_io &io);
enum chip_class get_chip_class() const;
+
+ int remap_atomic_base(int base) {
+ return m_atomic_base_map[base];
+ }
+
protected:
void set_var_address(nir_deref_instr *instr);
r600_pipe_shader_selector& m_sel;
int m_atomic_base ;
int m_image_count;
+
+ std::unordered_map<int, int> m_atomic_base_map;
};
}