nv50,nvc0: Support BGRX1010102 and RGBX1010102 for sampling.
authorMario Kleiner <mario.kleiner.de@gmail.com>
Mon, 12 Mar 2018 20:45:44 +0000 (21:45 +0100)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 15 Mar 2018 01:41:27 +0000 (21:41 -0400)
commitc1e47a3c1fb380b36b7e403c248fbb5ce9e74ffe
treea6b857a59284f34fc7b8107e8e0176d0e47f03b4
parent03e37ec6d720bb5d416e98d6f6d9663086939e4d
nv50,nvc0: Support BGRX1010102 and RGBX1010102 for sampling.

Add them as usable for textures, so they can be used by
Wayland drm in 10 bpc mode and for X11 compositing under
GLX and EGL. We need these formats to be supported at
least for sampling, otherwise GLX_texture_from_pixmap
and the equivalent EGL image extension won't work with
X11 drawables of depth 30 and just display an all black
window.

Do not expose these formats as renderable, and thereby
not as a fbconfig/EGLConfig/Visual, as NVidia hw does
not support 10 bpc unorm formats without alpha channel.

Tested under X11 + GLX/EGL + DRI2/DRI3 for compositing,
and under Wayland+Weston drm backend with a Tesla and
Pascal gpu.

Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_formats.c