Deep Color support

Pekka Paalanen ppaalanen at gmail.com
Sun Apr 27 08:25:45 PDT 2014


On Sun, 27 Apr 2014 11:35:37 +0200
Wolfgang Draxinger <wdraxinger.maillist at draxit.de> wrote:

> On Sun, 27 Apr 2014 11:30:18 +0300
> Pekka Paalanen <ppaalanen at gmail.com>
> wrote:
> 
> 
> > > I'm still trying to get an GBM configuration working that
> > > targets an off-screen buffer so that OpenGL operations are
> > > carried out toward it on the GPU but without attaching it to
> > > a CRTC.
> > 
> > I think you should do that with an FBO in GL, not GBM directly.
> 
> Well, to create an FBO in OpenGL you need a context first.

Sure, but that context and EGLConfig have nothing to do with what
pixel formats you can use with FBO. Just create a context with
whatever format, and then use FBO with the right format, and never
render into the EGLSurface.

> Technically nothing in the OpenGL specification forbids creating
> a context without a main framebuffer. Just no implementation
> supports it.
> 
> > If you instead mean a buffer backing a window, then the
> > limitations are just what the GPU can render and texture, which
> > I would assume is much less restrictive than the supported
> > scanout formats.
> 
> That one!
> 
> > By main framebuffer, I assumed you were talking about the buffer
> > that gets scanned out, that is the final composite.
> 
> No, by "main" framebuffer I mean the memory area "clients" write
> to, i.e. the memory area that's read from the clients by the
> compositor. In OpenGL terms the framebuffer with the id 0 (i.e.
> where things get rendered to after a glBindFramebuffer(0) call;
> or by default).

Ok, let's try to avoid the term "main" then. Let's talk about
window (storage/backing) buffers (in Wayland terms generally just
"client buffers"), and (compositor's) scanout buffers.

> With GLX (and wgl) there are PBuffers; unfortunately those are
> tied to the graphics server as well. That's quite annoying,
> because if you switch to a different X server, then all OpenGL
> contexts will operate into "nirvana".

Sorry?

> If you do, what I do at work for example (we're doing realtime
> visualization of interferometric signals) and just want to render
> to a video in the background, you must not switch to a different
> X11 server so that the video doesn't get corrupted. BT;DT. This
> is one of the incentives for me to look into creating OpenGL
> backing stores tied to a GPU (instead of OS-Mesa softpipe), that
> are not tied to a scanout buffer or even a display server.

Huh?

For FBO, you can create the storage with e.g. glTexImage2D, or some
of the renderbuffer functions.

If you don't want to work with a window system, then don't. Create
a context with whatever EGLSurface you can, and then just always
use an FBO, leaving the EGLSurface unused.

I guess I just don't understand what "switching X11 servers" means
here.

This here has pretty much nothing to do with Wayland. Wayland is
only about handing a buffer to the compositor for display. There is
nothing like Xrender at all.


Thanks,
pq


More information about the wayland-devel mailing list