mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2025-08-30 07:25:05 +00:00
Prevent the use of PushDescriptors when it will violate vulkan MaxPushDescriptors limitation.
This commit is contained in:
parent
6de3afc43d
commit
2c43ca4f28
1 changed files with 6 additions and 0 deletions
|
|
@ -170,6 +170,12 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
bool hasBinding3 = uniformUsage.Any(x => x.Binding == 3);
|
||||
int[] reserved = isCompute ? Array.Empty<int>() : gd.GetPushDescriptorReservedBindings(hasBinding3);
|
||||
|
||||
//Prevent the sum of descriptors from exceeding MaxPushDescriptors
|
||||
if (layout.Sets.First().Descriptors.Where(descriptor => !reserved.Contains(descriptor.Binding)).Sum(descriptor => descriptor.Count) > gd.Capabilities.MaxPushDescriptors)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// Can't use any of the reserved usages.
|
||||
for (int i = 0; i < uniformUsage.Count; i++)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue