https://bugs.winehq.org/show_bug.cgi?id=37406
Bug ID: 37406 Summary: eve online shows garbled textures Product: Wine Version: 1.7.28 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d Assignee: wine-bugs@winehq.org Reporter: farmboy0+winehq@googlemail.com Regression SHA1: ee8a5b7dd1e554ef32229c766715f23ba17c9f6c Distribution: ---
When switching from Fullscreen to Windowed I get the following errors and the 3d objects look like a mess of colors.
err:d3d_surface:surface_load_location Surface 0x1f834240 does not have any up to date location. err:d3d_surface:surface_invalidate_location Surface 0x1f834240 does not have any up to date location.
I have bisected the following commit to be the offender: commit ee8a5b7dd1e554ef32229c766715f23ba17c9f6c Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Oct 8 08:47:20 2014 +0200
wined3d: Track texture allocation per-texture.
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #1 from farmboy0+winehq@googlemail.com --- Reverting the commit fixes the problem.
https://bugs.winehq.org/show_bug.cgi?id=37406
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
https://bugs.winehq.org/show_bug.cgi?id=37406
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |wine@zootal.com
--- Comment #2 from Wylda wylda@volny.cz --- *** Bug 37417 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=37406
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |wylda@volny.cz Summary|eve online shows garbled |Texture corruption when |textures |changing graphic options | |(Eve Online, Sims 3, Diablo | |3) Ever confirmed|0 |1
--- Comment #3 from Wylda wylda@volny.cz --- Commit confirmed by other user for Sims 3 + Diablo 3.
https://bugs.winehq.org/show_bug.cgi?id=37406
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hverbeet@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=37406
Kimball kdt3rd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |kdt3rd@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #4 from Kimball kdt3rd@gmail.com --- Not sure if it helps, but performing a run with
WINEDEBUG=+d3d,+d3d_surface
produces a large amount of output (not going to post a 450+MB log file), but it seems like the surface is not being updated properly after (during?) a device reset - I see a surface object being enumerated during reset, but the next time it is accessed is when it errors about not having any up to date locations.
https://bugs.winehq.org/show_bug.cgi?id=37406
Jimmy Garpehäll epaaj89@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |epaaj89@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=37406
Felix Yan felixonmars@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |felixonmars@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=37406
Xodetaetl dev@xod.me changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dev@xod.me
https://bugs.winehq.org/show_bug.cgi?id=37406
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=37406
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefan@codeweavers.com
--- Comment #5 from Stefan Dösinger stefan@codeweavers.com --- Created attachment 49776 --> https://bugs.winehq.org/attachment.cgi?id=49776 wined3d: Remove texture locations after unloading all subresources.
The problem is that surface_unload calls wined3d_texture_force_reload, which invalidates the texture location of all mipmaps and not just the one that was unloaded. If the other mipmaps only have a valid texture copy, which is quite likely, they are lost.
The attached patch changes this behavior and controls the invalidation of the texture location from the container, which is also the place where the GL texture is actually deleted. Ideally we should call unload only on containers and not on subresources. I am not yet sure if the attached patch has any negative side effects because of that.
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #6 from Felix Yan felixonmars@gmail.com --- *** Bug 37426 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #7 from Felix Yan felixonmars@gmail.com --- The above patch by Stefan fixed the texture corruption in Audiosurf for me.
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #8 from wine@zootal.com wine@zootal.com --- Seems to have done the job for Sims 3 also. I've run it for a while no, no texture corruption, no corruption, no problems at all that I've been able to see.
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #9 from wine@zootal.com wine@zootal.com --- no texture corruption, no *crashing* I meant to say.
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #10 from Henri Verbeet hverbeet@gmail.com --- (In reply to Stefan Dösinger from comment #5)
Created attachment 49776 [details] wined3d: Remove texture locations after unloading all subresources.
The problem is that surface_unload calls wined3d_texture_force_reload, which invalidates the texture location of all mipmaps and not just the one that was unloaded. If the other mipmaps only have a valid texture copy, which is quite likely, they are lost.
The attached patch changes this behavior and controls the invalidation of the texture location from the container, which is also the place where the GL texture is actually deleted. Ideally we should call unload only on containers and not on subresources. I am not yet sure if the attached patch has any negative side effects because of that.
I think the patch is basically correct, but the same flaw probably applies to volume_unload(). And yeah, we really shouldn't be unloading sub-resources in e.g. delete_opengl_contexts().
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #11 from Kimball kdt3rd@gmail.com --- An additional confirmation that this works around the textures getting prematurely discarded in Diablo 3.
I was experiencing some lag, and thinking that it might be the GPU getting filled w/ textures not unloading when the surface unloads, I re-added the wined3d_texture_force_reload to the surface call, but only call it when the surface is the only one with a reference to the texture (surface->container->level_count <= 1). It turns out my lag was due to network latency spikes, but it seems to be safe to do the force_reload in the surface unload when there's only 1 reference to the object. Not sure if that alleviates fears about unintended consequences or if there is a better solution still.
https://bugs.winehq.org/show_bug.cgi?id=37406
mrdeathjr28@yahoo.es changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mrdeathjr28@yahoo.es
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #12 from Sebastian Lackner sebastian@fds-team.de --- A slightly different patch got committed today: http://source.winehq.org/git/wine.git/commit/aad1997dff990ceeba90ece0d535c78...
Please retest if this fixes the issue.
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #13 from wine@zootal.com wine@zootal.com --- I'm running now with this latest patch, and have no issues. Performance is good, stability is good, and textures are good. I can change graphic settings with no issues.
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #14 from farmboy0+winehq@googlemail.com --- Seems to work with with EVE Online too.
https://bugs.winehq.org/show_bug.cgi?id=37406
Bruno Jesus 00cpxxx@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #15 from Bruno Jesus 00cpxxx@gmail.com --- Confirmed fixed by two different people (including OP).
https://bugs.winehq.org/show_bug.cgi?id=37406
Stefan Dösinger stefan@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |aad1997dff990ceeba90ece0d53 | |5c7826044a5cf
https://bugs.winehq.org/show_bug.cgi?id=37406
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |rajat.pandita@hotmail.com
--- Comment #16 from Wylda wylda@volny.cz --- *** Bug 37430 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=37406
--- Comment #17 from Wylda wylda@volny.cz --- *** Bug 37435 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=37406
Wylda wylda@volny.cz changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.7.28 |1.7.29
https://bugs.winehq.org/show_bug.cgi?id=37406
jre.winesim@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jre.winesim@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=37406
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #18 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 1.7.30.
https://bugs.winehq.org/show_bug.cgi?id=37406
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nickysworld@gmail.com
--- Comment #19 from Ken Sharp imwellcushtymelike@gmail.com --- *** Bug 37651 has been marked as a duplicate of this bug. ***