http://bugs.winehq.org/show_bug.cgi?id=9736
Summary: Civlization 4 Beyond the sword : textures no more correctly rendered Product: Wine Version: CVS/GIT Platform: PC-x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: gizmm0@hotmail.com
Some textures are no more rendered properly with latest git. I mean that some 3 dimensional objects appear as completely black (see the screenshot). This objects are rendered correctly with wine 0.9.44, the game doesn't start with 0.9.45 but with latest git it starts and the problem happens.
http://bugs.winehq.org/show_bug.cgi?id=9736
James Hawkins truiken@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression
--- Comment #1 from James Hawkins truiken@gmail.com 2007-09-22 12:42:28 --- Please do a regression test:
http://wiki.winehq.org/RegressionTesting
http://bugs.winehq.org/show_bug.cgi?id=9736
olivier gizmm0@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |gizmm0@hotmail.com Summary|Civlization 4 Beyond the |Civilization 4 Beyond the |sword : textures no more |sword : textures no more |correctly rendered |correctly rendered
--- Comment #2 from olivier gizmm0@hotmail.com 2007-09-28 12:26:54 --- Regression test gives :
fe0f0eb48a12e29af6a9e7407d4eec8bc500a057 is first bad commit commit fe0f0eb48a12e29af6a9e7407d4eec8bc500a057 Author: Stefan Dösinger stefan@codeweavers.com Date: Mon Aug 27 14:33:46 2007 +0200
wined3d: Some texture transform fixes.
http://bugs.winehq.org/show_bug.cgi?id=9736
Lei Zhang thestig@google.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefandoesinger@gmx.at
--- Comment #3 from Lei Zhang thestig@google.com 2007-10-09 13:46:46 --- CCing author of the patch.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #4 from Stefan Dösinger stefandoesinger@gmx.at 2007-10-09 14:55:35 --- Hmm, another texture transform regression :-( . Luckily I have the game myself this time.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #5 from Stefan Dösinger stefandoesinger@gmx.at 2007-10-12 03:20:46 --- Created an attachment (id=8535) --> (http://bugs.winehq.org/attachment.cgi?id=8535) Possible fix
This patch fixes a texture transform regression in ut2004 for me. Maybe it fixes this bug too.
http://bugs.winehq.org/show_bug.cgi?id=9736
Eike Hein hein@kde.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |hein@kde.org
--- Comment #6 from Eike Hein hein@kde.org 2007-10-23 11:37:01 --- Stefan,
I just tried current git (i.e. post-0.9.47), which appears to include the patch from #5, and I still see mostly blackened objects on the landscape. This is on on nVidia 100.14.19 with the latest version of the game (Civ4: Beyond the Sword 3.13) installed as laid out in http://appdb.winehq.org/objectManager.php?sClass=version&iId=8788#Commen... (MSXML3 and a few D3D DLLs copied over from Windows to get it to run).
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #7 from Eike Hein hein@kde.org 2007-10-23 11:43:41 --- Created an attachment (id=8727) --> (http://bugs.winehq.org/attachment.cgi?id=8727) Rendering trouble in Civ4:BtS 3.13
The screenshot shows the blackened objects that appear in Civ4 BtS 3.13 on current wine git and the latest nVidia drivers at the time of writing.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #8 from Eike Hein hein@kde.org 2007-10-23 11:46:47 --- Created an attachment (id=8728) --> (http://bugs.winehq.org/attachment.cgi?id=8728) Closeup of rendering trouble in Civ4 BtS 3.13
A closeup shows that the defective objects are in fact textured, just vers, very dark.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #9 from Stefan Dösinger stefandoesinger@gmx.at 2007-10-24 05:22:40 --- The last screenshot is interesting. The coordinates are ok apparently, but the textures are too dark. Are you sure that there isn't a 2nd regression? I.e., what happens if you revert the fix and the patch that broke the game on todays git code?
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #10 from Eike Hein hein@kde.org 2007-10-24 07:43:51 ---
Are you sure that there isn't a 2nd regression? I.e.,
what happens if you revert the fix and the patch that broke the game on todays git code?
I actually get this bug both with 0.9.47 (pre-patch) and yesterday's git (post-patch), so I don't think the patch from #5 had any effect on the problem the patch is dealing with (hence the "still" in #6). With both versions the objects are extremely dark, but the textures do appear to fit the geometry properly. So yes, I think this one is separate.
I haven't tried running the game on an earlier version of wine than 0.9.47 myself, so I don't know if it ever worked or when it went bad, or if the bisect done by olivier for #2 correctly points to that texture transform commit.
The reason I've posted here instead of opening a seperate ticket is that olivier described his problem as "objects appear as completely black", which is what I'm getting, too. Sadly I don't see the screenshot that olivier is referring to anywhere, so I can't be completely sure it's really the same bug.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #11 from Eike Hein hein@kde.org 2007-10-27 09:37:18 --- I had some free brain and cpu time, and decided to do a regression test of my own. I started with today's git (== 0.9.48, as that was the latest commit), and bisected dlls/wined3d between the 0.9.44 tag and that. The result was identical to olivier's findings:
fe0f0eb48a12e29af6a9e7407d4eec8bc500a057 is first bad commit commit fe0f0eb48a12e29af6a9e7407d4eec8bc500a057 Author: Stefan Dösinger stefan@codeweavers.com Date: Mon Aug 27 14:33:46 2007 +0200
wined3d: Some texture transform fixes.
The defect stays consistent with my screenshots throughout: The objects are dark, but otherwise seemingly texture correctly.
(I also noticed another bug in the game, namely that if one zooms out as far as possible and the game map zooms into a sphere, only a section of it is rendered/lit correctly. However, while with one of the revisions I tested during the regression test the entire sphere appeared correct, the objects were still dark, so those two problems seem to be unrelated. When I find the time I'll bisect the sphere thing and file a seperate ticket.)
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #12 from Eike Hein hein@kde.org 2007-10-27 10:25:13 --- Created an attachment (id=8797) --> (http://bugs.winehq.org/attachment.cgi?id=8797) Screenshot demonstrating the distance-dependant properties of the bug
This screenshot, was taken with wine 0.9.48, might hold further clues as to the exact nature of the problem. The camera position in relation to the game board surface appears to be a significant factor. Let me try to break it down:
* When zoomed in close to the landscape, objects on it appear very dark, as established above. At that distance, however, the entire landscape is lit correctly, i.e. the map area where I have my cities and other units is bright, and areas I have no cities/units on or haven't uncovered yet are correctly covered by "fog of war", with soft transitions from uncovered to covered.
* When I zoom out further, two things happen:
(a) The city objects, previously defectively rendered dark suddenly become correctly rendered bright, whereever the game logic allows me to see them. Other objects - buildings outside the city, streets and railroads - remain dark.
(b) Simultaneously, the landscape, which morphs into a sphere the further one zooms out, stops being rendered correctly. Only a part of the sphere is properly lit as it was when it was zoomed in, the rest is blackened. This is the problem I alluded to at the end of comment #11.
The distance at which those two things happen appears to be identical. As the cities "light up", large parts of the map sphere go dark. The blackening of those parts of the sphere are not a gameplay device; the demarcation line doesn't match up with the game's "fog of war" mechanic as shown when zoomed in closely.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #13 from Eike Hein hein@kde.org 2007-10-27 10:54:42 --- I've been asked by Stevan on IRC to do a test run with Vertex and Pixel Shaders disabled in winecfg, and so I did. While disabling the two does have obvious consequences for the game's visual appearance (the landscape's topography is no longer softly shaded, and the animated waves hitting the shores are static and/or broken), the objects on the landscape are dark regardless. More specifically, the objects on the landscape and the map sphere itself still behave as described in comment #12.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #14 from Eike Hein hein@kde.org 2007-10-27 11:02:56 --- Patch for above comment: "Stefan", of course. Sorry, chaotic typist :).
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #15 from Eike Hein hein@kde.org 2007-10-28 07:57:57 --- With the help of Stefan I did some additional debugging. I applied a patch to produce frame dumps of individual drawing calls, and made a run with 'WINEDEBUG=d3d,d3d_shader'. I've uploaded the results here:
http://www.logbert.org/temp/wine
* The two TGA files are individual framebuffer dumps illustrating the abrupt appearance of brokenly rendered objects. * The video is an 800x600 MJPEG of all the individual frames, showing the rendering process step-by-step. * The bzipped tarball is the log. It's 320 MB uncompressed.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #16 from olivier gizmm0@hotmail.com 2007-10-29 10:03:48 --- Sorry i just forgot to upload the screenshot. Now I upload 3 screenshots done with the latest git of wine. Oddly enough the fact that the textures are completely black or just very dark seems to depend on the *era* : In the antiquity (and also middle-age, industrial era..) the textures are black, in modern era they are just dark. Also they seem to be correctly rendered with the world editor (CTRL+W in the game), maybe a little dark.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #17 from olivier gizmm0@hotmail.com 2007-10-29 10:04:38 --- Created an attachment (id=8846) --> (http://bugs.winehq.org/attachment.cgi?id=8846) Screenshot in the era : antiquity
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #18 from olivier gizmm0@hotmail.com 2007-10-29 10:05:28 --- Created an attachment (id=8847) --> (http://bugs.winehq.org/attachment.cgi?id=8847) Screenshot in the era : modern times
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #19 from olivier gizmm0@hotmail.com 2007-10-29 10:06:24 --- Created an attachment (id=8848) --> (http://bugs.winehq.org/attachment.cgi?id=8848) Screenshot with the world editor, era irrelevant (i think it is antiquity)
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #20 from Eike Hein hein@kde.org 2007-10-29 10:21:54 --- I've been hanging around in IRC with Stefan yesterday, and based on the logs (two additional ones have appeared in the HTTP site given in comment #15 by now) he appears to have a hunch what's wrong. I'll be standing by to run any patches / testcases as needed ...
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #21 from Stefan Dösinger stefandoesinger@gmx.at 2007-11-02 16:02:31 --- Created an attachment (id=8938) --> (http://bugs.winehq.org/attachment.cgi?id=8938) Possible fix
This patch might fix the problem. It sets the 4th column of the texture transformation matrix to 1.0 when generated texture coords are used.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #22 from Eike Hein hein@kde.org 2007-11-02 16:50:45 --- Created an attachment (id=8940) --> (http://bugs.winehq.org/attachment.cgi?id=8940) Rendering on current git with patch from comment #21
The patch in comment #21 succeeds in correcting the appearance of the objects on the landscape. Stefan, you rock! :-)
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #23 from Eike Hein hein@kde.org 2007-11-02 16:51:49 --- Created an attachment (id=8941) --> (http://bugs.winehq.org/attachment.cgi?id=8941) Landscape sphere on current git with patch from #21
There's still only part of the landscape sphere rendered/lit correctly, confirming it's an unrelated problem.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #24 from Eike Hein hein@kde.org 2007-11-10 06:52:17 --- The black objects bug is now fixed in Wine 0.9.49, and the bug can be closed as far as I'm concerned :-).
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #25 from Stefan Dösinger stefandoesinger@gmx.at 2007-11-10 06:54:01 --- What about the world overview map? Did this break with the same patch? Is there a separate bugreport for this?
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #26 from Eike Hein hein@kde.org 2007-11-10 07:03:19 --- The world overview map is still broken in 0.9.49. When I was originally doing a regression test for the black objects bug, I seem to remember hitting upon a revision in which the entire world overview worked correctly, but I unfortunately didn't make a note of it as I was after the objects. The objects bug eventually came down to fe0f0eb48a12e29af6a9e7407d4eec8bc500a057 ("wined3d: Some texture transform fixes."), but the world overview is broken before that commit, too.
As I promised earlier I did another regression test trying to retrace my steps and find the revision in which the world overview did work, but I was unable to do so (as I was bisecting between 0.9.44 and a different HEAD than last time, I guess). The problem here is also that when bisecting for the objects, I could start from a known good - 0.9.44 -, while the world overview is broken in 0.9.44, too (and also in 0.9.38 which I tested as well). So if I do remember correctly and there is a revision somewhere between 0.9.44 and 0.9.49 in which the world overview works, it's unrelated to fe0f0eb48a12e29af6a9e7407d4eec8bc500a057 and will be very time intensive to find.
http://bugs.winehq.org/show_bug.cgi?id=9736
--- Comment #27 from Eike Hein hein@kde.org 2007-11-10 07:04:45 --- And to answer the second question: No, since I haven't been able to find the working revision so far I haven't opened a separate ticket for it yet, but I'll happily do so if you want.
http://bugs.winehq.org/show_bug.cgi?id=9736
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #28 from Stefan Dösinger stefandoesinger@gmx.at 2007-11-10 08:08:08 --- Ok, I guess we can close this bug then. Can you file another bug for the world overview issue and CC me? I will eventually debug that from scratch rather than looking for a version of wine where this worked. That's propably faster in the end.
http://bugs.winehq.org/show_bug.cgi?id=9736
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #29 from Dan Kegel dank@kegel.com 2008-01-28 05:42:55 --- Closing all RESOLVED FIXED bugs older than four weeks.
http://bugs.winehq.org/show_bug.cgi?id=9736
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|CVS/GIT |unspecified