diff options
author | Emil Velikov <[email protected]> | 2014-02-18 03:04:03 +0000 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2014-04-28 19:11:27 +0100 |
commit | 9b42fd1772b13b10f397d80d11aa8351e6313085 (patch) | |
tree | f9c4028a8105c3aa8a7ec57c261aef753d34a4a1 /src/glx/drisw_glx.c | |
parent | ec8ebff342839138bc8141b8a739d9bce6d7ac39 (diff) |
dri_interface: Update __DRItexBufferExtensionRec to version 3
With commit e59fa4c46c8("dri2: release texture image.") we updated the
extension without bumping the version number. The patch itself added an
interface required to enable texture_from_pixmap on certain platforms.
The new code was effectively never build, as it depended on
__DRI_TEX_BUFFER_VERSION >= 3, which never came to be in upstream mesa.
This commit bumps the version number, drops the __DRI_TEX_BUFFER_VERSION
checks and resolves all the build conflicts. Additionally it add a version
check as egl and dri3, as require version 2 of the extension which does
not have the releaseTexBuffer hook.
Cc: Juan Zhao <[email protected]>
Cc: Kristian Høgsberg <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glx/drisw_glx.c')
-rw-r--r-- | src/glx/drisw_glx.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/glx/drisw_glx.c b/src/glx/drisw_glx.c index 33d347a6e16..a77be4e429a 100644 --- a/src/glx/drisw_glx.c +++ b/src/glx/drisw_glx.c @@ -342,16 +342,15 @@ drisw_bind_tex_image(Display * dpy, static void drisw_release_tex_image(Display * dpy, GLXDrawable drawable, int buffer) { -#if __DRI_TEX_BUFFER_VERSION >= 3 struct glx_context *gc = __glXGetCurrentContext(); - struct dri2_context *pcp = (struct dri2_context *) gc; + struct drisw_context *pcp = (struct drisw_context *) gc; __GLXDRIdrawable *base = GetGLXDRIDrawable(dpy, drawable); struct glx_display *dpyPriv = __glXInitialize(dpy); - struct dri2_drawable *pdraw = (struct dri2_drawable *) base; - struct dri2_screen *psc; + struct drisw_drawable *pdraw = (struct drisw_drawable *) base; + struct drisw_screen *psc; - if (pdraw != NULL) { - psc = (struct dri2_screen *) base->psc; + if (dpyPriv != NULL && pdraw != NULL) { + psc = (struct drisw_screen *) base->psc; if (!psc->texBuffer) return; @@ -363,7 +362,6 @@ drisw_release_tex_image(Display * dpy, GLXDrawable drawable, int buffer) pdraw->driDrawable); } } -#endif } static const struct glx_context_vtable drisw_context_vtable = { |