forked from MeloNX/MeloNX
Extend Adreno binding workaround to buffer textures
This commit is contained in:
parent
a2716f715b
commit
32aa106363
@ -116,10 +116,10 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
Stages = stages;
|
||||
|
||||
bool hasBatchedTextureSamplerBug = gd.Vendor == Vendor.Qualcomm;
|
||||
bool hasBatchedTextureBug = gd.Vendor == Vendor.Qualcomm;
|
||||
|
||||
ClearSegments = BuildClearSegments(resourceLayout.Sets);
|
||||
BindingSegments = BuildBindingSegments(resourceLayout.SetUsages, hasBatchedTextureSamplerBug);
|
||||
BindingSegments = BuildBindingSegments(resourceLayout.SetUsages, hasBatchedTextureBug);
|
||||
|
||||
_compileTask = Task.CompletedTask;
|
||||
_firstBackgroundUse = false;
|
||||
@ -191,7 +191,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
return segments;
|
||||
}
|
||||
|
||||
private static ResourceBindingSegment[][] BuildBindingSegments(ReadOnlyCollection<ResourceUsageCollection> setUsages, bool hasBatchedTextureSamplerBug)
|
||||
private static ResourceBindingSegment[][] BuildBindingSegments(ReadOnlyCollection<ResourceUsageCollection> setUsages, bool hasBatchedTextureBug)
|
||||
{
|
||||
ResourceBindingSegment[][] segments = new ResourceBindingSegment[setUsages.Count][];
|
||||
|
||||
@ -208,7 +208,7 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
|
||||
if (currentUsage.Binding + currentCount != usage.Binding ||
|
||||
currentUsage.Type != usage.Type ||
|
||||
(currentUsage.Type == ResourceType.TextureAndSampler && hasBatchedTextureSamplerBug) ||
|
||||
(IsReadOnlyTexture(currentUsage.Type) && hasBatchedTextureBug) ||
|
||||
currentUsage.Stages != usage.Stages ||
|
||||
currentUsage.Access != usage.Access)
|
||||
{
|
||||
@ -245,6 +245,11 @@ namespace Ryujinx.Graphics.Vulkan
|
||||
return segments;
|
||||
}
|
||||
|
||||
private static bool IsReadOnlyTexture(ResourceType resourceType)
|
||||
{
|
||||
return resourceType == ResourceType.TextureAndSampler || resourceType == ResourceType.BufferTexture;
|
||||
}
|
||||
|
||||
private async Task BackgroundCompilation()
|
||||
{
|
||||
await Task.WhenAll(_shaders.Select(shader => shader.CompileTask));
|
||||
|
Loading…
x
Reference in New Issue
Block a user