0
0
Fork 0
mirror of https://github.com/GreemDev/Ryujinx.git synced 2024-12-23 08:05:47 +00:00

Fix conditional rendering without queries (#1965)

This commit is contained in:
gdkchan 2021-01-26 18:42:12 -03:00 committed by GitHub
parent d1e24ba5c2
commit d6bd0470fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,11 +71,6 @@ namespace Ryujinx.Graphics.Gpu.Engine
ICounterEvent evt = FindEvent(gpuVa); ICounterEvent evt = FindEvent(gpuVa);
ICounterEvent evt2 = FindEvent(gpuVa + 16); ICounterEvent evt2 = FindEvent(gpuVa + 16);
if (evt == null && evt2 == null)
{
return ConditionalRenderEnabled.False;
}
bool useHost; bool useHost;
if (evt != null && evt2 == null) if (evt != null && evt2 == null)
@ -86,10 +81,14 @@ namespace Ryujinx.Graphics.Gpu.Engine
{ {
useHost = _context.Renderer.Pipeline.TryHostConditionalRendering(evt2, _context.MemoryManager.Read<ulong>(gpuVa), isEqual); useHost = _context.Renderer.Pipeline.TryHostConditionalRendering(evt2, _context.MemoryManager.Read<ulong>(gpuVa), isEqual);
} }
else else if (evt != null && evt2 != null)
{ {
useHost = _context.Renderer.Pipeline.TryHostConditionalRendering(evt, evt2, isEqual); useHost = _context.Renderer.Pipeline.TryHostConditionalRendering(evt, evt2, isEqual);
} }
else
{
useHost = false;
}
if (useHost) if (useHost)
{ {