From: Kevin Strasser Date: Fri, 25 Jan 2019 00:36:29 +0000 (-0800) Subject: glx: Add fields for color shifts X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d4a9010338e191cb9b3f2d1c666e0b5f2275e84b;p=mesa.git 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 Reviewed-by: Adam Jackson Reviewed-by: Marek Olšák Reviewed-by: Emil Velikov --- 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 */