GAL ResourceUsage Changes

TODO: Guest Barrier Defer
This commit is contained in:
Isaac Marovitz 2024-07-19 19:39:58 +01:00
parent 02b9b92723
commit a8794b2d58
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
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;
}