From f408bb647c5ac62ce904686392002a83360ae8b6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Tue, 15 Nov 2022 00:15:24 -0500 Subject: [PATCH] frontend/dri: replace the DestroyScreen callback with a direct call Reviewed-by: Adam Jackson Part-of: --- src/gallium/frontends/dri/dri2.c | 2 -- src/gallium/frontends/dri/dri_util.c | 2 +- src/gallium/frontends/dri/dri_util.h | 2 -- src/gallium/frontends/dri/drisw.c | 1 - src/gallium/frontends/dri/kopper.c | 1 - 5 files changed, 1 insertion(+), 7 deletions(-) diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c index d6ba684..00553fd 100644 --- a/src/gallium/frontends/dri/dri2.c +++ b/src/gallium/frontends/dri/dri2.c @@ -2435,7 +2435,6 @@ dri2_create_buffer(__DRIscreen * sPriv, static const struct __DRIDriverVtableExtensionRec galliumdrm_vtable = { .base = { __DRI_DRIVER_VTABLE, 1 }, .InitScreen = dri2_init_screen, - .DestroyScreen = dri_destroy_screen, .CreateBuffer = dri2_create_buffer, .DestroyBuffer = dri_destroy_buffer, @@ -2463,7 +2462,6 @@ const __DRIextension *galliumdrm_driver_extensions[] = { static const struct __DRIDriverVtableExtensionRec dri_swrast_kms_vtable = { .base = { __DRI_DRIVER_VTABLE, 1 }, .InitScreen = dri_swrast_kms_init_screen, - .DestroyScreen = dri_destroy_screen, .CreateBuffer = dri2_create_buffer, .DestroyBuffer = dri_destroy_buffer, diff --git a/src/gallium/frontends/dri/dri_util.c b/src/gallium/frontends/dri/dri_util.c index 8132809..0d2f29d 100644 --- a/src/gallium/frontends/dri/dri_util.c +++ b/src/gallium/frontends/dri/dri_util.c @@ -230,7 +230,7 @@ static void driDestroyScreen(__DRIscreen *psp) * stream open to the X-server anymore. */ - psp->driver->DestroyScreen(psp); + dri_destroy_screen(psp); driDestroyOptionCache(&psp->optionCache); driDestroyOptionInfo(&psp->optionInfo); diff --git a/src/gallium/frontends/dri/dri_util.h b/src/gallium/frontends/dri/dri_util.h index 9f0942b..c008bfd 100644 --- a/src/gallium/frontends/dri/dri_util.h +++ b/src/gallium/frontends/dri/dri_util.h @@ -69,8 +69,6 @@ typedef struct __DRIDriverVtableExtensionRec { const __DRIconfig **(*InitScreen) (__DRIscreen * priv); - void (*DestroyScreen)(__DRIscreen *driScrnPriv); - GLboolean (*CreateBuffer)(__DRIscreen *driScrnPriv, __DRIdrawable *driDrawPriv, const struct gl_config *glVis, diff --git a/src/gallium/frontends/dri/drisw.c b/src/gallium/frontends/dri/drisw.c index c839d85..ff7433e 100644 --- a/src/gallium/frontends/dri/drisw.c +++ b/src/gallium/frontends/dri/drisw.c @@ -643,7 +643,6 @@ drisw_create_buffer(__DRIscreen * sPriv, static const struct __DRIDriverVtableExtensionRec galliumsw_vtable = { .base = { __DRI_DRIVER_VTABLE, 1 }, .InitScreen = drisw_init_screen, - .DestroyScreen = dri_destroy_screen, .CreateBuffer = drisw_create_buffer, .DestroyBuffer = dri_destroy_buffer, .SwapBuffers = drisw_swap_buffers, diff --git a/src/gallium/frontends/dri/kopper.c b/src/gallium/frontends/dri/kopper.c index 3e86757..8813a33 100644 --- a/src/gallium/frontends/dri/kopper.c +++ b/src/gallium/frontends/dri/kopper.c @@ -1046,7 +1046,6 @@ const __DRIkopperExtension driKopperExtension = { static const struct __DRIDriverVtableExtensionRec galliumvk_vtable = { .base = { __DRI_DRIVER_VTABLE, 1 }, .InitScreen = kopper_init_screen, - .DestroyScreen = dri_destroy_screen, .CreateBuffer = kopper_create_buffer, .DestroyBuffer = dri_destroy_buffer, .SwapBuffers = kopper_swap_buffers, -- 2.7.4