From 8b44eb1c981d7106be37107755c7c71c3c3c0ce4 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 7 Jul 2021 20:56:06 -0300 Subject: Separate GPU engines and make state follow official docs (part 1/2) (#2422) * Use DeviceState for compute and i2m * Migrate 2D class, more comments * Migrate DMA copy engine * Remove now unused code * Replace GpuState by GpuAccessorState on GpuAcessor, since compute no longer has a GpuState * More comments * Add logging (disabled) * Add back i2m on 3D engine --- Ryujinx.Graphics.Gpu/Engine/Methods.cs | 31 ++++++++----------------------- 1 file changed, 8 insertions(+), 23 deletions(-) (limited to 'Ryujinx.Graphics.Gpu/Engine/Methods.cs') diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index aaac9441..756d56d9 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -50,13 +50,8 @@ namespace Ryujinx.Graphics.Gpu.Engine state.RegisterCallback(MethodOffset.LaunchDma, LaunchDma); state.RegisterCallback(MethodOffset.LoadInlineData, LoadInlineData); - state.RegisterCallback(MethodOffset.Dispatch, Dispatch); - state.RegisterCallback(MethodOffset.SyncpointAction, IncrementSyncpoint); - state.RegisterCallback(MethodOffset.CopyBuffer, CopyBuffer); - state.RegisterCallback(MethodOffset.CopyTexture, CopyTexture); - state.RegisterCallback(MethodOffset.TextureBarrier, TextureBarrier); state.RegisterCallback(MethodOffset.TextureBarrierTiled, TextureBarrierTiled); @@ -956,24 +951,6 @@ namespace Ryujinx.Graphics.Gpu.Engine _context.Renderer.Pipeline.SetLogicOpState(logicOpState.Enable, logicOpState.LogicalOp); } - /// - /// Storage buffer address and size information. - /// - private struct SbDescriptor - { -#pragma warning disable CS0649 - public uint AddressLow; - public uint AddressHigh; - public int Size; - public int Padding; -#pragma warning restore CS0649 - - public ulong PackAddress() - { - return AddressLow | ((ulong)AddressHigh << 32); - } - } - /// /// Updates host shaders based on the guest GPU state. /// @@ -1088,6 +1065,14 @@ namespace Ryujinx.Graphics.Gpu.Engine _context.Renderer.Pipeline.SetProgram(gs.HostProgram); } + /// + /// Forces the shaders to be rebound on the next draw. + /// + public void ForceShaderUpdate() + { + _forceShaderUpdate = true; + } + /// /// Updates transform feedback buffer state based on the guest GPU state. /// -- cgit v1.2.3