mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-22 11:56:58 +02:00
shader: admit bounded multi-component formatted buffer loads
Co-authored-by: fxpw <fxpw@outlook.com>
This commit is contained in:
@@ -2637,7 +2637,8 @@ private:
|
||||
bool IndirectBufferAccess(const Inst& inst) const {
|
||||
const auto opcode = inst.GetOpcode();
|
||||
if (opcode != ValueOpcode::StoreBufferU32 && opcode != ValueOpcode::StoreBufferU8 &&
|
||||
opcode != ValueOpcode::StoreBufferU32x4 && opcode != ValueOpcode::LoadBufferU32x2) return false;
|
||||
opcode != ValueOpcode::StoreBufferU32x4 && opcode != ValueOpcode::LoadBufferU32x2 &&
|
||||
opcode != ValueOpcode::LoadBufferU32x3 && opcode != ValueOpcode::LoadBufferU32x4) return false;
|
||||
const auto index = inst.Flags<MemoryFlags>().index;
|
||||
if (index >= m_program.memory_info.size()) return false;
|
||||
const auto& memory = m_program.memory_info[index];
|
||||
@@ -2652,8 +2653,11 @@ private:
|
||||
if (opcode == ValueOpcode::StoreBufferU32x4)
|
||||
return memory.formatted && memory.data_bits == 32u && memory.data_dwords == 4u &&
|
||||
memory.component_count == 4u;
|
||||
return memory.formatted && memory.data_bits == 16u && memory.data_dwords == 2u &&
|
||||
memory.component_count == 4u;
|
||||
const auto components = BufferComponentCount(opcode);
|
||||
return memory.formatted && memory.data_dwords == components &&
|
||||
((memory.data_bits == 32u && memory.component_count == components) ||
|
||||
(opcode == ValueOpcode::LoadBufferU32x2 && memory.data_bits == 16u &&
|
||||
memory.component_count == 4u));
|
||||
}
|
||||
|
||||
bool MatchDescriptorTable(Inst& handle, const DescriptorSource& descriptor,
|
||||
|
||||
Reference in New Issue
Block a user