GAL ResourceUsage Changes

TODO: Guest Barrier Defer
This commit is contained in:
Isaac Marovitz 2024-07-19 19:39:58 +01:00 committed by Isaac Marovitz
parent 9f2c99fcfa
commit 1287098b8b
2 changed files with 3 additions and 3 deletions

View file

@ -71,7 +71,7 @@ namespace Ryujinx.Graphics.Metal
var strideChangeResourceLayout = new ResourceLayoutBuilder()
.Add(ResourceStages.Compute, ResourceType.UniformBuffer, 0)
.Add(ResourceStages.Compute, ResourceType.StorageBuffer, 1)
.Add(ResourceStages.Compute, ResourceType.StorageBuffer, 2).Build();
.Add(ResourceStages.Compute, ResourceType.StorageBuffer, 2, true).Build();
var strideChangeSource = ReadMsl("ChangeBufferStride.metal");
_programStrideChange = new Program(

View file

@ -25,7 +25,7 @@ namespace Ryujinx.Graphics.Metal
}
}
public ResourceLayoutBuilder Add(ResourceStages stages, ResourceType type, int binding)
public ResourceLayoutBuilder Add(ResourceStages stages, ResourceType type, int binding, bool write = false)
{
int setIndex = type switch
{
@ -37,7 +37,7 @@ namespace Ryujinx.Graphics.Metal
};
_resourceDescriptors[setIndex].Add(new ResourceDescriptor(binding, 1, type, stages));
_resourceUsages[setIndex].Add(new ResourceUsage(binding, 1, type, stages));
_resourceUsages[setIndex].Add(new ResourceUsage(binding, 1, type, stages, write));
return this;
}