diff options
| author | gdk <gab.dark.100@gmail.com> | 2019-10-17 23:41:18 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 1b7d95519569639135a68e7ebda5148f3263217c (patch) | |
| tree | 52a5e471418bf28ce970a268e1b86b64abc9048f /Ryujinx.Graphics.Gpu/Memory | |
| parent | 717ace6f6ed65118148dc78976c6e818a095fa4d (diff) | |
Initial support for image stores, support texture sample on compute
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Memory')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Memory/BufferManager.cs | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs index eb2e0ca9..3ceee206 100644 --- a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs @@ -272,7 +272,7 @@ namespace Ryujinx.Graphics.Gpu.Memory BufferRange buffer = GetBufferRange(bounds.Address, bounds.Size); - _context.Renderer.ComputePipeline.SetStorageBuffer(index, buffer); + _context.Renderer.Pipeline.BindStorageBuffer(index, ShaderStage.Compute, buffer); } enableMask = _cpUniformBuffers.EnableMask; @@ -293,7 +293,7 @@ namespace Ryujinx.Graphics.Gpu.Memory BufferRange buffer = GetBufferRange(bounds.Address, bounds.Size); - _context.Renderer.ComputePipeline.SetUniformBuffer(index, buffer); + _context.Renderer.Pipeline.BindUniformBuffer(index, ShaderStage.Compute, buffer); if (index == 0) { @@ -312,6 +312,9 @@ namespace Ryujinx.Graphics.Gpu.Memory buffer.Buffer.SetData(buffer.Offset, data); } } + + // Force rebind after doing compute work. + _rebind = true; } public void CommitBindings() @@ -324,7 +327,7 @@ namespace Ryujinx.Graphics.Gpu.Memory { BufferRange buffer = GetBufferRange(_indexBuffer.Address, _indexBuffer.Size); - _context.Renderer.GraphicsPipeline.BindIndexBuffer(buffer, _indexBuffer.Type); + _context.Renderer.Pipeline.BindIndexBuffer(buffer, _indexBuffer.Type); } } else if (_indexBuffer.Address != 0) @@ -352,7 +355,7 @@ namespace Ryujinx.Graphics.Gpu.Memory vertexBuffers[index] = new VertexBufferDescriptor(buffer, vb.Stride, vb.Divisor); } - _context.Renderer.GraphicsPipeline.BindVertexBuffers(vertexBuffers); + _context.Renderer.Pipeline.BindVertexBuffers(vertexBuffers); } else { @@ -445,15 +448,13 @@ namespace Ryujinx.Graphics.Gpu.Memory { BufferRange buffer = GetBufferRange(bounds.Address, bounds.Size); - BufferRange[] buffers = new BufferRange[] { buffer }; - if (isStorage) { - _context.Renderer.GraphicsPipeline.BindStorageBuffers(index, stage, buffers); + _context.Renderer.Pipeline.BindStorageBuffer(index, stage, buffer); } else { - _context.Renderer.GraphicsPipeline.BindUniformBuffers(index, stage, buffers); + _context.Renderer.Pipeline.BindUniformBuffer(index, stage, buffer); } if (!isStorage && index == 0) |
