glx: Remove glx_context::screen

We're already keeping a back pointer to the glx_screen which already
tracks this, it's not important enough to keep the screen number in two
places.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20549>
This commit is contained in:
Adam Jackson 2022-12-19 15:46:02 -05:00 committed by Marge Bot
parent 81f77f999b
commit 9de2776e01
5 changed files with 3 additions and 10 deletions

View file

@ -270,10 +270,6 @@ struct glx_context
*/
XID share_xid;
/**
* Screen number.
*/
GLint screen;
struct glx_screen *psc;
/**

View file

@ -239,7 +239,6 @@ glx_context_init(struct glx_context *gc,
if (!gc->majorOpcode)
return False;
gc->screen = psc->scr;
gc->psc = psc;
gc->config = config;
gc->isDirect = GL_TRUE;
@ -1481,7 +1480,7 @@ glXQueryContext(Display * dpy, GLXContext ctx_user, int attribute, int *value)
*value = ctx->config ? ctx->config->visualID : None;
break;
case GLX_SCREEN:
*value = ctx->screen;
*value = ctx->psc->scr;
break;
case GLX_FBCONFIG_ID:
*value = ctx->config ? ctx->config->fbconfigID : None;

View file

@ -43,7 +43,6 @@ glx_context_init(struct glx_context *gc,
struct glx_screen *psc, struct glx_config *config)
{
gc->majorOpcode = 123;
gc->screen = psc->scr;
gc->psc = psc;
gc->config = config;
gc->isDirect = GL_TRUE;
@ -507,7 +506,7 @@ TEST_F(glXCreateContextAttribARB_test, correct_context_screen_number)
struct glx_context *gc = (struct glx_context *) ctx;
EXPECT_EQ(7, gc->screen);
EXPECT_EQ(7, gc->psc->scr);
}
TEST_F(glXCreateContextAttribARB_test, correct_context_screen_pointer)

View file

@ -74,7 +74,6 @@ public:
this->vtable = &fake_glx_context::vt;
this->majorOpcode = 123;
this->screen = psc->scr;
this->psc = psc;
this->config = mode;
this->isDirect = false;

View file

@ -231,7 +231,7 @@ DRI_glXUseXFont(struct glx_context *CC, Font font, int first, int count, int lis
int i;
dpy = CC->currentDpy;
screen = CC->screen;
screen = CC->psc->scr;
fs = XQueryFont(dpy, font);
if (!fs) {