[PATCH xserver 5/5] glamor: Use GL_RGBA format for 8-bit depth

Olivier Fourdan ofourdan at redhat.com
Fri Apr 21 06:30:09 UTC 2017


Hi Eric,

> Olivier Fourdan <ofourdan at redhat.com> writes:
> 
> > For some hardware, GL_RGBA is the safest option for textures to bind to
> > an FBO for depth 8 as GL_ALPHA might be unsupported.
> >
> > This allows using glamor-xv on hardware that don't support GL_ALPHA
> > textures attaching to an FBO, such as nouveau on nv30.
> >
> > Newer hardware use GL_RED and texture swizzle anyway, so this change is
> > of limited impact.
> 
> Does nv30 not support *any* 8-bit render target?

Tried with GL_INTENSITY, didn't work either.

> Also, blowing up our XV textures to 32-bit can't be good for its
> performance.  Could we just use GLAMOR_CREATE_FBO_NO_FBO (worst name) to
> have our XV pixmaps not actually create an FBO?  We already use
> glamor_upload_boxes(), so I think that would work.

Blimey, you're absolutely correct, I took for granted that the FBO was needed (also because pixmap_priv_get_scale() uses pixmap_priv->fbo size) but it is not and it works just fine with no FBO (failing to attach to the FBO releases the fbo entirely whereas GLAMOR_CREATE_FBO_NO_FBO creates the structure but not the actual framebuffer object so it's just fine)

Trivial patch to follow shortly.

Cheers,
Olivier


More information about the xorg-devel mailing list