From 44d7fcff399888d311f61772a53146d924ee5b62 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Fri, 29 May 2020 05:51:10 -0300 Subject: Implement FIFO semaphore (#1286) * Implement FIFO semaphore * New enum for FIFO semaphore operation --- Ryujinx.Graphics.Gpu/State/FifoSemaphoreOperation.cs | 9 +++++++++ Ryujinx.Graphics.Gpu/State/MethodOffset.cs | 3 ++- Ryujinx.Graphics.Gpu/State/ReportMode.cs | 12 ------------ Ryujinx.Graphics.Gpu/State/ReportState.cs | 14 -------------- Ryujinx.Graphics.Gpu/State/SemaphoreOperation.cs | 12 ++++++++++++ Ryujinx.Graphics.Gpu/State/SemaphoreState.cs | 14 ++++++++++++++ 6 files changed, 37 insertions(+), 27 deletions(-) create mode 100644 Ryujinx.Graphics.Gpu/State/FifoSemaphoreOperation.cs delete mode 100644 Ryujinx.Graphics.Gpu/State/ReportMode.cs delete mode 100644 Ryujinx.Graphics.Gpu/State/ReportState.cs create mode 100644 Ryujinx.Graphics.Gpu/State/SemaphoreOperation.cs create mode 100644 Ryujinx.Graphics.Gpu/State/SemaphoreState.cs (limited to 'Ryujinx.Graphics.Gpu/State') diff --git a/Ryujinx.Graphics.Gpu/State/FifoSemaphoreOperation.cs b/Ryujinx.Graphics.Gpu/State/FifoSemaphoreOperation.cs new file mode 100644 index 00000000..a6ccdcfe --- /dev/null +++ b/Ryujinx.Graphics.Gpu/State/FifoSemaphoreOperation.cs @@ -0,0 +1,9 @@ +namespace Ryujinx.Graphics.Gpu.State +{ + enum FifoSemaphoreOperation + { + Counter = 0, + Acquire = 1, + Release = 2 + } +} diff --git a/Ryujinx.Graphics.Gpu/State/MethodOffset.cs b/Ryujinx.Graphics.Gpu/State/MethodOffset.cs index b39ff9b5..da54a469 100644 --- a/Ryujinx.Graphics.Gpu/State/MethodOffset.cs +++ b/Ryujinx.Graphics.Gpu/State/MethodOffset.cs @@ -8,7 +8,8 @@ namespace Ryujinx.Graphics.Gpu.State /// enum MethodOffset { - BindChannel = 0x00, + BindChannel = 0x0, + Semaphore = 0x4, FenceValue = 0x1c, FenceAction = 0x1d, WaitForIdle = 0x44, diff --git a/Ryujinx.Graphics.Gpu/State/ReportMode.cs b/Ryujinx.Graphics.Gpu/State/ReportMode.cs deleted file mode 100644 index 0625f3f6..00000000 --- a/Ryujinx.Graphics.Gpu/State/ReportMode.cs +++ /dev/null @@ -1,12 +0,0 @@ -namespace Ryujinx.Graphics.Gpu.State -{ - /// - /// GPU counter report mode. - /// - enum ReportMode - { - Release = 0, - Acquire = 1, - Counter = 2 - } -} \ No newline at end of file diff --git a/Ryujinx.Graphics.Gpu/State/ReportState.cs b/Ryujinx.Graphics.Gpu/State/ReportState.cs deleted file mode 100644 index 0c14bfe9..00000000 --- a/Ryujinx.Graphics.Gpu/State/ReportState.cs +++ /dev/null @@ -1,14 +0,0 @@ -namespace Ryujinx.Graphics.Gpu.State -{ - /// - /// GPU counter report state. - /// - struct ReportState - { -#pragma warning disable CS0649 - public GpuVa Address; - public int Payload; - public uint Control; -#pragma warning restore CS0649 - } -} diff --git a/Ryujinx.Graphics.Gpu/State/SemaphoreOperation.cs b/Ryujinx.Graphics.Gpu/State/SemaphoreOperation.cs new file mode 100644 index 00000000..67f3c127 --- /dev/null +++ b/Ryujinx.Graphics.Gpu/State/SemaphoreOperation.cs @@ -0,0 +1,12 @@ +namespace Ryujinx.Graphics.Gpu.State +{ + /// + /// GPU semaphore operation. + /// + enum SemaphoreOperation + { + Release = 0, + Acquire = 1, + Counter = 2 + } +} \ No newline at end of file diff --git a/Ryujinx.Graphics.Gpu/State/SemaphoreState.cs b/Ryujinx.Graphics.Gpu/State/SemaphoreState.cs new file mode 100644 index 00000000..bfc5720a --- /dev/null +++ b/Ryujinx.Graphics.Gpu/State/SemaphoreState.cs @@ -0,0 +1,14 @@ +namespace Ryujinx.Graphics.Gpu.State +{ + /// + /// GPU semaphore state. + /// + struct SemaphoreState + { +#pragma warning disable CS0649 + public GpuVa Address; + public int Payload; + public uint Control; +#pragma warning restore CS0649 + } +} -- cgit v1.2.3