http://bugs.winehq.org/show_bug.cgi?id=14031
Summary: Max Payne 2: GL_INVALID_OPERATION in texture_activate_dimensions Product: Wine Version: 1.0.0 Platform: PC-x86-64 URL: http://www.rockstargames.com/maxpayne2/mp2_downloads.htm l OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: directx-d3d AssignedTo: wine-bugs@winehq.org ReportedBy: liquid.acid@gmx.net CC: alexd4@inbox.lv
Created an attachment (id=14243) --> (http://bugs.winehq.org/attachment.cgi?id=14243) max payne 2 demo run (large parts but out because they were identical)
Hi there,
I'm currently trying to get the Max Payne 2 demo running on my nvidia Geforce FX 5900 based system. It has some issues with mirror reflections, bullettime postprocessing and some other bugs already mentioned on the tracker.
I don't know how much this is related, but during the game wine spits out a lot of messages on the console. During some normal length gaming sessions (should have been around 20 minutes) I already got a >100MB logfile, without any tracing activated, just running wine with no options.
The errors are of this type: fixme:d3d:texture_activate_dimensions >>>>>>>>>>>>>>>>> GL_INVALID_OPERATION (0x502) from glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, ...) @ utils.c / 3410
In fact I shouldn't say "this type", it's always exactly this line.
I'm going to attach a modified log (cut out most of the log, because this message repeats endlessly) so you have bit more context.
I'm adding Alexander to CC because he probably knows why this happens ;-)
Naturally I also did some research:
From dlls/wined3d/utils.c:
if(GL_SUPPORT(NV_TEXTURE_SHADER2)) { glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, bumpmap ? GL_OFFSET_TEXTURE_2D_NV : GL_TEXTURE_2D); checkGLcall("glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, ...)");
These are line 3408 - 3410.
Links to NV texture shader extension docs: http://www.opengl.org/registry/specs/NV/texture_shader.txt http://www.opengl.org/registry/specs/NV/texture_shader2.txt (I still have to take a deeper look)
"GL_INVALID_OPERATION is generated if glTexEnv is executed between the execution of glBegin and the corresponding execution of glEnd."
In case NV_texture_shader doesn't change glTexEnv so much that also other conditions can lead to GL_INVALID_OPERATION there should be some problems in the calling function of texture_activate_dimensions.
Any way of outputting the call stack from texture_activate_dimensions?
Cheers, Tobias