aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Engine/Compute.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Engine/Compute.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Engine/Compute.cs28
1 files changed, 14 insertions, 14 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Compute.cs b/Ryujinx.Graphics.Gpu/Engine/Compute.cs
index be317a7f..a7f6ec06 100644
--- a/Ryujinx.Graphics.Gpu/Engine/Compute.cs
+++ b/Ryujinx.Graphics.Gpu/Engine/Compute.cs
@@ -40,7 +40,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
ulong gpuVa = (uint)qmd.ConstantBufferAddrLower(index) | (ulong)qmd.ConstantBufferAddrUpper(index) << 32;
ulong size = (ulong)qmd.ConstantBufferSize(index);
- BufferManager.SetComputeUniformBuffer(index, gpuVa, size);
+ state.Channel.BufferManager.SetComputeUniformBuffer(index, gpuVa, size);
}
ShaderBundle cs = ShaderCache.GetComputeShader(
@@ -57,9 +57,9 @@ namespace Ryujinx.Graphics.Gpu.Engine
var samplerPool = state.Get<PoolState>(MethodOffset.SamplerPoolState);
var texturePool = state.Get<PoolState>(MethodOffset.TexturePoolState);
- TextureManager.SetComputeSamplerPool(samplerPool.Address.Pack(), samplerPool.MaximumId, qmd.SamplerIndex);
- TextureManager.SetComputeTexturePool(texturePool.Address.Pack(), texturePool.MaximumId);
- TextureManager.SetComputeTextureBufferIndex(state.Get<int>(MethodOffset.TextureBufferIndex));
+ state.Channel.TextureManager.SetComputeSamplerPool(samplerPool.Address.Pack(), samplerPool.MaximumId, qmd.SamplerIndex);
+ state.Channel.TextureManager.SetComputeTexturePool(texturePool.Address.Pack(), texturePool.MaximumId);
+ state.Channel.TextureManager.SetComputeTextureBufferIndex(state.Get<int>(MethodOffset.TextureBufferIndex));
ShaderProgramInfo info = cs.Shaders[0].Info;
@@ -76,7 +76,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
continue;
}
- ulong cbDescAddress = BufferManager.GetComputeUniformBufferAddress(0);
+ ulong cbDescAddress = state.Channel.BufferManager.GetComputeUniformBufferAddress(0);
int cbDescOffset = 0x260 + (cb.Slot - 8) * 0x10;
@@ -84,14 +84,14 @@ namespace Ryujinx.Graphics.Gpu.Engine
SbDescriptor cbDescriptor = _context.PhysicalMemory.Read<SbDescriptor>(cbDescAddress);
- BufferManager.SetComputeUniformBuffer(cb.Slot, cbDescriptor.PackAddress(), (uint)cbDescriptor.Size);
+ state.Channel.BufferManager.SetComputeUniformBuffer(cb.Slot, cbDescriptor.PackAddress(), (uint)cbDescriptor.Size);
}
for (int index = 0; index < info.SBuffers.Count; index++)
{
BufferDescriptor sb = info.SBuffers[index];
- ulong sbDescAddress = BufferManager.GetComputeUniformBufferAddress(0);
+ ulong sbDescAddress = state.Channel.BufferManager.GetComputeUniformBufferAddress(0);
int sbDescOffset = 0x310 + sb.Slot * 0x10;
@@ -99,11 +99,11 @@ namespace Ryujinx.Graphics.Gpu.Engine
SbDescriptor sbDescriptor = _context.PhysicalMemory.Read<SbDescriptor>(sbDescAddress);
- BufferManager.SetComputeStorageBuffer(sb.Slot, sbDescriptor.PackAddress(), (uint)sbDescriptor.Size, sb.Flags);
+ state.Channel.BufferManager.SetComputeStorageBuffer(sb.Slot, sbDescriptor.PackAddress(), (uint)sbDescriptor.Size, sb.Flags);
}
- BufferManager.SetComputeStorageBufferBindings(info.SBuffers);
- BufferManager.SetComputeUniformBufferBindings(info.CBuffers);
+ state.Channel.BufferManager.SetComputeStorageBufferBindings(info.SBuffers);
+ state.Channel.BufferManager.SetComputeUniformBufferBindings(info.CBuffers);
var textureBindings = new TextureBindingInfo[info.Textures.Count];
@@ -121,7 +121,7 @@ namespace Ryujinx.Graphics.Gpu.Engine
descriptor.Flags);
}
- TextureManager.SetComputeTextures(textureBindings);
+ state.Channel.TextureManager.SetComputeTextures(textureBindings);
var imageBindings = new TextureBindingInfo[info.Images.Count];
@@ -141,10 +141,10 @@ namespace Ryujinx.Graphics.Gpu.Engine
descriptor.Flags);
}
- TextureManager.SetComputeImages(imageBindings);
+ state.Channel.TextureManager.SetComputeImages(imageBindings);
- TextureManager.CommitComputeBindings();
- BufferManager.CommitComputeBindings();
+ state.Channel.TextureManager.CommitComputeBindings();
+ state.Channel.BufferManager.CommitComputeBindings();
_context.Renderer.Pipeline.DispatchCompute(
qmd.CtaRasterWidth,