Revert "misc: chore: Remove redundant code"

This reverts commit 05a88ccc94.
This commit is contained in:
KeatonTheBot
2025-03-15 20:00:22 -05:00
parent 7960ea643f
commit efd5a104b6
109 changed files with 412 additions and 271 deletions
@@ -506,7 +506,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.MME
maxDrawCount,
stride,
indexCount,
IndirectDrawType.DrawIndexedIndirectCount);
Threed.IndirectDrawType.DrawIndexedIndirectCount);
}
/// <summary>
@@ -1,5 +1,6 @@
using Ryujinx.Common;
using Ryujinx.Graphics.GAL;
using System;
using System.Collections.Generic;
namespace Ryujinx.Graphics.Gpu.Engine.Threed.Blender
@@ -15,10 +15,10 @@ namespace Ryujinx.Graphics.Gpu.Engine.Threed
// State associated with direct uniform buffer updates.
// This state is used to attempt to batch together consecutive updates.
private ulong _ubBeginCpuAddress;
private ulong _ubFollowUpAddress;
private ulong _ubByteCount;
private int _ubIndex;
private ulong _ubBeginCpuAddress = 0;
private ulong _ubFollowUpAddress = 0;
private ulong _ubByteCount = 0;
private int _ubIndex = 0;
private readonly int[] _ubData = new int[UniformDataCacheSize];
/// <summary>
@@ -4,6 +4,7 @@ using Ryujinx.Graphics.Gpu.Memory;
using Ryujinx.Graphics.Shader;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
namespace Ryujinx.Graphics.Gpu.Image
+5 -5
View File
@@ -60,13 +60,13 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// <remarks>
/// This is null until at least one modification occurs.
/// </remarks>
private BufferModifiedRangeList _modifiedRanges;
private BufferModifiedRangeList _modifiedRanges = null;
/// <summary>
/// A structure that is used to flush buffer data back to a host mapped buffer for cached readback.
/// Only used if the buffer data is explicitly owned by device local memory.
/// </summary>
private BufferPreFlush _preFlush;
private BufferPreFlush _preFlush = null;
/// <summary>
/// Usage tracking state that determines what type of backing the buffer should use.
@@ -171,9 +171,9 @@ namespace Ryujinx.Graphics.Gpu.Memory
_memoryTracking.RegisterPreciseAction(PreciseAction);
}
_externalFlushDelegate = ExternalFlush;
_loadDelegate = LoadRegion;
_modifiedDelegate = RegionModified;
_externalFlushDelegate = new RegionSignal(ExternalFlush);
_loadDelegate = new Action<ulong, ulong>(LoadRegion);
_modifiedDelegate = new Action<ulong, ulong>(RegionModified);
_virtualDependenciesLock = new ReaderWriterLockSlim();
}
@@ -69,7 +69,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
}
private List<PhysicalDependency> _dependencies;
private BufferModifiedRangeList _modifiedRanges;
private BufferModifiedRangeList _modifiedRanges = null;
/// <summary>
/// Creates a new instance of the buffer.
@@ -2,6 +2,7 @@ using Ryujinx.Graphics.GAL;
using Ryujinx.Graphics.Gpu.Engine;
using Ryujinx.Graphics.Gpu.Image;
using Ryujinx.Graphics.Shader;
using System;
using System.Linq;
namespace Ryujinx.Graphics.Gpu.Shader