mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-12-15 10:36:58 +00:00
Vulkan: remove InvalidResource workaround, as it is no longer needed since macOS Sonoma.
This commit is contained in:
parent
27479f17fb
commit
b0007af484
1 changed files with 0 additions and 19 deletions
|
|
@ -17,22 +17,10 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
DescriptorSetLayout[] layouts = new DescriptorSetLayout[setDescriptors.Count];
|
DescriptorSetLayout[] layouts = new DescriptorSetLayout[setDescriptors.Count];
|
||||||
bool[] updateAfterBindFlags = new bool[setDescriptors.Count];
|
bool[] updateAfterBindFlags = new bool[setDescriptors.Count];
|
||||||
|
|
||||||
bool isMoltenVk = false; // gd.IsMoltenVk
|
|
||||||
|
|
||||||
for (int setIndex = 0; setIndex < setDescriptors.Count; setIndex++)
|
for (int setIndex = 0; setIndex < setDescriptors.Count; setIndex++)
|
||||||
{
|
{
|
||||||
ResourceDescriptorCollection rdc = setDescriptors[setIndex];
|
ResourceDescriptorCollection rdc = setDescriptors[setIndex];
|
||||||
|
|
||||||
ResourceStages activeStages = ResourceStages.None;
|
|
||||||
|
|
||||||
if (isMoltenVk)
|
|
||||||
{
|
|
||||||
for (int descIndex = 0; descIndex < rdc.Descriptors.Count; descIndex++)
|
|
||||||
{
|
|
||||||
activeStages |= rdc.Descriptors[descIndex].Stages;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
DescriptorSetLayoutBinding[] layoutBindings = new DescriptorSetLayoutBinding[rdc.Descriptors.Count];
|
DescriptorSetLayoutBinding[] layoutBindings = new DescriptorSetLayoutBinding[rdc.Descriptors.Count];
|
||||||
|
|
||||||
bool hasArray = false;
|
bool hasArray = false;
|
||||||
|
|
@ -42,13 +30,6 @@ namespace Ryujinx.Graphics.Vulkan
|
||||||
ResourceDescriptor descriptor = rdc.Descriptors[descIndex];
|
ResourceDescriptor descriptor = rdc.Descriptors[descIndex];
|
||||||
ResourceStages stages = descriptor.Stages;
|
ResourceStages stages = descriptor.Stages;
|
||||||
|
|
||||||
if (descriptor.Type == ResourceType.StorageBuffer && isMoltenVk)
|
|
||||||
{
|
|
||||||
// There's a bug on MoltenVK where using the same buffer across different stages
|
|
||||||
// causes invalid resource errors, allow the binding on all active stages as workaround.
|
|
||||||
stages = activeStages;
|
|
||||||
}
|
|
||||||
|
|
||||||
layoutBindings[descIndex] = new DescriptorSetLayoutBinding
|
layoutBindings[descIndex] = new DescriptorSetLayoutBinding
|
||||||
{
|
{
|
||||||
Binding = (uint)descriptor.Binding,
|
Binding = (uint)descriptor.Binding,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue