summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2021-03-24 12:16:51 -0400
committerMarge Bot <eric+marge@anholt.net>2021-03-30 20:33:51 +0000
commitc17d35b4029a58e7c29b5024dbc0f4da2b45f893 (patch)
treef79b2e302932aee67193e80ea50f367f541e7d30
parentc212283ef8e7b877dac17294bc447495665ad519 (diff)
mesa: Remove transparency state from struct gl_config
We never set this to anything interesting, and this is really winsys state not GL state anyway. Nota bene: __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE is set to GLX_NONE instead of the GLX_DONT_CARE we looked like we were doing before. This is to preserve backward compatibility with older (technically, all current) X servers, which when building their fbconfigs initialize a field named 'transparentPixel' _twice_, and the second time from __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, but then uses 'transparentPixel's value for GLX_TRANSPARENT_TYPE. Which, GLX_DONT_CARE isn't a valid value for that, so glx-fbconfig-sanity fails among much else. This is harmless, in that I don't think any DRI driver has ever wired this up (I can't find any evidence in r100 or mga history) and certainly none that we can currently load have this working. Reviewed-by: Eric Anholt <eric@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9817>
-rw-r--r--src/mesa/drivers/dri/common/utils.c23
-rw-r--r--src/mesa/main/mtypes.h6
2 files changed, 10 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index 7270367c54e..a11817e450a 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -350,13 +350,6 @@ driCreateConfigs(mesa_format format,
modes->stencilBits = stencil_bits[k];
modes->depthBits = depth_bits[k];
- modes->transparentPixel = GLX_NONE;
- modes->transparentRed = GLX_DONT_CARE;
- modes->transparentGreen = GLX_DONT_CARE;
- modes->transparentBlue = GLX_DONT_CARE;
- modes->transparentAlpha = GLX_DONT_CARE;
- modes->transparentIndex = GLX_DONT_CARE;
-
if (db_modes[i] == __DRI_ATTRIB_SWAP_NONE) {
modes->doubleBufferMode = GL_FALSE;
modes->swapMethod = __DRI_ATTRIB_SWAP_UNDEFINED;
@@ -466,12 +459,16 @@ driGetConfigAttribIndex(const __DRIconfig *config,
__ATTRIB(__DRI_ATTRIB_DOUBLE_BUFFER, doubleBufferMode);
__ATTRIB(__DRI_ATTRIB_STEREO, stereoMode);
__ATTRIB(__DRI_ATTRIB_AUX_BUFFERS, numAuxBuffers);
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_TYPE, transparentPixel);
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_INDEX_VALUE, transparentPixel);
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_RED_VALUE, transparentRed);
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_GREEN_VALUE, transparentGreen);
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_BLUE_VALUE, transparentBlue);
- __ATTRIB(__DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE, transparentAlpha);
+ case __DRI_ATTRIB_TRANSPARENT_TYPE:
+ case __DRI_ATTRIB_TRANSPARENT_INDEX_VALUE: /* horrible bc hack */
+ *value = GLX_NONE;
+ break;
+ case __DRI_ATTRIB_TRANSPARENT_RED_VALUE:
+ case __DRI_ATTRIB_TRANSPARENT_GREEN_VALUE:
+ case __DRI_ATTRIB_TRANSPARENT_BLUE_VALUE:
+ case __DRI_ATTRIB_TRANSPARENT_ALPHA_VALUE:
+ *value = GLX_DONT_CARE;
+ break;
case __DRI_ATTRIB_FLOAT_MODE:
*value = config->modes.floatMode;
break;
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 97178e9cfbe..4c77561ef60 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -182,12 +182,6 @@ struct gl_config
/* EXT_visual_rating / GLX 1.2 */
GLint visualRating;
- /* EXT_visual_info / GLX 1.2 */
- GLint transparentPixel;
- /* colors are floats scaled to ints */
- GLint transparentRed, transparentGreen, transparentBlue, transparentAlpha;
- GLint transparentIndex;
-
/* ARB_multisample / SGIS_multisample */
GLint sampleBuffers;
GLuint samples;