aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorriperiperi <rhy3756547@hotmail.com>2024-02-22 02:52:13 +0000
committerGitHub <noreply@github.com>2024-02-21 23:52:13 -0300
commit79f6c18a9b1c0b73a7a2324c916ecc371cfd02ad (patch)
tree4c94fbd3ed7ab192246b3a1e049faaa0764f3cb1 /src
parent4f63782baccb530dcf9c5da1a32c6f257e61bc28 (diff)
Vulkan: Disable push descriptors on older NVIDIA GPUs (#6340)1.1.1206
Disables push descriptors on older NVIDIA GPUs (10xx and below), since it is clearly broken beyond comprehension. The existing workaround wasn't good enough and a more thorough one will probably cost more performance than the feature gains. The workaround has been removed. Fixes #6331.
Diffstat (limited to 'src')
-rw-r--r--src/Ryujinx.Graphics.Vulkan/DescriptorSetUpdater.cs36
-rw-r--r--src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs1
2 files changed, 1 insertions, 36 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/DescriptorSetUpdater.cs b/src/Ryujinx.Graphics.Vulkan/DescriptorSetUpdater.cs
index 946e3bc1..76568602 100644
--- a/src/Ryujinx.Graphics.Vulkan/DescriptorSetUpdater.cs
+++ b/src/Ryujinx.Graphics.Vulkan/DescriptorSetUpdater.cs
@@ -299,13 +299,6 @@ namespace Ryujinx.Graphics.Vulkan
// When the pipeline layout changes, push descriptor bindings are invalidated.
AdvancePdSequence();
-
- if (_gd.IsNvidiaPreTuring && !program.UsePushDescriptors && _program?.UsePushDescriptors == true && isBound)
- {
- // On older nvidia GPUs, we need to clear out the active push descriptor bindings when switching
- // to normal descriptors. Keeping them bound can prevent buffers from binding properly in future.
- ClearAndBindUniformBufferPd(cbs);
- }
}
_program = program;
@@ -806,35 +799,6 @@ namespace Ryujinx.Graphics.Vulkan
}
}
- private void ClearAndBindUniformBufferPd(CommandBufferScoped cbs)
- {
- var bindingSegments = _program.BindingSegments[PipelineBase.UniformSetIndex];
-
- long updatedBindings = 0;
- DescriptorSetTemplateWriter writer = _templateUpdater.Begin(32 * Unsafe.SizeOf<DescriptorBufferInfo>());
-
- foreach (ResourceBindingSegment segment in bindingSegments)
- {
- int binding = segment.Binding;
- int count = segment.Count;
-
- for (int i = 0; i < count; i++)
- {
- int index = binding + i;
- updatedBindings |= 1L << index;
-
- var bufferInfo = new DescriptorBufferInfo();
- writer.Push(MemoryMarshal.CreateReadOnlySpan(ref bufferInfo, 1));
- }
- }
-
- if (updatedBindings > 0)
- {
- DescriptorSetTemplate template = _program.GetPushDescriptorTemplate(updatedBindings);
- _templateUpdater.CommitPushDescriptor(_gd, cbs, template, _program.PipelineLayout);
- }
- }
-
private void Initialize(CommandBufferScoped cbs, int setIndex, DescriptorSetCollection dsc)
{
// We don't support clearing texture descriptors currently.
diff --git a/src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs b/src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs
index 3c35a6f0..7f687fb4 100644
--- a/src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs
+++ b/src/Ryujinx.Graphics.Vulkan/ShaderCollection.cs
@@ -111,6 +111,7 @@ namespace Ryujinx.Graphics.Vulkan
bool usePushDescriptors = !isMinimal &&
VulkanConfiguration.UsePushDescriptors &&
_gd.Capabilities.SupportsPushDescriptors &&
+ !_gd.IsNvidiaPreTuring &&
!IsCompute &&
CanUsePushDescriptors(gd, resourceLayout, IsCompute);