Skip to content

Commit

Permalink
mesa: Remove misc pbuffer attributes from struct gl_config
Browse files Browse the repository at this point in the history
pbuffers aren't a first-class object in mesa, they're just funnily-named
framebuffers. It's thus somewhat silly to track this state separately
when it's effectively identical to GL_MAX_RENDERBUFFER_SIZE, and there's
never been a DRI driver that's ever set these values to anything
interesting. Drop them from mesa (but leave the tokens defined for
compatibility).

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 1f626eb commit 5ffd1eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
11 changes: 5 additions & 6 deletions src/mesa/drivers/dri/common/utils.c
Expand Up @@ -421,7 +421,6 @@ __DRIconfig **driConcatConfigs(__DRIconfig **a,
return all;
}

/* careful, lack of trailing semicolon */
#define __ATTRIB(attrib, field) case attrib: *value = config->modes.field; break

/**
Expand Down Expand Up @@ -489,11 +488,11 @@ driGetConfigAttribIndex(const __DRIconfig *config,
__ATTRIB(__DRI_ATTRIB_GREEN_MASK, greenMask);
__ATTRIB(__DRI_ATTRIB_BLUE_MASK, blueMask);
__ATTRIB(__DRI_ATTRIB_ALPHA_MASK, alphaMask);
__ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_WIDTH, maxPbufferWidth);
__ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_HEIGHT, maxPbufferHeight);
__ATTRIB(__DRI_ATTRIB_MAX_PBUFFER_PIXELS, maxPbufferPixels);
__ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH, optimalPbufferWidth);
__ATTRIB(__DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT, optimalPbufferHeight);
case __DRI_ATTRIB_MAX_PBUFFER_WIDTH:
case __DRI_ATTRIB_MAX_PBUFFER_HEIGHT:
case __DRI_ATTRIB_MAX_PBUFFER_PIXELS:
case __DRI_ATTRIB_OPTIMAL_PBUFFER_WIDTH:
case __DRI_ATTRIB_OPTIMAL_PBUFFER_HEIGHT:
case __DRI_ATTRIB_VISUAL_SELECT_GROUP:
*value = 0;
break;
Expand Down
7 changes: 0 additions & 7 deletions src/mesa/main/mtypes.h
Expand Up @@ -192,13 +192,6 @@ struct gl_config
GLint sampleBuffers;
GLuint samples;

/* SGIX_pbuffer / GLX 1.3 */
GLint maxPbufferWidth;
GLint maxPbufferHeight;
GLint maxPbufferPixels;
GLint optimalPbufferWidth; /* Only for SGIX_pbuffer. */
GLint optimalPbufferHeight; /* Only for SGIX_pbuffer. */

/* OML_swap_method */
GLint swapMethod;

Expand Down

0 comments on commit 5ffd1eb

Please sign in to comment.