mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
r600/sfn: Add a mapping table for atomics
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6025>
This commit is contained in:
parent
56dedf052f
commit
702619c412
3 changed files with 14 additions and 0 deletions
|
|
@ -174,6 +174,10 @@ bool EmitInstruction::inject_register(unsigned sel, unsigned swizzle,
|
|||
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 = {};
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@ protected:
|
|||
bool inject_register(unsigned sel, unsigned swizzle,
|
||||
const PValue& reg, bool map);
|
||||
|
||||
int remap_atomic_base(int base);
|
||||
|
||||
private:
|
||||
|
||||
ShaderFromNirProcessor& m_proc;
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@
|
|||
#include <vector>
|
||||
#include <set>
|
||||
#include <stack>
|
||||
#include <unordered_map>
|
||||
|
||||
struct nir_instr;
|
||||
|
||||
|
|
@ -85,6 +86,11 @@ public:
|
|||
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);
|
||||
|
|
@ -210,6 +216,8 @@ private:
|
|||
r600_pipe_shader_selector& m_sel;
|
||||
int m_atomic_base ;
|
||||
int m_image_count;
|
||||
|
||||
std::unordered_map<int, int> m_atomic_base_map;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue