Bug 23941 - Wine offscreen rendering causes GL_INVALID_FRAMEBUFFER_OPERATION_EXT
Summary: Wine offscreen rendering causes GL_INVALID_FRAMEBUFFER_OPERATION_EXT
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-14 13:46 UTC by Sven Arvidsson
Modified: 2010-03-12 12:29 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Sven Arvidsson 2009-09-14 13:46:46 UTC
As of a few releases ago, Wine uses framebuffer objects to render render offscreen images and textures. This doesn't work so well in Mesa. Games have rendering errors, or does not render at all and prints a lot of these errors:

fixme:d3d:context_check_fbo_status FBO status GL_FRAMEBUFFER_UNSUPPORTED_EXT (0x8cdd)
fixme:d3d:context_check_fbo_status 	Color attachment 0: (0xa1a2190) WINED3DFMT_A8R8G8B8 800x600
fixme:d3d:context_check_fbo_status 	Depth attachment: (0x2193a8) WINED3DFMT_D24S8 800x600
fixme:d3d_draw:drawStridedFast >>>>>>>>>>>>>>>>> GL_INVALID_FRAMEBUFFER_OPERATION_EXT (0x506) from glDrawArrays @ ../../../dlls/wined3d/drawprim.c / 63

In some cases, this can be worked around by setting the registry key OffscreenRenderingMode to backbuffer (the old default) as documented here: http://wiki.winehq.org/UsefulRegistryKeys 

But it would of course be great if this wasn't necessary. Not sure if this more of an enhancement request than a bug report, please reassign as necessary.
Comment 1 Brian Paul 2009-09-21 17:16:09 UTC
I don't have time to investigate, but does Wine have a search method for finding supported framebuffer configurations?  If you read the spec, the driver is free to mark the FBO as GL_FRAMEBUFFER_UNSUPPORTED_EXT for nearly any reason (ex: trying to render to a RGB232 color buffer, or not using a combined Z/stencil buffer).  So the app (Wine) should retry different configurations until it finds one that works.  I don't know if Wine does that.
Comment 2 Henri Verbeet 2009-09-22 01:32:00 UTC
(In reply to comment #1)
> I don't have time to investigate, but does Wine have a search method for
> finding supported framebuffer configurations?  If you read the spec, the driver
> is free to mark the FBO as GL_FRAMEBUFFER_UNSUPPORTED_EXT for nearly any reason
> (ex: trying to render to a RGB232 color buffer, or not using a combined
> Z/stencil buffer).  So the app (Wine) should retry different configurations
> until it finds one that works.  I don't know if Wine does that.
> 
We check which formats can be attached as color attachment and have fallback formats for a few. It doesn't check things like depth/stencil combinations. The requested combination (GL_RGBA8/GL_DEPTH24_STENCIL8_EXT) doesn't strike me as something that's likely to be unsupported though.

Is there a Wine bug filed for this? From the posted output it isn't clear to me that this is necessarily a Mesa bug.
Comment 3 Sven Arvidsson 2009-09-22 06:02:40 UTC
I haven't filed any bugs against Wine for this no. 

The game I tried for this is the Halo demo, which according to the AppDB entry is very well supported:
http://appdb.winehq.org/objectManager.php?sClass=version&iId=6978
Comment 4 Sven Arvidsson 2010-03-12 12:29:11 UTC
This is working a lot better now, both games in Wine in general, and the specific title I used for testing this (the Halo demo). 

Both the rendering errors and the warning message is gone. 



Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.