mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-14 04:36:59 +00:00
Memory changes 2.2 (ryubing/ryujinx!143)
See merge request ryubing/ryujinx!143
This commit is contained in:
parent
4c9b48b754
commit
a60b2a0ba3
14 changed files with 242 additions and 239 deletions
|
|
@ -1,4 +1,5 @@
|
|||
using Ryujinx.Graphics.GAL;
|
||||
using Ryujinx.Memory.Range;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
|
@ -56,7 +57,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
|||
/// <param name="parent">Parent buffer</param>
|
||||
/// <param name="stage">Initial buffer stage</param>
|
||||
/// <param name="baseBuffers">Buffers to inherit state from</param>
|
||||
public BufferBackingState(GpuContext context, Buffer parent, BufferStage stage, List<Buffer> baseBuffers)
|
||||
public BufferBackingState(GpuContext context, Buffer parent, BufferStage stage, RangeItem<Buffer>[] baseBuffers)
|
||||
{
|
||||
_size = (int)parent.Size;
|
||||
_systemMemoryType = context.Capabilities.MemoryType;
|
||||
|
|
@ -72,7 +73,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
|||
|
||||
BufferStage storageFlags = stage & BufferStage.StorageMask;
|
||||
|
||||
if (parent.Size > DeviceLocalSizeThreshold && baseBuffers.Count == 0)
|
||||
if (parent.Size > DeviceLocalSizeThreshold && baseBuffers.Length == 0)
|
||||
{
|
||||
_desiredType = BufferBackingType.DeviceMemory;
|
||||
}
|
||||
|
|
@ -100,11 +101,11 @@ namespace Ryujinx.Graphics.Gpu.Memory
|
|||
// TODO: Might be nice to force atomic access to be device local for any stage.
|
||||
}
|
||||
|
||||
if (baseBuffers.Count != 0)
|
||||
if (baseBuffers.Length != 0)
|
||||
{
|
||||
foreach (Buffer buffer in baseBuffers)
|
||||
foreach (RangeItem<Buffer> item in baseBuffers)
|
||||
{
|
||||
CombineState(buffer.BackingState);
|
||||
CombineState(item.Value.BackingState);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue