http://bugs.winehq.org/show_bug.cgi?id=23012
Summary: Black sky in Gothic 3 Product: Wine Version: 1.1.38 Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: kgbricola@web.de
Created an attachment (id=28523) --> (http://bugs.winehq.org/attachment.cgi?id=28523) black sky
The sky in Gothic 3 (v1.72) is black with nvidia 8800GTS (195.36.24), wine-1.2-rc2-111-g9aa9a12. I haven't tried the demo, yet (need to download that first).
This is a regression caused by commit: af7dfcd378739127c50aa95ce40b13eb3d1950cf is the first bad commit commit af7dfcd378739127c50aa95ce40b13eb3d1950cf Author: Henri Verbeet hverbeet@codeweavers.com Date: Wed Feb 3 18:17:58 2010 +0100
wined3d: Do not preload surfaces when attaching them to an FBO.
Just make sure the texture is allocated, so we have something to attach. Note also that context_apply_attachment_filter_states() runs under the GL lock, so preloading resources is actually unsafe there.
:040000 040000 a5b33a88b1083522cd572e82b6cd2d8ad8a61929 e0f98f84e49335d45deea11a36598e052e9e02d5 M dlls
http://bugs.winehq.org/show_bug.cgi?id=23012
--- Comment #1 from Rico kgbricola@web.de 2010-06-02 13:58:53 --- Created an attachment (id=28524) --> (http://bugs.winehq.org/attachment.cgi?id=28524) sky with wine-1.1.37
http://bugs.winehq.org/show_bug.cgi?id=23012
Rico kgbricola@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
http://bugs.winehq.org/show_bug.cgi?id=23012
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hverbeet@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=23012
--- Comment #2 from Rico kgbricola@web.de 2010-06-02 14:23:29 --- Adding the surface_internal_preload(depth_stencil, SRGB_RGB); in context_attach_depth_stencil_fbo before context_apply_attachment_filter_states restores the old behavior with wine af7dfcd378739127c50aa95ce40b13eb3d1950cf. But it crashes with current git, probably due to other changes.
diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c index 0878985..6b065fd 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -207,6 +207,7 @@ void context_attach_depth_stencil_fbo(struct wined3d_context else { surface_prepare_texture(depth_stencil_impl, FALSE); +surface_internal_preload(depth_stencil, SRGB_RGB); context_apply_attachment_filter_states(depth_stencil);
if (format_flags & WINED3DFMT_FLAG_DEPTH)
http://bugs.winehq.org/show_bug.cgi?id=23012
--- Comment #3 from Rico kgbricola@web.de 2010-07-04 04:23:47 --- Created an attachment (id=29332) --> (http://bugs.winehq.org/attachment.cgi?id=29332) revert the problematic changes
This patch reverts the problematic changes to show the sky again.
http://bugs.winehq.org/show_bug.cgi?id=23012
Xavier Vachon xvachon@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |xvachon@gmail.com
--- Comment #4 from Xavier Vachon xvachon@gmail.com 2010-07-10 12:00:08 --- Current git (1.2-rc7) still has this bug.
Using Gothic 3 1.73 with nvidia-drivers 256.35
http://bugs.winehq.org/show_bug.cgi?id=23012
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |mstefani@redhat.com Ever Confirmed|0 |1
--- Comment #5 from Michael Stefaniuc mstefani@redhat.com 2010-11-16 15:23:08 CST --- Confirming as per comment #4
http://bugs.winehq.org/show_bug.cgi?id=23012
--- Comment #6 from Xavier Vachon xvachon@gmail.com 2011-06-02 21:02:04 CDT --- Still a bug in git (1.3.21)
http://bugs.winehq.org/show_bug.cgi?id=23012
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |af7dfcd378739127c50aa95ce40 | |b13eb3d1950cf
http://bugs.winehq.org/show_bug.cgi?id=23012
runetmember@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |runetmember@gmail.com
--- Comment #7 from runetmember@gmail.com 2011-08-20 02:18:34 CDT --- Still bug in WINE 1.3.26.
http://bugs.winehq.org/show_bug.cgi?id=23012
--- Comment #8 from Rico kgbricola@web.de 2011-11-23 08:02:06 CST --- Created attachment 37592 --> http://bugs.winehq.org/attachment.cgi?id=37592 Hack to show the sky at least some times.
Attached is a new hacky patch, which let the sky partially show up. But the depth buffer isn't cleared correctly. The patch only reverts some lines from the regression patch.
http://bugs.winehq.org/show_bug.cgi?id=23012
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|regression | Regression SHA1|af7dfcd378739127c50aa95ce40 | |b13eb3d1950cf |
--- Comment #9 from Henri Verbeet hverbeet@gmail.com 2011-12-14 13:46:35 CST --- As far as I can tell this isn't really a regression. I tested this with 1.1.37, and although initially the sky is shown there, moving the camera around introduces the same kind of blacked out sky. (And in general 1.1.37 just renders much worse than current git.)
I spent some time debugging this, and it looks like the problem is that we don't copy stencil data in surface_load_ds_location(). While that's not completely impossible, it's going to be pretty slow unless the hardware supports stencil export. As a workaround, you can set the "AlwaysOffscreen" Direct3D registry key to "enabled", and it should pretty much render correctly. We've avoided making that the default mostly for performance reasons, but maybe it's time we reconsidered that.
http://bugs.winehq.org/show_bug.cgi?id=23012
--- Comment #10 from Rico kgbricola@web.de 2011-12-14 14:47:34 CST --- Yes, using AlwaysOffscreen fixes the issue completely for me.
Also I couldn't see much of a speed difference between AlwaysOffscreen on/off, but I tested only a little bit.
Thanks for your investigation, it makes the game completely playable.
http://bugs.winehq.org/show_bug.cgi?id=23012
--- Comment #11 from Henri Verbeet hverbeet@gmail.com 2011-12-14 14:52:09 CST --- (In reply to comment #10)
Also I couldn't see much of a speed difference between AlwaysOffscreen on/off, but I tested only a little bit.
It evens about out when we have to share depth/stencil data between onscreen and offscreen rendering. Sometimes it's even a little faster in that case. But keeping it disabled is typically somewhat faster for the case where we never have to copy the depth data.
http://bugs.winehq.org/show_bug.cgi?id=23012
Rico kgbricola@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #12 from Rico kgbricola@web.de 2012-08-05 02:02:38 CDT --- Fixed by commit 09443f14e75e134328643b5d33aff61bdf4dca32 .
http://bugs.winehq.org/show_bug.cgi?id=23012
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |09443f14e75e134328643b5d33a | |ff61bdf4dca32
http://bugs.winehq.org/show_bug.cgi?id=23012
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org 2012-08-17 13:54:57 CDT --- Closing bugs fixed in 1.5.11.