loader/dri3: inline DRI_CORE

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
This commit is contained in:
Mike Blumenkrantz 2024-07-25 12:56:54 -04:00 committed by Marge Bot
parent 029ec1a20b
commit 87720ab42b
4 changed files with 5 additions and 9 deletions

View file

@ -1927,7 +1927,6 @@ dri2_initialize_x11_dri3(_EGLDisplay *disp)
loader_init_screen_resources(&dri2_dpy->screen_resources, dri2_dpy->conn,
dri2_dpy->screen);
dri2_dpy->loader_dri3_ext.core = dri2_dpy->core;
dri2_dpy->loader_dri3_ext.image_driver = dri2_dpy->image_driver;
dri2_dpy->loader_dri3_ext.flush = dri2_dpy->flush;
dri2_dpy->loader_dri3_ext.tex_buffer = dri2_dpy->tex_buffer;

View file

@ -912,7 +912,6 @@ dri3_create_screen(int screen, struct glx_display * priv, bool driver_name_is_in
goto handle_error;
}
psc->loader_dri3_ext.core = psc->core;
psc->loader_dri3_ext.flush = psc->f;
psc->loader_dri3_ext.tex_buffer = psc->texBuffer;
psc->loader_dri3_ext.image = psc->image;

View file

@ -167,15 +167,14 @@ loader_dri3_blit_context_get(struct loader_dri3_drawable *draw)
simple_mtx_lock(&blit_context.mtx);
if (blit_context.ctx && blit_context.cur_screen != draw->dri_screen_render_gpu) {
blit_context.core->destroyContext(blit_context.ctx);
driDestroyContext(blit_context.ctx);
blit_context.ctx = NULL;
}
if (!blit_context.ctx) {
blit_context.ctx = draw->ext->core->createNewContext(draw->dri_screen_render_gpu,
blit_context.ctx = driCreateNewContext(draw->dri_screen_render_gpu,
NULL, NULL, NULL);
blit_context.cur_screen = draw->dri_screen_render_gpu;
blit_context.core = draw->ext->core;
}
return blit_context.ctx;
@ -354,7 +353,7 @@ loader_dri3_drawable_fini(struct loader_dri3_drawable *draw)
{
int i;
draw->ext->core->destroyDrawable(draw->dri_drawable);
driDestroyDrawable(draw->dri_drawable);
for (i = 0; i < ARRAY_SIZE(draw->buffers); i++)
dri3_free_render_buffer(draw, i);
@ -450,7 +449,7 @@ loader_dri3_drawable_init(xcb_connection_t *conn,
cookie = xcb_get_geometry(draw->conn, draw->drawable);
reply = xcb_get_geometry_reply(draw->conn, cookie, &error);
if (reply == NULL || error != NULL) {
draw->ext->core->destroyDrawable(draw->dri_drawable);
driDestroyDrawable(draw->dri_drawable);
return 1;
}
@ -2305,7 +2304,7 @@ loader_dri3_close_screen(__DRIscreen *dri_screen)
{
simple_mtx_lock(&blit_context.mtx);
if (blit_context.ctx && blit_context.cur_screen == dri_screen) {
blit_context.core->destroyContext(blit_context.ctx);
driDestroyContext(blit_context.ctx);
blit_context.ctx = NULL;
}
simple_mtx_unlock(&blit_context.mtx);

View file

@ -95,7 +95,6 @@ loader_dri3_pixmap_buf_id(enum loader_dri3_buffer_type buffer_type)
}
struct loader_dri3_extensions {
const __DRIcoreExtension *core;
const __DRIimageDriverExtension *image_driver;
const __DRI2flushExtension *flush;
const __DRI2configQueryExtension *config;