glx: Add fields for color shifts
authorKevin Strasser <kevin.strasser@intel.com>
Fri, 25 Jan 2019 00:36:29 +0000 (16:36 -0800)
committerAdam Jackson <ajax@nwnk.net>
Wed, 21 Aug 2019 18:36:57 +0000 (18:36 +0000)
glx doesn't read the masks from the dri config directly, but for consistency
add shifts to the glxconfig.

Signed-off-by: Kevin Strasser <kevin.strasser@intel.com>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
src/glx/dri_common.c
src/glx/glxconfig.h

index d7279d7d1fb6258237310052ec8e24ba7e04b7fe..a5fae27fce9dbcfc385b5cf096e48f8fea97eda8 100644 (file)
@@ -166,6 +166,10 @@ static const struct
       __ATTRIB(__DRI_ATTRIB_GREEN_MASK, greenMask),
       __ATTRIB(__DRI_ATTRIB_BLUE_MASK, blueMask),
       __ATTRIB(__DRI_ATTRIB_ALPHA_MASK, alphaMask),
+      __ATTRIB(__DRI_ATTRIB_RED_SHIFT, redShift),
+      __ATTRIB(__DRI_ATTRIB_GREEN_SHIFT, greenShift),
+      __ATTRIB(__DRI_ATTRIB_BLUE_SHIFT, blueShift),
+      __ATTRIB(__DRI_ATTRIB_ALPHA_SHIFT, alphaShift),
 #endif
       __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_WIDTH, maxPbufferWidth),
       __ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_HEIGHT, maxPbufferHeight),
index b8e9271daff6b977409a031bc1bb7c2a0d066bd3..75704737ef533511642c523b67aa969946e1ded3 100644 (file)
@@ -38,6 +38,7 @@ struct glx_config {
 
     GLint redBits, greenBits, blueBits, alphaBits;     /* bits per comp */
     GLuint redMask, greenMask, blueMask, alphaMask;
+    GLuint redShift, greenShift, blueShift, alphaShift;
     GLint rgbBits;             /* total bits for rgb */
     GLint indexBits;           /* total bits for colorindex */