http://bugs.winehq.org/show_bug.cgi?id=14774
Summary: Max Payne 2: PP effects flood console with GL errors (ORM=fbo) Product: Wine Version: 1.1.1 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: hverbeet@gmail.com
Hi there,
this is a regression introduced between wine-1.1.0 and wine-1.1.1, bisecting turns up these commits: [2d4d18b59dc26b8aee04553671b942071d9213b9] wined3d: Delay render target activation. [4f77c29bcf58a88cea8fb833f770aa107960b34e] wined3d: Track depth stencil location per-surface.
Actually I had to do two bisects, one separate for the glReadBuffer error, and one for the two other messages.
Affected game: Max Payne 2 (demo)
Wine settings: OffscreenRenderingMode=fbo UseGLSL=disabled
Ingame settings: PostProcessingEffects=medium PixelShaderSkins=off
Hardware: nVidia Geforce FX 5900 Drivers: nvidia-drivers-173.14.09
GL errors only show up when PP effects are used in the game. There are two types: (a) bullettime, using a sepia tone filter (b) cutscenes, using a motion blur filter
GL errors depend on whether (a) or (b) is currently active:
For (a) I get these GL errors: (*) fixme:d3d_surface:read_from_framebuffer_texture >>>>>>>>>>>>>>>>> GL_INVALID_ENUM (0x500) from glReadBuffer @ surface.c / 913 (**) fixme:d3d_shader:shader_arb_deselect_depth_blt >>>>>>>>>>>>>>>>> GL_INVALID_OPERATION (0x502) from glBindProgramARB(GL_VERTEX_PROGRAM_ARB, vertexShader->prgId); @ arb_program_shader.c / 1832
And for (b) those: (*) fixme:d3d_surface:read_from_framebuffer_texture >>>>>>>>>>>>>>>>> GL_INVALID_ENUM (0x500) from glReadBuffer @ surface.c / 913 (***) fixme:d3d_shader:shader_arb_deselect_depth_blt >>>>>>>>>>>>>>>>> GL_INVALID_OPERATION (0x502) from glDisable(GL_VERTEX_PROGRAM_ARB) @ arb_program_shader.c / 1840
Note that the errors don't show up with ORM=backbuffer.
This are essentially three errors, I marked them each with asteriks. Notice that the (*) GL error happens in both "modes".
During bisecting I noticed that the (*) GL error was introduced a different commit than the (**)/(***) (which are introduced by one and the same commit).
For testing both wine versions (1.1.0 and 1.1.1) the sourcecode was patched with http://source.winehq.org/git/wine.git/?a=commit;h=2583975ec799527cebc3238916..., to not hit the slow driver fallback. Wine did only use ARB_tex_rect for NP2 textures then. This can also be achieved by commenting out the ARB_tex_npot extension line in wined3d/directx.c
The GL errors still show up with wine git master (last commit: b572170da5f35a80c6bb07ab8ebcda7a854f27f), there with an additional GL error: fixme:d3d:apply_draw_buffer >>>>>>>>>>>>>>>>> GL_INVALID_OPERATION (0x502) from glDrawBuffers() @ context.c / 1064
However this one (the "draw buffers" one) should be fixed in latest git.
The (*) GL error is introduced by the commit: [2d4d18b59dc26b8aee04553671b942071d9213b9] wined3d: Delay render target activation. (Adding Stefan Dösinger to CC)
The (**) and (***) GL error is introduced by the commit: [4f77c29bcf58a88cea8fb833f770aa107960b34e] wined3d: Track depth stencil location per-surface. (Adding Henri Verbeet to CC)