From d6bd0470fb0507cc9c6069e577ae2814e614265b Mon Sep 17 00:00:00 2001 From: gdkchan Date: Tue, 26 Jan 2021 18:42:12 -0300 Subject: [PATCH] Fix conditional rendering without queries (#1965) --- .../Engine/MethodConditionalRendering.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/Ryujinx.Graphics.Gpu/Engine/MethodConditionalRendering.cs b/Ryujinx.Graphics.Gpu/Engine/MethodConditionalRendering.cs index 7e7964c4bf..0d7c272c79 100644 --- a/Ryujinx.Graphics.Gpu/Engine/MethodConditionalRendering.cs +++ b/Ryujinx.Graphics.Gpu/Engine/MethodConditionalRendering.cs @@ -71,11 +71,6 @@ namespace Ryujinx.Graphics.Gpu.Engine ICounterEvent evt = FindEvent(gpuVa); ICounterEvent evt2 = FindEvent(gpuVa + 16); - if (evt == null && evt2 == null) - { - return ConditionalRenderEnabled.False; - } - bool useHost; if (evt != null && evt2 == null) @@ -86,10 +81,14 @@ namespace Ryujinx.Graphics.Gpu.Engine { useHost = _context.Renderer.Pipeline.TryHostConditionalRendering(evt2, _context.MemoryManager.Read(gpuVa), isEqual); } - else + else if (evt != null && evt2 != null) { useHost = _context.Renderer.Pipeline.TryHostConditionalRendering(evt, evt2, isEqual); } + else + { + useHost = false; + } if (useHost) {