summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Strasser <[email protected]>2019-01-24 16:36:29 -0800
committerAdam Jackson <[email protected]>2019-08-21 18:36:57 +0000
commitd4a9010338e191cb9b3f2d1c666e0b5f2275e84b (patch)
tree4e57fb8b1784739697b20e0e5c203061a95c5701
parent7b4ed2b513efad86616e932eb4bca20557addc78 (diff)
glx: Add fields for color shifts
glx doesn't read the masks from the dri config directly, but for consistency add shifts to the glxconfig. Signed-off-by: Kevin Strasser <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
-rw-r--r--src/glx/dri_common.c4
-rw-r--r--src/glx/glxconfig.h1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index d7279d7d1fb..a5fae27fce9 100644
--- a/src/glx/dri_common.c
+++ b/src/glx/dri_common.c
@@ -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),
diff --git a/src/glx/glxconfig.h b/src/glx/glxconfig.h
index b8e9271daff..75704737ef5 100644
--- a/src/glx/glxconfig.h
+++ b/src/glx/glxconfig.h
@@ -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 */