DescriptionFix GL_INVALID_OPERATION when querying FB config
Due to a possible Mesa bug[1], glGetFramebufferAttachmentParameteriv
fails with GL_INVALID_OPERATION when e.g. double buffering is disabled
and alpha bits are requested, which happens when pbuffer surfaces are
used. Since we don't need double buffering for pbuffer surfaces and
enabling it would increase memory consumption, we work around it by not
requesting this information when the surface is offscreen (which is
always true for pbuffer surfaces).
This will cause that the variables
`back_buffer_{color_format,has_depth,has_stencil}` stay at their
defaults (GL_RGBA, false, false), which shouldn't matter for an
offscreen surface.
[1] https://bugs.freedesktop.org/show_bug.cgi?id=90162
BUG=474974
Patch Set 1 #Patch Set 2 : don't enable double buffering, just don't execute problematic part when we don't need to #Messages
Total messages: 8 (2 generated)
|