[Mesa-dev] [PATCH 2/3] mesa: fix pbuffers because internally they are front buffers

Marek Olšák maraeo at gmail.com
Tue Apr 30 17:43:32 UTC 2019


I have never understood why Mesa has gl_context::Visual and
gl_framebuffer::Visual. The Mesa code also allows a non-matching
doublebuffer setting between the two. libEGL also always uses a
singlebuffered config for pixmaps and pbuffers even if the context config
is doublebuffered.

Marek

On Tue, Apr 30, 2019, 1:25 PM Adam Jackson <ajax at redhat.com> wrote:

> On Mon, 2019-04-29 at 20:35 -0400, Marek Olšák wrote:
>
> > Yeah that's possible. The thing is that a GL context can have a
> > doublebuffered config and begin with GL_BACK as the draw buffer, but
> > MakeCurrent can set a pbuffer with a singlebuffered config and then
> > nothing is rendered with Mesa because there is no back buffer. This
> > case appears to work on NVIDIA.
>
> Okay, that makes sense. Thanks for the explanation.
>
> I think this is only true because of EGL_KHR_no_config_context? If the
> context has a config, then you shouldn't be able to make a single-
> buffered pbuffer current to a double-buffered context. EGL section
> 2.2's definition of compatibility includes having "color and ancillary
> buffers of the same depth"; if you don't have a back buffer, then you
> have zero bits of back buffer, and you would not be compatible with
> non-zero bits of back buffer. I would think, anyway.
>
> Now if you bind a single-buffered pbuffer to a no-config context,
> obviously rendering should go to GL_FRONT.
>
> - ajax
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20190430/583ba659/attachment.html>


More information about the mesa-dev mailing list