[Mesa-dev] [PATCH 05/13] glx: Add fields for color shifts
Kevin Strasser
kevin.strasser at intel.com
Mon Jan 28 18:42:48 UTC 2019
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 at intel.com>
---
src/glx/dri_common.c | 4 ++++
src/glx/glxconfig.h | 1 +
2 files changed, 5 insertions(+)
diff --git a/src/glx/dri_common.c b/src/glx/dri_common.c
index fb8a29f..8040bbe 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 2f1074c..13f5a4e 100644
--- a/src/glx/glxconfig.h
+++ b/src/glx/glxconfig.h
@@ -41,6 +41,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 */
--
2.7.4
More information about the mesa-dev
mailing list