Mesa (master): glx: Correctly look up the dri2 context pointer for SetTexBuffer.

Eric Anholt anholt at kemper.freedesktop.org
Sat Jul 24 03:59:16 UTC 2010


Module: Mesa
Branch: master
Commit: 566373967a6a63b6a9c85a2392bc827ac7ef679f
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=566373967a6a63b6a9c85a2392bc827ac7ef679f

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jul 23 14:51:06 2010 -0700

glx: Correctly look up the dri2 context pointer for SetTexBuffer.

gc->driContext points at the second member of the dri2 context.  The
dri2 context is just a subclass of the GLX context.

Fixes piglit tfp testcase.

---

 src/glx/dri2_glx.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index a94223b..1dae589 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -647,13 +647,13 @@ dri2_bind_tex_image(Display * dpy,
 		    int buffer, const int *attrib_list)
 {
    GLXContext gc = __glXGetCurrentContext();
+   struct dri2_context *pcp = (struct dri2_context *) gc;
    __GLXDRIdrawable *base = GetGLXDRIDrawable(dpy, drawable);
    __GLXdisplayPrivate *dpyPriv = __glXInitialize(dpy);
    struct dri2_drawable *pdraw = (struct dri2_drawable *) base;
    struct dri2_display *pdp =
       (struct dri2_display *) dpyPriv->dri2Display;
    struct dri2_screen *psc = (struct dri2_screen *) base->psc;
-   struct dri2_context *pcp = (struct dri2_context *) gc->driContext;
 
    if (pdraw != NULL) {
 




More information about the mesa-commit mailing list