Disable descriptor set template updates for buffer textures on Adreno (#7002)
* Do not use template updates for buffer textures and buffer images * No need to do it for images * Simply buffer texture existence check * Pipeline is now unused on DescriptorSetUpdater
This commit is contained in:
parent
c525d7d9a9
commit
cfc75d7e78
3 changed files with 95 additions and 25 deletions
|
@ -23,6 +23,8 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
public bool IsCompute { get; }
|
||||
public bool HasTessellationControlShader => (Stages & (1u << 3)) != 0;
|
||||
|
||||
public bool UpdateTexturesWithoutTemplate { get; }
|
||||
|
||||
public uint Stages { get; }
|
||||
|
||||
public ResourceBindingSegment[][] ClearSegments { get; }
|
||||
|
@ -127,9 +129,12 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
Stages = stages;
|
||||
|
||||
ClearSegments = BuildClearSegments(sets);
|
||||
BindingSegments = BuildBindingSegments(resourceLayout.SetUsages);
|
||||
BindingSegments = BuildBindingSegments(resourceLayout.SetUsages, out bool usesBufferTextures);
|
||||
Templates = BuildTemplates(usePushDescriptors);
|
||||
|
||||
// Updating buffer texture bindings using template updates crashes the Adreno driver on Windows.
|
||||
UpdateTexturesWithoutTemplate = gd.Vendor == Vendor.Qualcomm && usesBufferTextures;
|
||||
|
||||
_compileTask = Task.CompletedTask;
|
||||
_firstBackgroundUse = false;
|
||||
}
|
||||
|
@ -280,8 +285,10 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
return segments;
|
||||
}
|
||||
|
||||
private static ResourceBindingSegment[][] BuildBindingSegments(ReadOnlyCollection<ResourceUsageCollection> setUsages)
|
||||
private static ResourceBindingSegment[][] BuildBindingSegments(ReadOnlyCollection<ResourceUsageCollection> setUsages, out bool usesBufferTextures)
|
||||
{
|
||||
usesBufferTextures = false;
|
||||
|
||||
ResourceBindingSegment[][] segments = new ResourceBindingSegment[setUsages.Count][];
|
||||
|
||||
for (int setIndex = 0; setIndex < setUsages.Count; setIndex++)
|
||||
|
@ -295,6 +302,11 @@ namespace Ryujinx.Graphics.Vulkan
|
|||
{
|
||||
ResourceUsage usage = setUsages[setIndex].Usages[index];
|
||||
|
||||
if (usage.Type == ResourceType.BufferTexture)
|
||||
{
|
||||
usesBufferTextures = true;
|
||||
}
|
||||
|
||||
if (currentUsage.Binding + currentCount != usage.Binding ||
|
||||
currentUsage.Type != usage.Type ||
|
||||
currentUsage.Stages != usage.Stages ||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue