From cee712105850ac3385cd0091a923438167433f9f Mon Sep 17 00:00:00 2001
From: TSR Berry <20988865+TSRBerry@users.noreply.github.com>
Date: Sat, 8 Apr 2023 01:22:00 +0200
Subject: Move solution and projects to src
---
.../Memory/BufferCacheEntry.cs | 43 ++++++++++++++++++++++
1 file changed, 43 insertions(+)
create mode 100644 src/Ryujinx.Graphics.Gpu/Memory/BufferCacheEntry.cs
(limited to 'src/Ryujinx.Graphics.Gpu/Memory/BufferCacheEntry.cs')
diff --git a/src/Ryujinx.Graphics.Gpu/Memory/BufferCacheEntry.cs b/src/Ryujinx.Graphics.Gpu/Memory/BufferCacheEntry.cs
new file mode 100644
index 00000000..fa38b54e
--- /dev/null
+++ b/src/Ryujinx.Graphics.Gpu/Memory/BufferCacheEntry.cs
@@ -0,0 +1,43 @@
+namespace Ryujinx.Graphics.Gpu.Memory
+{
+ ///
+ /// A cached entry for easily locating a buffer that is used often internally.
+ ///
+ class BufferCacheEntry
+ {
+ ///
+ /// The CPU VA of the buffer destination.
+ ///
+ public ulong Address;
+
+ ///
+ /// The end GPU VA of the associated buffer, used to check if new data can fit.
+ ///
+ public ulong EndGpuAddress;
+
+ ///
+ /// The buffer associated with this cache entry.
+ ///
+ public Buffer Buffer;
+
+ ///
+ /// The UnmappedSequence of the buffer at the time of creation.
+ /// If this differs from the value currently in the buffer, then this cache entry is outdated.
+ ///
+ public int UnmappedSequence;
+
+ ///
+ /// Create a new cache entry.
+ ///
+ /// The CPU VA of the buffer destination
+ /// The GPU VA of the buffer destination
+ /// The buffer object containing the target buffer
+ public BufferCacheEntry(ulong address, ulong gpuVa, Buffer buffer)
+ {
+ Address = address;
+ EndGpuAddress = gpuVa + (buffer.EndAddress - address);
+ Buffer = buffer;
+ UnmappedSequence = buffer.UnmappedSequence;
+ }
+ }
+}
--
cgit v1.2.3