http://bugs.winehq.org/show_bug.cgi?id=10797
Summary: Aliens versus Predator text rendering faulty Product: Wine Version: 0.9.51. Platform: PC URL: http://www.fileshack.com/file.x/871/Aliens+vs+Predator+P redator+Demo OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: a.hurst@shef.ac.uk
Created an attachment (id=9658) --> (http://bugs.winehq.org/attachment.cgi?id=9658) Screenshot showing text rendering problem
In Aliens versus Predator, when the 3d engine is running, text is drawn with red boxes around it, or not at all.
For example, the marine's display has health and ammo indicators, below which should be numbers - a percentage. Instead, the words 'health' and 'ammo' are visible, but have red boxes drawn around each character. The percentages are not visible at all.
See attached screenshot.
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #1 from Andrew Charles Hurst a.hurst@shef.ac.uk 2007-12-16 12:29:25 --- Sorry s/ammo/armour above.
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #2 from Andrew Charles Hurst a.hurst@shef.ac.uk 2007-12-16 12:31:12 --- The appDB has some screenshots showing how it should look.
http://appdb.winehq.org/screenshots.php?iAppId=901&iVersionId=1183
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #3 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-19 16:36:30 --- Created an attachment (id=9702) --> (http://bugs.winehq.org/attachment.cgi?id=9702) demo screenshot
Yes, there's some problem. There are also hud/menu text issues in AVP1 demo, I guess these are related. In game HUD text has this very-very transparent, barely visible look and in game menu (that one which opens by ESC from a started level) is a black screen. I'll attach a screenshot from demo for completeness.
I've investigated a bit what's going on and apparently problem is in 3d calls, it's drawn by ddraw calls, the program draws this HUD text etc using textured quads w/ alpha blending for transparency and effects. So either this is a problem with handling of some blend-related render states (according to its opened source and somewhat supported by logs, for HUD text it mostly uses SRCBLEND=SRCALPHA, DSTBLEND=ONE) or alpha channel is wrong in textures (i.e. some texture loading problem).
So far I think it's most likely the latter - tried adding hacks to drawPrimitive etc that forcefully set glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) and it still looks wrong.
http://bugs.winehq.org/show_bug.cgi?id=10797
Alexander Dorofeyev alexd4@inbox.lv changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |alexd4@inbox.lv
--- Comment #4 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-19 16:38:43 --- uh, sorry, in my previous comment it should be "it's NOT drawn by ddraw 2D calls"
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #5 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-19 16:39:39 --- 2 Andrew Charles Hurst: If this is a regression, do you have any idea when this got broken?
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #6 from Andrew Charles Hurst a.hurst@shef.ac.uk 2007-12-19 20:54:33 --- I'm afraid, for the red boxes at least, it seems to be http://source.winehq.org/git/wine.git/?a=commit;h=c8901d6f6253f6c97610eb1068... - the big ddraw rewrite
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #7 from Andrew Charles Hurst a.hurst@shef.ac.uk 2007-12-20 17:08:35 --- Created an attachment (id=9727) --> (http://bugs.winehq.org/attachment.cgi?id=9727) Another screenshot from 0.9.51
You can see the alpha blending is a bit off in this one: if you squint hard at the corners!
Seems to be a separate issue to the red boxes though
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #8 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-21 19:02:58 --- Created an attachment (id=9743) --> (http://bugs.winehq.org/attachment.cgi?id=9743) proposed fix
I think I've identified at least one source of problems. Sent a patch to wine-patches. I'll also attach it here. With it I see definite improvements, although, NOT all issues are resolved. First, there are a few red lines near font characters in the demo (although I don't see it in "Gold" full version). Second, I think it also incorrectly draws the in level menu - items there don't get highlighted as they should. Quite likely separate bugs though, unrelated to this wrong alpha problem.
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #9 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-21 19:05:39 --- Created an attachment (id=9744) --> (http://bugs.winehq.org/attachment.cgi?id=9744) screenshot from demo with patch
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #10 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-21 19:27:26 --- oops. Just noticed in the Gold version there are still "red box" problems left in at least one place - in level menu. Probably not a coincedence that in level menu items don't get properly highlighted in the demo. I guess both cases are another bug somewhere...
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #11 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-28 13:08:56 --- Andrew, how did you get that thing on "screenshot from 0.9.51"? Is there anything specific that must be done to reproduce? It's unlike anything I've seen. Of course, it might have been fixed by some changes I've done, but I can't see how - bugs I've been fixing are mostly related to texturing and rasterizing, and this looks more like some positioning / coordinate issue. Maybe it's some weird resolution that confuses the game?
BTW some good news are that multiple fixes by me and another dev already made it to git, and I'm working on some last remaining issues. Not counting the issue on that screenshot, I think the visuals in this game will be in order soon enough. Of course, there are multiple nasty bugs still, speaking of which, it would be nice to update some AVP1 bugzilla entries where info is outdated, esp. the "random crash". Please see if you can get a +tid,+dsound,+ddraw,+ddraw_thunks,+d3d,+d3d_surface log of a crashed session (last 5-10 thousand lines of course, as it will be huge). It's reproducible on my own machine pretty easily, but crash logs from different machines can be helpful, to see if there's some variety. From what I understand, it doesn't matter much what you do in game - it's just a question of time until it crashes.
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #12 from Andrew Charles Hurst a.hurst@shef.ac.uk 2007-12-29 08:08:57 --- Alex, I didn't do anything special to get those (red boxes) happening, and they've been there since Stefan's "ddraw rewrite" commit, c8901d6f6253f6c97610eb1068ac4ff89758ed0a
It happens in all resolutions. I'm using an nvidia GeForce 6200 AGP, with latest stable drivers, but it always happened with my old TNT2agp. Using the linux kernel's AGPGART, not NvAGP - might be worth testing. Is yours a PCIe card?
I'll get a crash trace as soon as I'm able: I'm away visiting family at the moment.
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #13 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-29 21:22:30 --- Andrew: I mean not the red boxes, but this
http://bugs.winehq.org/attachment.cgi?id=9727
Where some hud text items (like ammo) are somehow "displaced" out of screen (bottom) partly. Red boxes should be gone in 0.9.52 (that proposed fix by me was improved by another dev and it got into git just before .52 release :) ). Well mostly, because ironically there was a regression in loading screen which was ok previously, but that'll be fixed soon, too.
I think this strange thing with hud elements getting out of screen may be something with resolutions. On one occasion when I selected some weird one in fullscreen mode, I saw something similar to this screenshot. It could've been my monitor auto-adjust not working properly, for all I know. I didn't yet seriously debug that. In normal/standart resolutions (like 800x600, 640x480) everything is always ok, in both full screen and "desktop emulation" modes. That's why I ask what resolutions / modes you get such problem in.
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #14 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-29 21:55:04 --- Oh about crash log - nevermind, I think I found one problem that was causing it.
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #15 from Andrew Charles Hurst a.hurst@shef.ac.uk 2007-12-31 07:10:15 --- Created an attachment (id=9939) --> (http://bugs.winehq.org/attachment.cgi?id=9939) Screenshot from wine-0.9.52
In 0.9.52 the red boxes seem fixed, and the armour/health/ammo indicators are all ok. That's it for this bug.
I think the 'displaced' HUD effects are because the png encoding is messed up somewhere. The top of the png is also cropped for me. I'm using GIMP 2.4.2 to screenshot and save png. So it's a false alarm.
We'll see how this screenshot turns out!
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #16 from Andrew Charles Hurst a.hurst@shef.ac.uk 2007-12-31 07:28:17 --- The above screenshot seems to have encoded properly this time.
Only the menu highlighting remains unsolved: shall I file another bug?
Am I right in thinking the red boxes were solved by thunderbird with this: http://source.winehq.org/git/wine.git/?a=commit;h=756cb66e78bd402b385d2babca...
..and the incorrect alpha blending was solved by Alex, and improved upon by thunderbird with this with this: http://source.winehq.org/git/wine.git/?a=commit;h=f3df6cf42b4e705b5e687df08b... ?
I like to round off bugs nicely with the solutions :)
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #17 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-31 07:29:02 --- This new screenshot is ok. :).
I think that maybe this bug shouldn't be closed yet as there's one more issue I'm working on, related to rendering text - highlighting of text in menu and other alpha blending effects that use alpha from vertex diffuse color. Currently this doesn't work in git wine, but it's fixed on my computer. It's a question of writing a test case mostly, because the change is somewhat non-obvious, from what little remains of documentation on DX6 that can be found in this day and age (damn MS!).
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #18 from Alexander Dorofeyev alexd4@inbox.lv 2007-12-31 07:42:10 --- Andrew, red boxes was trashing of alpha channel with some incorrect junk due to hack for speedup of games like Starcraft that was being enabled for AVP1 by mistake. Here's the commit that fixed it:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=f3df6cf42b4e705b5e687d...
I think it was responsible for both red boxes and bad transparency in demo.
Another patch by Roderick didn't affect AVP1, I think. A few other patches fixed misc. minor issues in menu drawing.
http://bugs.winehq.org/show_bug.cgi?id=10797
Pawel Nadolski pawel.nadolski@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |pawel.nadolski@gmail.com
--- Comment #19 from Pawel Nadolski pawel.nadolski@gmail.com 2007-12-31 08:04:12 --- Note that commit http://source.winehq.org/git/wine.git/?a=commitdiff;h=f3df6cf42b4e705b5e687d... broke menu in Commandos 3 (see bug 10973).
http://bugs.winehq.org/show_bug.cgi?id=10797
Andrew Charles Hurst a.hurst@shef.ac.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
http://bugs.winehq.org/show_bug.cgi?id=10797
--- Comment #20 from Alexander Dorofeyev alexd4@inbox.lv 2008-01-22 11:36:56 --- I finally managed to get the text highlight and alpha blending fixes accepted. As of today, it works in git wine. With all of these issues now fixed, I guess this bug can be closed.
http://bugs.winehq.org/show_bug.cgi?id=10797
Andrew Charles Hurst a.hurst@shef.ac.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #21 from Andrew Charles Hurst a.hurst@shef.ac.uk 2008-01-24 17:39:22 --- Yes, all fixed in GIT!
Thankyou Alex :)
http://bugs.winehq.org/show_bug.cgi?id=10797
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #22 from Dan Kegel dank@kegel.com 2008-01-28 06:12:25 --- Closing all RESOLVED FIXED bugs older than 0.9.54.