diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2023-05-05 11:20:20 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-05 14:20:20 +0000 |
| commit | aa021085cfab10ab63a7e6c2f9c9e29b4111525c (patch) | |
| tree | bbf192b3c321110fa6abd6f8bcd7c429119daa93 /src/Ryujinx.Graphics.Gpu/Engine | |
| parent | 1f5d8818609a82df893167a8ec5bd6ccda406c61 (diff) | |
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
Diffstat (limited to 'src/Ryujinx.Graphics.Gpu/Engine')
| -rw-r--r-- | src/Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs | 7 | ||||
| -rw-r--r-- | src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs b/src/Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs index 2ac738fd..4ec23c79 100644 --- a/src/Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs +++ b/src/Ryujinx.Graphics.Gpu/Engine/Compute/ComputeClass.cs @@ -157,11 +157,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Compute { BufferDescriptor sb = info.SBuffers[index]; - ulong sbDescAddress = _channel.BufferManager.GetComputeUniformBufferAddress(0); - - int sbDescOffset = 0x310 + sb.Slot * 0x10; - - sbDescAddress += (ulong)sbDescOffset; + ulong sbDescAddress = _channel.BufferManager.GetComputeUniformBufferAddress(sb.SbCbSlot); + sbDescAddress += (ulong)sb.SbCbOffset * 4; SbDescriptor sbDescriptor = _channel.MemoryManager.Physical.Read<SbDescriptor>(sbDescAddress); diff --git a/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs b/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs index 00e09a31..1c9bf1d2 100644 --- a/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs +++ b/src/Ryujinx.Graphics.Gpu/Engine/Threed/StateUpdater.cs @@ -351,11 +351,8 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed { BufferDescriptor sb = info.SBuffers[index]; - ulong sbDescAddress = _channel.BufferManager.GetGraphicsUniformBufferAddress(stage, 0); - - int sbDescOffset = 0x110 + stage * 0x100 + sb.Slot * 0x10; - - sbDescAddress += (ulong)sbDescOffset; + ulong sbDescAddress = _channel.BufferManager.GetGraphicsUniformBufferAddress(stage, sb.SbCbSlot); + sbDescAddress += (ulong)sb.SbCbOffset * 4; SbDescriptor sbDescriptor = _channel.MemoryManager.Physical.Read<SbDescriptor>(sbDescAddress); |
