mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-27 17:10:08 +02:00
Memory Changes part 2
* Slightly refactors RangeLists from the last Memory Changes MR, which fixes issue 61. * Convert as many const size array iterators to span iterators as possible. When iterating over a const size array, every iteration created a Span, now only the first iteration does in most places. * Now using object pooling for a few object types that were rapidly deleted and recreated. * Converted a few flag checks to binary operations to save memory allocations.
This commit is contained in:
@@ -679,7 +679,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
var program = _program;
|
||||
|
||||
if (_dirty.HasFlag(DirtyFlags.Uniform))
|
||||
if ((_dirty & DirtyFlags.Uniform) == DirtyFlags.Uniform)
|
||||
{
|
||||
if (program.UsePushDescriptors)
|
||||
{
|
||||
@@ -691,12 +691,12 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
}
|
||||
}
|
||||
|
||||
if (_dirty.HasFlag(DirtyFlags.Storage))
|
||||
if ((_dirty & DirtyFlags.Storage) == DirtyFlags.Storage)
|
||||
{
|
||||
UpdateAndBind(cbs, program, PipelineBase.StorageSetIndex, pbp);
|
||||
}
|
||||
|
||||
if (_dirty.HasFlag(DirtyFlags.Texture))
|
||||
if ((_dirty & DirtyFlags.Texture) == DirtyFlags.Texture)
|
||||
{
|
||||
if (program.UpdateTexturesWithoutTemplate)
|
||||
{
|
||||
@@ -708,7 +708,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
}
|
||||
}
|
||||
|
||||
if (_dirty.HasFlag(DirtyFlags.Image))
|
||||
if ((_dirty & DirtyFlags.Image) == DirtyFlags.Image)
|
||||
{
|
||||
UpdateAndBind(cbs, program, PipelineBase.ImageSetIndex, pbp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user