mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-27 09:59:33 +01:00
646d4dd5c7
This fixes a rare bug where reporting a counter for a region containing 0 draws could deadlock the GPU. If this write overlaps with a tracking action, then the GPU could end up waiting on something that it's meant to do in the future, so it would just get stuck. Before, this reported immediately and wrote the result to guest memory (tracked) from the backend thread. The backend thread cannot be allowed to trigger read actions that wait on the GPU, as it will end up waiting on itself, and never advancing. In the case of backend multithreading's `SyncMap`, it would try to wait for a backend sync object that does not yet exist, as the sync object would exist according to the GPU and tracking, but it has not yet been created by the backend (and never will be, since it's stuck). The fix is to queue the 0 draw event just like any other, its _bufferMap value is just forced to 0. This affects games that use Conditional Rendering: SMO, Splatoon 2, MK8. Was generally indicated by a red message in log saying that the query result timed out after 5000 tries, but not always the cause. |
||
---|---|---|
.. | ||
Helper | ||
Image | ||
Queries | ||
BackgroundContextWorker.cs | ||
Buffer.cs | ||
Constants.cs | ||
Debugger.cs | ||
DrawTextureEmulation.cs | ||
EnumConversion.cs | ||
FormatInfo.cs | ||
FormatTable.cs | ||
Framebuffer.cs | ||
Handle.cs | ||
HwCapabilities.cs | ||
IOpenGLContext.cs | ||
PersistentBuffers.cs | ||
Pipeline.cs | ||
Program.cs | ||
Renderer.cs | ||
ResourcePool.cs | ||
Ryujinx.Graphics.OpenGL.csproj | ||
Shader.cs | ||
Sync.cs | ||
VertexArray.cs | ||
VertexBuffer.cs | ||
Window.cs |