Allow any shader SSBO constant buffer slot and offset (#2237)
* Allow any shader SSBO constant buffer slot and offset * Fix slot value passed to SetUsedStorageBuffer on fallback case * Shader cache version * Ensure that the storage buffer source constant buffer offset is word aligned * Fix FirstBinding on GetUniformBufferDescriptors
This commit is contained in:
parent
1f5d881860
commit
aa021085cf
10 changed files with 194 additions and 52 deletions
|
@ -110,9 +110,9 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
|
||||
Operand BindingRangeCheck(int cbOffset, out Operand baseAddrLow)
|
||||
{
|
||||
baseAddrLow = Cbuf(0, cbOffset);
|
||||
Operand baseAddrHigh = Cbuf(0, cbOffset + 1);
|
||||
Operand size = Cbuf(0, cbOffset + 2);
|
||||
baseAddrLow = Cbuf(DriverReservedCb, cbOffset);
|
||||
Operand baseAddrHigh = Cbuf(DriverReservedCb, cbOffset + 1);
|
||||
Operand size = Cbuf(DriverReservedCb, cbOffset + 2);
|
||||
|
||||
Operand offset = PrependOperation(Instruction.Subtract, addrLow, baseAddrLow);
|
||||
Operand borrow = PrependOperation(Instruction.CompareLessU32, addrLow, baseAddrLow);
|
||||
|
@ -134,9 +134,10 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
|
||||
sbUseMask &= ~(1 << slot);
|
||||
|
||||
config.SetUsedStorageBuffer(slot, isWrite);
|
||||
|
||||
int cbOffset = GetStorageCbOffset(config.Stage, slot);
|
||||
slot = config.GetSbSlot(DriverReservedCb, (ushort)cbOffset);
|
||||
|
||||
config.SetUsedStorageBuffer(slot, isWrite);
|
||||
|
||||
Operand inRange = BindingRangeCheck(cbOffset, out Operand baseAddrLow);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue