[Bug 52574] PlayOnline Viewer crashes after 10-20 seconds

WineHQ Bugzilla wine-bugs at winehq.org
Thu Mar 10 16:53:13 CST 2022


https://bugs.winehq.org/show_bug.cgi?id=52574

--- Comment #6 from Zebediah Figura <z.figura12 at gmail.com> ---
Created attachment 71965
  --> https://bugs.winehq.org/attachment.cgi?id=71965
submit GL command fences when blitting to the front buffer

The application is repeatedly issuing draw calls from a ddraw sysmem buffer.
This causes ddraw to repeatedly discard a vertex buffer, asynchronously
replacing the existing BO (block) with a new one.

The problem is that the old BOs aren't getting reclaimed. In order to be nice
to the GL driver, we don't reclaim them until they aren't in use anymore by the
GPU, and we use command fences to determine that. We submit command fences
periodically so that we don't let retired resources pile up infinitely.

Unfortunately, our means of submitting command fences periodically is "when the
swapchain is presented". The application uses IDirectDrawSurface7::Blt() to
blit directly to the front buffer, which has the result that we apparently do
correctly render to the screen, but never call wined3d_swapchain_present().

So there are multiple potential ways to fix this, and I don't know which is the
correct one. We could be trying to submit command fences more often (when?). Or
maybe ddraw should be actually presenting the swapchain, but the correct
semantics associated with that are unclear to me.

The attached patch seems potentially correct, though, and does fix the
application.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list