r600/sfn: Handle chipclass with kcache allocation
Signed-off-by: Gert Wollny <gert.wollny@collabora.com> Reviewed-by: Filip Gawin <filip@gawin.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17822>
This commit is contained in:
@@ -337,10 +337,20 @@ bool Block::try_reserve_kcache(const AluInstr& instr)
|
||||
return true;
|
||||
}
|
||||
|
||||
void Block::set_chipclass(r600_chip_class chip_class)
|
||||
{
|
||||
if (chip_class < ISA_CC_EVERGREEN)
|
||||
s_max_kcache_banks = 2;
|
||||
else
|
||||
s_max_kcache_banks = 4;
|
||||
}
|
||||
|
||||
unsigned Block::s_max_kcache_banks = 4;
|
||||
|
||||
bool Block::try_reserve_kcache(const UniformValue& u,
|
||||
std::array<KCacheLine, 4>& kcache) const
|
||||
{
|
||||
const int kcache_banks = 4; // TODO: handle pre-evergreen
|
||||
const int kcache_banks = s_max_kcache_banks; // TODO: handle pre-evergreen
|
||||
|
||||
int bank = u.kcache_bank();
|
||||
int sel = (u.sel() - 512);
|
||||
|
@@ -210,6 +210,8 @@ public:
|
||||
|
||||
bool kcache_reservation_failed() const { return m_kcache_alloc_failed;}
|
||||
|
||||
static void set_chipclass(r600_chip_class chip_class);
|
||||
|
||||
private:
|
||||
bool try_reserve_kcache(const UniformValue& u,
|
||||
std::array<KCacheLine, 4>& kcache) const;
|
||||
@@ -231,7 +233,7 @@ private:
|
||||
|
||||
int m_lds_group_requirement{0};
|
||||
AluInstr *m_lds_group_start{nullptr};
|
||||
|
||||
static unsigned s_max_kcache_banks;
|
||||
};
|
||||
|
||||
class InstrWithVectorResult : public Instr {
|
||||
|
@@ -224,6 +224,7 @@ private:
|
||||
|
||||
Shader *schedule(Shader *original)
|
||||
{
|
||||
Block::set_chipclass(original->chip_class());
|
||||
AluGroup::set_chipclass(original->chip_class());
|
||||
|
||||
sfn_log << SfnLog::schedule << "Original shader\n";
|
||||
|
Reference in New Issue
Block a user