http://bugs.winehq.org/show_bug.cgi?id=16444
Summary: Running Steam version of civ 4 BTS using radeon open source driver with ati M 9200 crash in the first game frame Product: Wine Version: CVS/GIT Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: paniemin@cc.hut.fi
Created an attachment (id=17787) --> (http://bugs.winehq.org/attachment.cgi?id=17787) whole log (including some steam junk mostly in begin and after bt)
reproduce: 1. start game 2. load saved game 3. wait that game should start and wine crashes
System: Ubuntu 8.10 with all the latest updates. Athlon XP-M 2800+ Ati M-radeon 9200 (open source driver with XAA enabled) wine-1.1.10-130-gfba5c4f
Wine settup and background: I had it working and running surprising smoothly with only native overrides for msxml3 and d3dx9_(26,31,33). (worked in 1.1.X release untill 1.1.9) After wine 1.1.10 winehq update I tryed to play game but it crashed when it should have drawn the first frame of game view. After that I tryed to locate cause of problem but I wasn't able to make any version to work in bisect and then tryed to downgrade without success. So this might well be about some radeon driver update breaking something.
Error logs that follow are run using clean wineprefix with only native msxml3 and gecko installed. I can also try to run using native d3dx9_XX.dll's later.
Crash in same wine code can be seen in d3d8 visual.c test code.
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #1 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-09 19:37:13 --- Created an attachment (id=17788) --> (http://bugs.winehq.org/attachment.cgi?id=17788) trace from just before the crash including crash report.
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #2 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-09 19:40:19 --- Created an attachment (id=17789) --> (http://bugs.winehq.org/attachment.cgi?id=17789) d3d6 visual.c test case run tracing d3d channels
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #3 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-09 19:59:46 --- Also link to the problem file in driver code: http://webcvs.freedesktop.org/mesa/Mesa/src/mesa/drivers/dri/r200/r200_maos_...
http://bugs.winehq.org/show_bug.cgi?id=16444
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID
--- Comment #4 from Vitaliy Margolen vitaliy@kievinfo.com 2008-12-09 21:42:35 --- Clearly a driver bug: ommon\sid meier's civilization iv beyond the sword\beyond the sword\Civ4BeyondSword.exe: r200_maos_arrays.c:403: r200EmitArrays: Assertion `0' failed.
Invalid. Report to makers of the driver.
http://bugs.winehq.org/show_bug.cgi?id=16444
Vitaliy Margolen vitaliy@kievinfo.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Vitaliy Margolen vitaliy@kievinfo.com 2008-12-09 21:42:48 --- closing invalid
http://bugs.winehq.org/show_bug.cgi?id=16444
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|directx-d3d |-unknown Version|CVS/GIT |1.1.10
http://bugs.winehq.org/show_bug.cgi?id=16444
Pauli Nieminen paniemin@cc.hut.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|CLOSED |UNCONFIRMED Resolution|INVALID |
--- Comment #6 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-12 07:37:14 --- I have beend debuging the crash and problem seems to be this (at leas in d3d8 test case)
Wine frequantly disables VERTEX_PROGRAM_ARB in shader_select function. In the test that crash happens DrawPrimitiveUP is called with vertex shader enabled but wine never tells GL to enable vertex prgorams before glDrawArrays is called. Now driver tries to handle drawing code but it thinks fixed function pipeline should be used for vertex processing because vertex program isn't enabled. assertion failure happens in code that tries to upload fixed function data to card but wine haven't provided correct data for that.
If I enable VERTEX_PROGRAM_ARB in IWineD3DDeviceImpl_CreateVertexShader all test case are run but I get 3 failures. So problem is that wine doesn't correctly call shader_select before trying to render the scene.
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #7 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-12 07:38:40 --- Failing test is rcp_rsq in visual.c
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #8 from Stefan Dösinger stefandoesinger@gmx.at 2008-12-12 07:49:36 --- Created an attachment (id=17863) --> (http://bugs.winehq.org/attachment.cgi?id=17863) A hack that may fix the problem
Does the attached hack fix the problem? If yes, that would confirm your theory that WineD3D doesn't properly enable GL_ARB_vertex_program
In the crashing d3d test trace a vertex shader is set indeed, so GL_ARB_vertex_program should be enabled.
I suspect that there's some bug in the code triggered by the lack of pixel shader support. shader_select() is never properly called, only when disabling vertex shaders
You said that this worked before. Can you run a regression test?
http://bugs.winehq.org/show_bug.cgi?id=16444
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |stefandoesinger@gmx.at
--- Comment #9 from Stefan Dösinger stefandoesinger@gmx.at 2008-12-12 07:50:50 --- (sorry, I missed your line that a bisect didn't work)
http://bugs.winehq.org/show_bug.cgi?id=16444
Pauli Nieminen paniemin@cc.hut.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #17789|0 |1 is obsolete| |
--- Comment #10 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-12 08:31:36 --- Created an attachment (id=17867) --> (http://bugs.winehq.org/attachment.cgi?id=17867) Visual test with vertext program hack
stderr looks like: WINEDEBUG="trace+d3d,+d3d8,+d3d_draw,+d3d_shader" ../../../wine d3d8_test.exe.so visual 2> visual_test_with_patch.log visual.c:586: Test failed: Color components differ: c1 = 80, c2 = 00, c3 = 80 visual.c:619: Test failed: Color components differ: c1 = 80, c2 = 00, c3 = 80 visual.c:621: Test failed: Color component value is 80 visual: 341 tests executed (0 marked as todo, 3 failures), 0 skipped.
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #11 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-12 08:44:56 --- 3DMark2001SE notes: - DOT3 bumpmaping test doesn't any more crsah randomly (It used to crash quite frequantly if all test were run before it) - Car chase high details is still rending black terrain. This seems like related to bad gl extension handling that calls glEnable/glDisable every frame. First second in test terrain is rendered correctly but then all goes black. Around same time log includes multiple calls to glDisable(GL_VERTEX_PROGRAM_ABR) - Test result: Even with -O0 wine version I get better score than ever. 1500 now and previus record was ~1390. Good work with performance :)
Civ4: - Now startups but renders incorrectly (Terrain is just different color boxes like before with some combination of VS/PS disabled) - But still crashing with my vertex program hack.
http://bugs.winehq.org/show_bug.cgi?id=16444
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=16444
Stefan Dösinger stefandoesinger@gmx.at changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1
--- Comment #12 from Stefan Dösinger stefandoesinger@gmx.at 2008-12-13 15:49:29 --- I sent a patch that should at least fix the tests: http://www.winehq.org/pipermail/wine-patches/2008-December/065981.html
I don't know if it magically fixes the games, there may be other bugs involved.
If this stuff worked before and is broken now it is very likely due to a change in the driver. The wine-side problem must be very old.
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #13 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-15 04:49:05 --- Created an attachment (id=17951) --> (http://bugs.winehq.org/attachment.cgi?id=17951) hack to check if ps is supported before trying to create one
I found that civ4 assumes that pixel shader is there and tries to create one. If I make CreatePixleShader fail if no pixel shader hw support is available civ4 renders correctly. So problem is that neither shader create function is checking if hardware support is available in case of program not checking caps correctly.
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #14 from Stefan Dösinger stefandoesinger@gmx.at 2008-12-15 05:51:13 --- This check is mostly correct. One thing only: instead of checking if shaders are supported at all, we should check if the shader version of the shader passed in is supported.
So far we didn't check this because (a) we were too lazy to do this, and (b) ARBvp and ARBfp *almost* support 2.0 shaders, but not 100%. That way we got away with running some 2.0-requiring apps with ARB.
Still we should probably add such checks. Please write a test case showing that they are correct too.
http://bugs.winehq.org/show_bug.cgi?id=16444
Pauli Nieminen paniemin@cc.hut.fi changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #17951|0 |1 is obsolete| |
--- Comment #15 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-20 07:42:39 --- Created an attachment (id=18091) --> (http://bugs.winehq.org/attachment.cgi?id=18091) Fix a crash in shader creation if set function failed
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #16 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-20 07:43:31 --- Created an attachment (id=18092) --> (http://bugs.winehq.org/attachment.cgi?id=18092) Real check for shader version support and test case
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #17 from Pauli Nieminen paniemin@cc.hut.fi 2008-12-20 07:44:16 --- Created an attachment (id=18093) --> (http://bugs.winehq.org/attachment.cgi?id=18093) Reduce debug messages level so test cases won't generate too much spam
http://bugs.winehq.org/show_bug.cgi?id=16444
--- Comment #18 from Austin English austinenglish@gmail.com 2009-06-30 11:38:59 --- Is this still an issue in current (1.1.24 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=16444
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |ABANDONED
--- Comment #19 from Austin English austinenglish@gmail.com 2010-06-04 15:45:43 --- No response in over 11 months, marking abandoned. If this is still an issue in current (1.2-rc2 or newer) wine, and you can provide the needed information, feel free to reopen.
http://bugs.winehq.org/show_bug.cgi?id=16444
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #20 from Austin English austinenglish@gmail.com 2010-06-04 15:46:16 --- Closing.