[Bug 20672] New: GetDC change causes black screen in Seven Kingdoms
http://bugs.winehq.org/show_bug.cgi?id=20672 Summary: GetDC change causes black screen in Seven Kingdoms Product: Wine Version: 1.1.30 Platform: PC URL: http://www.7kfans.com/ OS/Version: Linux Status: NEW Keywords: regression, source Severity: normal Priority: P2 Component: directx-ddraw AssignedTo: wine-bugs(a)winehq.org ReportedBy: the3dfxdude(a)gmail.com CC: stefan(a)codeweavers.com The following patch causes a black screen upon running Seven Kingdoms: e1469961d42d0eb077d3fa0236de17b56bc51a56 is the first bad commit commit e1469961d42d0eb077d3fa0236de17b56bc51a56 Author: Stefan Dösinger <stefan(a)codeweavers.com> Date: Sat Sep 5 16:37:19 2009 +0200 wined3d: Test and fix ddraw and d3d9 GetDC differences. The MSDN is not totally correct: A8R8G8B8 and A1R5G5B5 also allow GetDC. The main differences that have to be filtered out in d3d9.dll are GetDC on A8B8G8R8, X8B8G8R8 and P8. :040000 040000 50563852d85b047d42d3ff67801850c834b63244 e64032236cf06c87a6d12bf361cb94417db71efa M dlls Running the ddraw dsurface test seems to indicate that ddraw wants opengl enabled in the registry as the DirectDrawRenderer. Then when enabling opengl, a full-screen Seven Kingdoms draws the screen partially offscreen incorrectly. When virtual desktop is enabled, the game is visible correctly. Also note, Seven Kingdoms uses an 8-bit color depth. It is expected that GDI mode should not produce a black screen. Bug 20327 is similar, but I question whether it is the same problem as it is a D3D game. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 Stefan Dösinger <stefandoesinger(a)gmx.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |stefandoesinger(a)gmx.at --- Comment #1 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2009-11-12 02:38:16 --- Can you attach a +ddraw,+d3d7,+d3d_surface log? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #2 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2009-11-12 07:01:10 --- Is your OpenGL setup broken? The patch introduced a bug that prevents GetDC from working if the OpenGL pixel format info is not available(ie, OpenGL not available at all). This is not related to the registry setup, it is part of the generic adapter initialization. If your GL setup is broken you'll see messages like these: err:wgl:X11DRV_WineGL_InitOpenglInfo couldn't initialize OpenGL, expect problems err:d3d_caps:WineD3D_CreateFakeGLContext Can't find a suitable iPixelFormat. err:d3d:InitAdapters Failed to get a gl context for default adapter I'll see how to best get GetDC working again without GL. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 Stefan Dösinger <stefandoesinger(a)gmx.at> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Gwaeraurond(a)yahoo.com --- Comment #3 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2009-11-12 07:02:19 --- *** Bug 16117 has been marked as a duplicate of this bug. *** -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #4 from Jesse Allen <the3dfxdude(a)gmail.com> 2009-11-12 20:49:15 --- Created an attachment (id=24714) --> (http://bugs.winehq.org/attachment.cgi?id=24714) debug log WINEDEBUG=+ddraw,+d3d7,+d3d_surface -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #5 from Jesse Allen <the3dfxdude(a)gmail.com> 2009-11-12 20:52:39 --- Stefan, opengl is working on my system. I tend to think the problem is exhibited by this message: warn:d3d_surface:IWineD3DBaseSurfaceImpl_CreateDIBSection Cannot use GetDC on a WINED3DFMT_P8 surface I will look at it more closely. BTW, this is the opengl used: OpenGL vendor string: Tungsten Graphics, Inc. OpenGL renderer string: Mesa DRI R200 20060602 AGP 8x x86/MMX+/3DNow!+/SSE TCL OpenGL version string: 1.3 Mesa 7.5.1 -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #6 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2009-11-13 05:03:10 --- Hmm yeah, but the initialization tables enable GetDC on P8 surfaces. So this should work :-/ -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 Wylda <wylda(a)volny.cz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wylda(a)volny.cz --- Comment #7 from Wylda <wylda(a)volny.cz> 2009-11-15 03:52:45 --- Hi Jesse & Stefan, what is the trick to make this run? I tried wine from 0.9.49 till 1.1.33, full screen vs. windowed mode, 8bit vs. 16bit vs 24bit depth, using win's quartz.dll and everything i see is black screen after intro movie :-/ -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #8 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2009-11-15 05:14:21 --- Is there a freely downloadable demo of this game? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #9 from Wylda <wylda(a)volny.cz> 2009-11-15 05:23:03 --- (In reply to comment #8)
Is there a freely downloadable demo of this game?
Yes, link: http://www.gamershell.com/pc/seven_kingdoms/downloads.html Sidenote - i did not test under demo... and based on bug 18285 - comment #6, it is available as opensource now (Microsoft under GPL licence??). -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #10 from Jesse Allen <the3dfxdude(a)gmail.com> 2009-11-15 11:31:56 --- There are demos to the game but I wouldn't recommend those, as they will produce a black screen for two another reasons (one bug 18285). I committed two fixes to the game that will fix these: http://www.7kfans.com/git/?p=7kaa.git;a=commit;h=4c6872ae6133279b470404b9711... http://www.7kfans.com/git/?p=7kaa.git;a=commit;h=51b49fe1b91b549efd4365ed9d5... This black screen however, seems to be caused by OpenGL interaction. You can obtain the actual GPL game at https://sourceforge.net/projects/skfans/ -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #11 from Jesse Allen <the3dfxdude(a)gmail.com> 2009-11-15 14:01:54 --- If you want to test the GPL game code, make sure you download the game data too. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #12 from Jesse Allen <the3dfxdude(a)gmail.com> 2009-11-15 14:47:34 --- (In reply to comment #6)
Hmm yeah, but the initialization tables enable GetDC on P8 surfaces. So this should work :-/
Could WINED3DFMT_FLAG_GETDC get unset or initialization cause WINED3DFMT_P8 to be disabled? BTW, the game does work in 8-bit color depth mode. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #13 from Jesse Allen <the3dfxdude(a)gmail.com> 2009-11-15 14:48:34 --- Sorry I should be more clear on my last comment, setting the X-Windows color depth to 8-bit allows the game to create the 8-bit surface. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #14 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2009-11-15 15:01:57 --- Yeah, the lack of WINED3DFMT_FLAG_GETDC is a problem - the question is why this isn't set. I have a patch that should make sure that this flag gets set even if opengl isn't available - I'll attach it here and send it to wine-patches in the next days. However, since GL is working fine for you I don't think this will fix the issue. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #15 from Jesse Allen <the3dfxdude(a)gmail.com> 2009-11-15 19:44:29 --- Stefan, the piece of code that controls whether P8 can be used is in dlls/wined3d/utils.c, function init_format_texture_info(). It checks for P8, by querying the extensions EXT_PALETTED_TEXTURE, and ARB_FRAGMENT_PROGRAM. When a required extension is not available, initing the format will be skipped and the flag not set. I have neither of these on R200, but relying on what OpenGL here is incorrect. So this bug is that you should not only rely on the OpenGL formats when you could still have software support. I don't know if you could set the GetDC flag on those existing format entries without having those extensions and not cause other problems. Can you create a separate P8 software format entry? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #16 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2009-11-16 10:46:57 --- Oh hmm, I guess you've got a point here. We have a 3rd codepath for P8 which requires neither of those extensions(Unpack to a 32 bit ARGB texture), but that codepath is not (yet) properly integrated with this table. Anyway, the getdc flag should not be linked to GL in any way. I thought I attached a patch for that yesterday, but apparently not. I'll finish that patch once I am done with this weeks exam at university :-/ -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 --- Comment #17 from Stefan Dösinger <stefandoesinger(a)gmx.at> 2009-11-16 10:47:34 --- argh - I attached the patch to bug 20327. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 Jesse Allen <the3dfxdude(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #18 from Jesse Allen <the3dfxdude(a)gmail.com> 2009-11-17 21:32:34 --- Fixed by 7676c664314665fa4f7caa50e35d660b2ccdcd10 Thanks -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #19 from Alexandre Julliard <julliard(a)winehq.org> 2009-12-04 12:16:25 --- Closing bugs fixed in 1.1.34. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=20672 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|directx-ddraw |directx-d3d -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
participants (1)
-
wine-bugs@winehq.org