From 769c02235f489f02b1791e6e76dc8b3ab18028ee Mon Sep 17 00:00:00 2001 From: gdk Date: Fri, 8 Nov 2019 17:29:41 -0300 Subject: Add ATOMS, LDS, POPC, RED, STS and VOTE shader instructions, start changing the way how global memory is handled --- Ryujinx.Graphics.Gpu/Memory/BufferManager.cs | 34 ---------------------- Ryujinx.Graphics.Gpu/Memory/ConcurrentRangeList.cs | 2 -- Ryujinx.Graphics.Gpu/Memory/RangeList.cs | 16 ---------- 3 files changed, 52 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Memory') diff --git a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs index 1431bf41..78b7bc98 100644 --- a/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs +++ b/Ryujinx.Graphics.Gpu/Memory/BufferManager.cs @@ -298,23 +298,6 @@ namespace Ryujinx.Graphics.Gpu.Memory BufferRange buffer = GetBufferRange(bounds.Address, bounds.Size); _context.Renderer.Pipeline.BindUniformBuffer(index, ShaderStage.Compute, buffer); - - if (index == 0) - { - // TODO: Improve - Span data = _context.PhysicalMemory.Read(bounds.Address + 0x310, 0x100); - - Span words = MemoryMarshal.Cast(data); - - for (int offset = 0; offset < 0x40; offset += 4) - { - words[offset] &= 0x3f; - } - - buffer = GetBufferRange(bounds.Address + 0x310, 0x100); - - buffer.Buffer.SetData(buffer.Offset, data); - } } // Force rebind after doing compute work. @@ -460,23 +443,6 @@ namespace Ryujinx.Graphics.Gpu.Memory { _context.Renderer.Pipeline.BindUniformBuffer(index, stage, buffer); } - - if (!isStorage && index == 0) - { - // TODO: Improve - Span data = _context.PhysicalMemory.Read(bounds.Address + 0x110, 0x100); - - Span words = MemoryMarshal.Cast(data); - - for (int offset = 0; offset < 0x40; offset += 4) - { - words[offset] &= 0x3f; - } - - buffer = GetBufferRange(bounds.Address + 0x110, 0x100); - - buffer.Buffer.SetData(buffer.Offset, data); - } } public void CopyBuffer(GpuVa srcVa, GpuVa dstVa, ulong size) diff --git a/Ryujinx.Graphics.Gpu/Memory/ConcurrentRangeList.cs b/Ryujinx.Graphics.Gpu/Memory/ConcurrentRangeList.cs index 7bcb011c..6d7d1ce2 100644 --- a/Ryujinx.Graphics.Gpu/Memory/ConcurrentRangeList.cs +++ b/Ryujinx.Graphics.Gpu/Memory/ConcurrentRangeList.cs @@ -6,8 +6,6 @@ namespace Ryujinx.Graphics.Gpu.Memory { private List _items; - public int Count => _items.Count; - public ConcurrentRangeList() { _items = new List(); diff --git a/Ryujinx.Graphics.Gpu/Memory/RangeList.cs b/Ryujinx.Graphics.Gpu/Memory/RangeList.cs index 072fdfe8..e3435292 100644 --- a/Ryujinx.Graphics.Gpu/Memory/RangeList.cs +++ b/Ryujinx.Graphics.Gpu/Memory/RangeList.cs @@ -6,8 +6,6 @@ namespace Ryujinx.Graphics.Gpu.Memory { private List _items; - public int Count => _items.Count; - public RangeList() { _items = new List(); @@ -57,20 +55,6 @@ namespace Ryujinx.Graphics.Gpu.Memory return false; } - public bool CanExitEarly(ulong address, ulong size) - { - int index = BinarySearch(address, size); - - if (index >= 0) - { - T item = _items[index]; - - return address >= item.Address && address + size <= item.Address + item.Size; - } - - return false; - } - public T FindFirstOverlap(T item) { return FindFirstOverlap(item.Address, item.Size); -- cgit v1.2.3