summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@redhat.com>2021-03-24 11:57:11 -0400
committerMarge Bot <eric+marge@anholt.net>2021-03-30 20:33:51 +0000
commitc212283ef8e7b877dac17294bc447495665ad519 (patch)
treecce29c04b2a45c4a983b24d42946904596cc23ec
parent5ffd1ebe6b3c8c7dd316dd47fac088044222e6ef (diff)
mesa: Remove the texture-from-pixmap state from struct gl_config
This never varies at all, let alone per-config. GLX does read these values out though so hardwire the values in a different place. 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.c27
-rw-r--r--src/mesa/main/mtypes.h7
2 files changed, 13 insertions, 21 deletions
diff --git a/src/mesa/drivers/dri/common/utils.c b/src/mesa/drivers/dri/common/utils.c
index f2d98d9f2ff..7270367c54e 100644
--- a/src/mesa/drivers/dri/common/utils.c
+++ b/src/mesa/drivers/dri/common/utils.c
@@ -369,15 +369,6 @@ driCreateConfigs(mesa_format format,
modes->samples = msaa_samples[h];
modes->sampleBuffers = modes->samples ? 1 : 0;
- modes->bindToTextureRgb = GL_TRUE;
- modes->bindToTextureRgba = GL_TRUE;
- modes->bindToMipmapTexture = GL_FALSE;
- modes->bindToTextureTargets =
- __DRI_ATTRIB_TEXTURE_1D_BIT |
- __DRI_ATTRIB_TEXTURE_2D_BIT |
- __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT;
-
- modes->yInverted = GL_TRUE;
modes->sRGBCapable = is_srgb;
modes->mutableRenderBuffer = mutable_render_buffer;
}
@@ -503,11 +494,19 @@ driGetConfigAttribIndex(const __DRIconfig *config,
case __DRI_ATTRIB_MIN_SWAP_INTERVAL:
*value = 0;
break;
- __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGB, bindToTextureRgb);
- __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_RGBA, bindToTextureRgba);
- __ATTRIB(__DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE, bindToMipmapTexture);
- __ATTRIB(__DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS, bindToTextureTargets);
- __ATTRIB(__DRI_ATTRIB_YINVERTED, yInverted);
+ case __DRI_ATTRIB_BIND_TO_TEXTURE_RGB:
+ case __DRI_ATTRIB_BIND_TO_TEXTURE_RGBA:
+ case __DRI_ATTRIB_YINVERTED:
+ *value = GL_TRUE;
+ break;
+ case __DRI_ATTRIB_BIND_TO_MIPMAP_TEXTURE:
+ *value = GL_FALSE;
+ break;
+ case __DRI_ATTRIB_BIND_TO_TEXTURE_TARGETS:
+ *value = __DRI_ATTRIB_TEXTURE_1D_BIT |
+ __DRI_ATTRIB_TEXTURE_2D_BIT |
+ __DRI_ATTRIB_TEXTURE_RECTANGLE_BIT;
+ break;
__ATTRIB(__DRI_ATTRIB_FRAMEBUFFER_SRGB_CAPABLE, sRGBCapable);
__ATTRIB(__DRI_ATTRIB_MUTABLE_RENDER_BUFFER, mutableRenderBuffer);
__ATTRIB(__DRI_ATTRIB_RED_SHIFT, redShift);
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 7e94b3a721d..97178e9cfbe 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -195,13 +195,6 @@ struct gl_config
/* OML_swap_method */
GLint swapMethod;
- /* EXT_texture_from_pixmap */
- GLint bindToTextureRgb;
- GLint bindToTextureRgba;
- GLint bindToMipmapTexture;
- GLint bindToTextureTargets;
- GLint yInverted;
-
/* EXT_framebuffer_sRGB */
GLint sRGBCapable;