0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-22 22:45:46 +00:00

Fix logic surrounding PushDescriptors in Vulkan (#257)

This commit is contained in:
Jonas Henriksson 2024-11-29 00:00:12 +01:00 committed by GitHub
parent baf179efdb
commit 8a2b56cae6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -183,6 +183,16 @@ namespace Ryujinx.Graphics.Vulkan
} }
} }
//Prevent the sum of descriptors from exceeding MaxPushDescriptors
int totalDescriptors = 0;
foreach (ResourceDescriptor desc in layout.Sets.First().Descriptors)
{
if (!reserved.Contains(desc.Binding))
totalDescriptors += desc.Count;
}
if (totalDescriptors > gd.Capabilities.MaxPushDescriptors)
return false;
return true; return true;
} }