mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-07 15:10:12 +01:00
glx: delete releaseTexBuffer
this is always null, so none of the code is ever executed Reviewed-by: Adam Jackson <ajax@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30400>
This commit is contained in:
parent
0341623f39
commit
b0d0c1971c
8 changed files with 0 additions and 103 deletions
|
|
@ -2055,33 +2055,12 @@ static EGLBoolean
|
|||
dri2_release_tex_image(_EGLDisplay *disp, _EGLSurface *surf, EGLint buffer)
|
||||
{
|
||||
struct dri2_egl_display *dri2_dpy = dri2_egl_display_lock(disp);
|
||||
struct dri2_egl_context *dri2_ctx;
|
||||
_EGLContext *ctx;
|
||||
GLint target;
|
||||
__DRIdrawable *dri_drawable = dri2_dpy->vtbl->get_dri_drawable(surf);
|
||||
|
||||
ctx = _eglGetCurrentContext();
|
||||
dri2_ctx = dri2_egl_context(ctx);
|
||||
|
||||
if (!_eglReleaseTexImage(disp, surf, buffer)) {
|
||||
mtx_unlock(&dri2_dpy->lock);
|
||||
return EGL_FALSE;
|
||||
}
|
||||
|
||||
switch (surf->TextureTarget) {
|
||||
case EGL_TEXTURE_2D:
|
||||
target = GL_TEXTURE_2D;
|
||||
break;
|
||||
default:
|
||||
assert(!"missing texture target");
|
||||
}
|
||||
|
||||
if (dri2_dpy->tex_buffer->base.version >= 3 &&
|
||||
dri2_dpy->tex_buffer->releaseTexBuffer != NULL) {
|
||||
dri2_dpy->tex_buffer->releaseTexBuffer(dri2_ctx->dri_context, target,
|
||||
dri_drawable);
|
||||
}
|
||||
|
||||
mtx_unlock(&dri2_dpy->lock);
|
||||
|
||||
return EGL_TRUE;
|
||||
|
|
|
|||
|
|
@ -312,7 +312,6 @@ const __DRItexBufferExtension driTexBufferExtension = {
|
|||
|
||||
.setTexBuffer = dri_set_tex_buffer,
|
||||
.setTexBuffer2 = dri_set_tex_buffer2,
|
||||
.releaseTexBuffer = NULL,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -188,20 +188,6 @@ struct __DRItexBufferExtensionRec {
|
|||
int target,
|
||||
int format,
|
||||
__DRIdrawable *pDraw);
|
||||
/**
|
||||
* Called from glXReleaseTexImageEXT().
|
||||
*
|
||||
* This was used by i965 in 24952160fde9 ("i965: Use finish_external instead
|
||||
* of make_shareable in setTexBuffer2") to note when the user mis-used the
|
||||
* interface in a way that would produce rendering bugs, and try to recover
|
||||
* from them. This has only ever been used from inside the Mesa tree and
|
||||
* was never used by the X server.
|
||||
*
|
||||
* \since 3
|
||||
*/
|
||||
void (*releaseTexBuffer)(__DRIcontext *pDRICtx,
|
||||
int target,
|
||||
__DRIdrawable *pDraw);
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -833,25 +833,6 @@ dri2_bind_tex_image(__GLXDRIdrawable *base,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dri2_release_tex_image(__GLXDRIdrawable *base, int buffer)
|
||||
{
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
|
||||
struct dri2_screen *psc;
|
||||
|
||||
if (pdraw != NULL) {
|
||||
psc = (struct dri2_screen *) base->psc;
|
||||
|
||||
if (psc->texBuffer->base.version >= 3 &&
|
||||
psc->texBuffer->releaseTexBuffer != NULL) {
|
||||
psc->texBuffer->releaseTexBuffer(gc->driContext,
|
||||
pdraw->base.textureTarget,
|
||||
pdraw->driDrawable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static const struct glx_context_vtable dri2_context_vtable = {
|
||||
.destroy = dri2_destroy_context,
|
||||
.bind = dri2_bind_context,
|
||||
|
|
@ -1060,7 +1041,6 @@ dri2CreateScreen(int screen, struct glx_display * priv, bool driver_name_is_infe
|
|||
psp->getSwapInterval = NULL;
|
||||
psp->getBufferAge = NULL;
|
||||
psp->bindTexImage = dri2_bind_tex_image;
|
||||
psp->releaseTexImage = dri2_release_tex_image;
|
||||
|
||||
psp->getDrawableMSC = dri2DrawableGetMSC;
|
||||
psp->waitForMSC = dri2WaitForMSC;
|
||||
|
|
|
|||
|
|
@ -653,24 +653,6 @@ dri3_bind_tex_image(__GLXDRIdrawable *base,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
dri3_release_tex_image(__GLXDRIdrawable *base, int buffer)
|
||||
{
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct dri3_drawable *pdraw = (struct dri3_drawable *) base;
|
||||
struct dri3_screen *psc;
|
||||
|
||||
if (pdraw != NULL) {
|
||||
psc = (struct dri3_screen *) base->psc;
|
||||
|
||||
if (psc->texBuffer->base.version >= 3 &&
|
||||
psc->texBuffer->releaseTexBuffer != NULL)
|
||||
psc->texBuffer->releaseTexBuffer(gc->driContext,
|
||||
pdraw->base.textureTarget,
|
||||
pdraw->loader_drawable.dri_drawable);
|
||||
}
|
||||
}
|
||||
|
||||
static const struct glx_context_vtable dri3_context_vtable = {
|
||||
.destroy = dri3_destroy_context,
|
||||
.bind = dri3_bind_context,
|
||||
|
|
@ -935,7 +917,6 @@ dri3_create_screen(int screen, struct glx_display * priv, bool driver_name_is_in
|
|||
psp->setSwapInterval = dri3_set_swap_interval;
|
||||
psp->getSwapInterval = dri3_get_swap_interval;
|
||||
psp->bindTexImage = dri3_bind_tex_image;
|
||||
psp->releaseTexImage = dri3_release_tex_image;
|
||||
psp->maxSwapInterval = INT_MAX;
|
||||
|
||||
__glXEnableDirectExtension(&psc->base, "GLX_OML_sync_control");
|
||||
|
|
|
|||
|
|
@ -503,28 +503,6 @@ drisw_bind_tex_image(__GLXDRIdrawable *base,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
drisw_release_tex_image(__GLXDRIdrawable *base, int buffer)
|
||||
{
|
||||
struct glx_context *gc = __glXGetCurrentContext();
|
||||
struct drisw_drawable *pdraw = (struct drisw_drawable *) base;
|
||||
struct drisw_screen *psc;
|
||||
|
||||
if (pdraw != NULL) {
|
||||
psc = (struct drisw_screen *) base->psc;
|
||||
|
||||
if (!psc->texBuffer)
|
||||
return;
|
||||
|
||||
if (psc->texBuffer->base.version >= 3 &&
|
||||
psc->texBuffer->releaseTexBuffer != NULL) {
|
||||
psc->texBuffer->releaseTexBuffer(gc->driContext,
|
||||
pdraw->base.textureTarget,
|
||||
pdraw->driDrawable);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
kopper_get_buffer_age(__GLXDRIdrawable *pdraw)
|
||||
{
|
||||
|
|
@ -994,7 +972,6 @@ driswCreateScreen(int screen, struct glx_display *priv, enum glx_driver glx_driv
|
|||
psp->createDrawable = driswCreateDrawable;
|
||||
psp->swapBuffers = driswSwapBuffers;
|
||||
psp->bindTexImage = drisw_bind_tex_image;
|
||||
psp->releaseTexImage = drisw_release_tex_image;
|
||||
|
||||
if (!glx_driver)
|
||||
psp->copySubBuffer = drisw_copy_sub_buffer;
|
||||
|
|
|
|||
|
|
@ -103,7 +103,6 @@ struct __GLXDRIscreenRec {
|
|||
int (*getSwapInterval)(__GLXDRIdrawable *pdraw);
|
||||
int (*getBufferAge)(__GLXDRIdrawable *pdraw);
|
||||
void (*bindTexImage)(__GLXDRIdrawable *pdraw, int buffer, const int *attribs);
|
||||
void (*releaseTexImage)(__GLXDRIdrawable *pdraw, int buffer);
|
||||
|
||||
int maxSwapInterval;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -2167,10 +2167,6 @@ glXReleaseTexImageEXT(Display * dpy, GLXDrawable drawable, int buffer)
|
|||
#ifdef GLX_DIRECT_RENDERING
|
||||
__GLXDRIdrawable *pdraw = GetGLXDRIDrawable(dpy, drawable);
|
||||
if (pdraw != NULL) {
|
||||
struct glx_screen *psc = pdraw->psc;
|
||||
if (psc->driScreen->releaseTexImage != NULL)
|
||||
psc->driScreen->releaseTexImage(pdraw, buffer);
|
||||
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue