http://bugs.winehq.org/show_bug.cgi?id=29146
Bug #: 29146 Summary: EVE online: some models are missing Product: Wine Version: 1.3.33 Platform: x86 URL: http://content.eveonline.com/EVE_Premium_Setup_306979. exe OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: pavel.ondracka@gmail.com Classification: Unclassified
Created attachment 37586 --> http://bugs.winehq.org/attachment.cgi?id=37586 terminal output
When playing eve some ship models are not rendered at all and some are misrendered. this is with ATI Radeon X1600 (RV530) GPU and mesa drivers (latest git). At first I blamed mesa (because NVIDIA 9600GSO with closed drivers works fine), however according to developers the generated shaders are invalid:
------------------------------------------------------------------- Ian Romanick 2011-11-22 11:36:50 PST
The shader declares the array VC to have 245 elements:
uniform vec4 VC[245];
then it tries to access the 246th element of the array:
R0.xyz = (VC[245].xyz);
This is explicitly forbidden by GLSL, and it should be rejected by any GLSL compiler. Page 31 of the GLSL 1.30 spec says:
"It is illegal to declare an array with a size, and then later (in the same shader) index the same array with an integral constant expression greater than or equal to the declared size."
I tried this same shader with AMD's closed-source driver and piglits glslparser test, and it failed to compile there as well:
Failed to compile vertex shader wine-from-eve.vert: Vertex shader failed to compile with the following errors: ERROR: 0:84: error(#147) '[' array index out of range '245' ERROR: 0:91: error(#147) '[' array index out of range '245' ERROR: 0:93: error(#147) '[' array index out of range '245' ERROR: error(#273) 3 compilation errors. No code generated ---------------------------------------------------------------
Terminal output attached.
More info in: https://bugs.freedesktop.org/show_bug.cgi?id=42514
http://bugs.winehq.org/show_bug.cgi?id=29146
Pavel Ondračka pavel.ondracka@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download
--- Comment #1 from Pavel Ondračka pavel.ondracka@gmail.com 2011-11-22 16:18:27 CST --- Adding download keyword (you don't need account to reproduce, login screen is enough).
http://bugs.winehq.org/show_bug.cgi?id=29146
--- Comment #2 from Henri Verbeet hverbeet@gmail.com 2011-11-23 01:20:14 CST --- Yeah that's a hardware limitation, not much we can do about it.
http://bugs.winehq.org/show_bug.cgi?id=29146
--- Comment #3 from Pavel Ondračka pavel.ondracka@gmail.com 2011-11-23 03:47:30 CST --- (In reply to comment #2)
Yeah that's a hardware limitation, not much we can do about it.
Sidenote... It works on Windows, and my card is within the game requirements. But I guess this is another example of wine raising the requirements, right? However what about printing some ERROR info into terminal like "Your hardware can't run this, make sure you are within the app requirements and note that Wine can raise those" or something similar. Generating invalid shader is not the best solution ever. It would save me quite some time (and also save time for the developers who had to reply and read my bugs) because for average user like me its impossible to recognize what is a bug an what is a hardware limitation
http://bugs.winehq.org/show_bug.cgi?id=29146
--- Comment #4 from Henri Verbeet hverbeet@gmail.com 2011-11-23 03:59:49 CST --- (In reply to comment #3)
Sidenote... It works on Windows, and my card is within the game requirements. But I guess this is another example of wine raising the requirements, right?
Yeah, the issue is that we need some extra uniforms for doing fixups, and when the D3D shader already uses all of them we're just out of luck.
However what about printing some ERROR info into terminal like "Your hardware can't run this, make sure you are within the app requirements and note that Wine can raise those" or something similar. Generating invalid shader is not the best solution ever.
Yeah, we should be better about this. The reason we don't already do this is that a shader like this may still work if it doesn't actually use the constants near the end that we remove. We should probably print a message mentioning something along those lines when such a shader fails to compile or link.
http://bugs.winehq.org/show_bug.cgi?id=29146
Pavel Ondračka pavel.ondracka@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|EVE online: some models are |Wine should warn user when |missing |generating invalid shaders
--- Comment #5 from Pavel Ondračka pavel.ondracka@gmail.com 2012-01-29 15:04:14 CST --- Mesa has recently slightly changed behaviour, the linker is not as strict when rejecting shaders so it is up to the drivers to do what they can with invalid shaders. This is in some cases better, because some shaders that didn't worked before now work, however when the shader is actually addressing out of range constants it fails (to which the driver usually responds by creating a dummy shader and pretending nothing happened). This is really bad for debugging because when mesa is compiled without --enable-debug (majority of distros) there isn't any warning printed. and even in mesa debug build only radeon warns that there is dummy shader being created. I'll give you example how this complicates my life:
I've spend few hours trying to get Sims 3 working on computer with Intel GMA 4500HD. The game did start fine, however there was major corruption all over the place. Nothing interesting in terminal, some harmless wined3d fixmes, some audio stuff. As usual I tried some winetricks (d3d9x9 glsl-disable etc.), no luck. The Sims 3 is platinum so at that point I did suspect a driver issue. My stock mesa was 7.11 so I did compile a new one from git, still no luck. OK, so I was thinking about opening a bug report against mesa. To know if the component is i965 or mesa core I try to run it with llvmpipe. For this I had to make a trace with apitrace to be sure Wine doesn't choose another rendering path. Results: llvmpipe has the same corruption. Now I begin suspect that wine is doing something bad, so I did try that trace on another system with NVIDIA, with same results, but still no clue whats going on. Finally r300g driver prints helpfull: Too many constants:258, max:256. Creating a dummy shader instead.
Please, can there be some warning in the terminal when wine is generating those invalid shaders, so people can just look in the terminal and see whats going on? This would be really nice to have for 1.4 .
http://bugs.winehq.org/show_bug.cgi?id=29146
--- Comment #6 from Henri Verbeet hverbeet@gmail.com 2012-01-30 13:44:12 CST --- Created attachment 38608 --> http://bugs.winehq.org/attachment.cgi?id=38608 patch
Could you give the attached patch a try?
http://bugs.winehq.org/show_bug.cgi?id=29146
--- Comment #7 from Pavel Ondračka pavel.ondracka@gmail.com 2012-02-03 05:09:13 CST --- (In reply to comment #6)
Created attachment 38608 [details] patch
Could you give the attached patch a try?
Yes, there is now an error printed in affected apps, thank you.
http://bugs.winehq.org/show_bug.cgi?id=29146
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |56a4680b695963b9b16bed8f725 | |2cb0b54bbb11d Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #8 from Henri Verbeet hverbeet@gmail.com 2012-03-29 05:23:37 CDT --- Resolving FIXED.
http://bugs.winehq.org/show_bug.cgi?id=29146
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2012-03-30 13:34:26 CDT --- Closing bugs fixed in 1.5.1.