misc: chore: Fix object creation in Gpu project

This commit is contained in:
Evan Husted 2025-01-26 15:18:04 -06:00
parent 4e47c86f90
commit 929a16dd26
18 changed files with 231 additions and 231 deletions

View file

@ -663,7 +663,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// <param name="overlapsCount">Total of overlaps</param>
private void CreateBufferAligned(ulong address, ulong size, BufferStage stage, bool sparseCompatible, Buffer[] overlaps, int overlapsCount)
{
Buffer newBuffer = new Buffer(_context, _physicalMemory, address, size, stage, sparseCompatible, overlaps.Take(overlapsCount));
Buffer newBuffer = new(_context, _physicalMemory, address, size, stage, sparseCompatible, overlaps.Take(overlapsCount));
lock (_buffers)
{

View file

@ -431,7 +431,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
BufferMigration oldMigration = ranges._source;
BufferMigrationSpan span = new BufferMigrationSpan(ranges._parent, ranges._flushAction, oldMigration);
BufferMigrationSpan span = new(ranges._parent, ranges._flushAction, oldMigration);
ranges._parent.IncrementReferenceCount();
if (_source == null)

View file

@ -73,7 +73,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
if (binding >= 0)
{
BufferRange range = new BufferRange(_handle, 0, data.Length);
BufferRange range = new(_handle, 0, data.Length);
_renderer.Pipeline.SetUniformBuffers(stackalloc[] { new BufferAssignment(0, range) });
}
};

View file

@ -458,7 +458,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
int pages = (int)((endVaRounded - va) / PageSize);
List<MemoryRange> regions = new List<MemoryRange>();
List<MemoryRange> regions = new();
for (int page = 0; page < pages - 1; page++)
{

View file

@ -19,7 +19,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
/// <param name="renderer">Renderer that the support buffer will be used with</param>
public SupportBufferUpdater(IRenderer renderer) : base(renderer)
{
Vector4<float> defaultScale = new Vector4<float> { X = 1f, Y = 0f, Z = 0f, W = 0f };
Vector4<float> defaultScale = new() { X = 1f, Y = 0f, Z = 0f, W = 0f };
_data.RenderScale.AsSpan().Fill(defaultScale);
DirtyRenderScale(0, SupportBuffer.RenderScaleMaxCount);
}