Skip to content

Commit

Permalink
mesa: Remove the texture-from-pixmap state from struct gl_config
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
nwnk authored and Marge Bot committed Mar 30, 2021
1 parent 5ffd1eb commit c212283
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 21 deletions.
27 changes: 13 additions & 14 deletions src/mesa/drivers/dri/common/utils.c
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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);
Expand Down
7 changes: 0 additions & 7 deletions src/mesa/main/mtypes.h
Expand Up @@ -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;

Expand Down

0 comments on commit c212283

Please sign in to comment.