[Mesa-dev] glx: Fix incorrect pdp assignment in dri2_bind_context().

Submitted by Brian Paul on March 13, 2014, 5:33 p.m.

Details

Message ID 5321EC06.2010106@vmware.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Brian Paul March 13, 2014, 5:33 p.m.
My coworker found this issue while testing with glretrace.  Looks 
correct to me but I'd like another reviewer (Kristian?)

-Brian

-------- Original Message --------
Subject: [Review Request] glx: Fix incorrect pdp assignment in 
dri2_bind_context().
Date: Thu, 13 Mar 2014 10:16:31 -0700
From: Charmaine Lee <charmainel@vmware.com>


pdp should be set to dpyPriv->dri2Display.
Fixes blank frame failure running glretrace ClearView.
---
  src/glx/dri2_glx.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

     pdraw = (struct dri2_drawable *) driFetchDrawable(context, draw);
@@ -162,7 +163,7 @@ dri2_bind_context(struct glx_context *context, 
struct glx_context *old,
     /* If the server doesn't send invalidate events, we may miss a
      * resize before the rendering starts.  Invalidate the buffers now
      * so the driver will recheck before rendering starts. */
-   pdp = (struct dri2_display *) psc->base.display;
+   pdp = (struct dri2_display *) dpyPriv->dri2Display;
     if (!pdp->invalidateAvailable && pdraw) {
        dri2InvalidateBuffers(psc->base.dpy, pdraw->base.xDrawable);
        if (pread != pdraw && pread)

Patch hide | download patch | download mbox

diff --git a/src/glx/dri2_glx.c b/src/glx/dri2_glx.c
index 75fc951..b6eaf1c 100644
--- a/src/glx/dri2_glx.c
+++ b/src/glx/dri2_glx.c
@@ -139,6 +139,7 @@  dri2_bind_context(struct glx_context *context, 
struct glx_context *old,
     struct dri2_screen *psc = (struct dri2_screen *) pcp->base.psc;
     struct dri2_drawable *pdraw, *pread;
     __DRIdrawable *dri_draw = NULL, *dri_read = NULL;
+   struct glx_display *dpyPriv = psc->base.display;
     struct dri2_display *pdp;