aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/IGpuAccessor.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-05-05 22:02:28 -0300
committerGitHub <noreply@github.com>2020-05-06 11:02:28 +1000
commitb8eb6abeccbd4a468214a4d2ad3a9b6e5e06973c (patch)
treecd3d71ebde0f4f32eb674778adae89c0efcb75df /Ryujinx.Graphics.Shader/IGpuAccessor.cs
parent7f500e7cae940958289abe1a3461e52684742053 (diff)
Refactor shader GPU state and memory access (#1203)
* Refactor shader GPU state and memory access * Fix NVDEC project build * Address PR feedback and add missing XML comments
Diffstat (limited to 'Ryujinx.Graphics.Shader/IGpuAccessor.cs')
-rw-r--r--Ryujinx.Graphics.Shader/IGpuAccessor.cs67
1 files changed, 67 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/IGpuAccessor.cs b/Ryujinx.Graphics.Shader/IGpuAccessor.cs
new file mode 100644
index 00000000..13281bf0
--- /dev/null
+++ b/Ryujinx.Graphics.Shader/IGpuAccessor.cs
@@ -0,0 +1,67 @@
+namespace Ryujinx.Graphics.Shader
+{
+ public interface IGpuAccessor
+ {
+ public void Log(string message)
+ {
+ // No default log output.
+ }
+
+ T MemoryRead<T>(ulong address) where T : unmanaged;
+
+ public int QueryComputeLocalSizeX()
+ {
+ return 1;
+ }
+
+ public int QueryComputeLocalSizeY()
+ {
+ return 1;
+ }
+
+ public int QueryComputeLocalSizeZ()
+ {
+ return 1;
+ }
+
+ public int QueryComputeLocalMemorySize()
+ {
+ return 0x1000;
+ }
+
+ public int QueryComputeSharedMemorySize()
+ {
+ return 0xc000;
+ }
+
+ public bool QueryIsTextureBuffer(int handle)
+ {
+ return false;
+ }
+
+ public bool QueryIsTextureRectangle(int handle)
+ {
+ return false;
+ }
+
+ public InputTopology QueryPrimitiveTopology()
+ {
+ return InputTopology.Points;
+ }
+
+ public int QueryStorageBufferOffsetAlignment()
+ {
+ return 16;
+ }
+
+ public bool QuerySupportsNonConstantTextureOffset()
+ {
+ return true;
+ }
+
+ public TextureFormat QueryTextureFormat(int handle)
+ {
+ return TextureFormat.R8G8B8A8Unorm;
+ }
+ }
+}