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

Author: George Sapountzis <[email protected]>
Date:   Thu Mar 25 17:01:51 2010 +0200

drisw_util: add fields for gallium swrast_dri

---

 src/mesa/drivers/dri/common/drisw_util.c |    7 +++++++
 src/mesa/drivers/dri/common/drisw_util.h |    9 +++++++++
 2 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/common/drisw_util.c 
b/src/mesa/drivers/dri/common/drisw_util.c
index 141ca30..3f4e94c 100644
--- a/src/mesa/drivers/dri/common/drisw_util.c
+++ b/src/mesa/drivers/dri/common/drisw_util.c
@@ -63,6 +63,7 @@ driCreateNewScreen(int scrn, const __DRIextension 
**extensions,
     setupLoaderExtensions(psp, extensions);
 
     psp->extensions = emptyExtensionList;
+    psp->fd = -1;
     psp->myNum = scrn;
 
     *driver_configs = driDriverAPI.InitScreen(psp);
@@ -146,6 +147,7 @@ static int driBindContext(__DRIcontext *pcp,
        pcp->driDrawablePriv = pdp;
        pcp->driReadablePriv = prp;
        if (pdp) {
+           pdp->driContextPriv = pcp;
            dri_get_drawable(pdp);
        }
        if ( prp && pdp != prp ) {
@@ -182,6 +184,8 @@ static int driUnbindContext(__DRIcontext *pcp)
     pcp->driDrawablePriv = NULL;
     pcp->driReadablePriv = NULL;
 
+    pdp->driContextPriv = NULL;
+
     return GL_TRUE;
 }
 
@@ -221,6 +225,7 @@ driCreateNewDrawable(__DRIscreen *psp,
     pdp->loaderPrivate = data;
 
     pdp->driScreenPriv = psp;
+    pdp->driContextPriv = NULL;
 
     dri_get_drawable(pdp);
 
@@ -229,6 +234,8 @@ driCreateNewDrawable(__DRIscreen *psp,
        return NULL;
     }
 
+    pdp->lastStamp = 1; /* const */
+
     return pdp;
 }
 
diff --git a/src/mesa/drivers/dri/common/drisw_util.h 
b/src/mesa/drivers/dri/common/drisw_util.h
index e353e26..c7d1450 100644
--- a/src/mesa/drivers/dri/common/drisw_util.h
+++ b/src/mesa/drivers/dri/common/drisw_util.h
@@ -28,6 +28,7 @@
 #include <GL/gl.h>
 #include <GL/internal/glcore.h>
 #include <GL/internal/dri_interface.h>
+typedef struct _drmLock drmLock;
 
 
 /**
@@ -71,9 +72,17 @@ struct __DRIdrawableRec {
 
     void *loaderPrivate;
 
+    __DRIcontext *driContextPriv;
+
     __DRIscreen *driScreenPriv;
 
     int refcount;
+
+    /* gallium */
+    unsigned int lastStamp;
+
+    int w;
+    int h;
 };
 
 

_______________________________________________
mesa-commit mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to