summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/unichrome/via_context.h
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2006-11-10 00:14:30 +0000
committerIan Romanick <idr@us.ibm.com>2006-11-10 00:14:30 +0000
commitd7815f59134b0fb5cb3b56b72b22ba55002265ac (patch)
tree56c4ea5774573e1d9593363e2a19e4da0b240aef /src/mesa/drivers/dri/unichrome/via_context.h
parent3ce4adaa8fc0cb067dd9da3f358556490954f776 (diff)
Implement GLX_SGI_make_current_read
Discontinue use of the old GetBuffeSize interface. Track both the current read-drawable and the current draw-drawable. After moving some context state to via_rednerbuffer, GLX_SGI_make_current_read can be enabled. The extension works, but the wincopy test prodcues a black window for the destination window. After messing around with the window and looking at the code, I believe the problem is in the handling of buffer swap requests on a drawable that isn't the current draw-drawable.
Diffstat (limited to 'src/mesa/drivers/dri/unichrome/via_context.h')
-rw-r--r--src/mesa/drivers/dri/unichrome/via_context.h33
1 files changed, 22 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/unichrome/via_context.h b/src/mesa/drivers/dri/unichrome/via_context.h
index 9d7a0e6cb6..77161a8d5d 100644
--- a/src/mesa/drivers/dri/unichrome/via_context.h
+++ b/src/mesa/drivers/dri/unichrome/via_context.h
@@ -98,6 +98,18 @@ struct via_renderbuffer {
* at (drawX,drawY) in screen space.
*/
char *origMap;
+
+ int drawX; /* origin of drawable in draw buffer */
+ int drawY;
+ int drawW;
+ int drawH;
+
+ int drawXoff; /* drawX is 32byte aligned - this is
+ * the delta to the real origin, in
+ * pixel units.
+ */
+
+ __DRIdrawablePrivate *dPriv;
};
@@ -272,16 +284,6 @@ struct via_context {
struct via_renderbuffer *drawBuffer;
- int drawX; /* origin of drawable in draw buffer */
- int drawY;
- int drawW;
- int drawH;
-
- int drawXoff; /* drawX is 32byte aligned - this is
- * the delta to the real origin, in
- * pixel units.
- */
-
GLuint numClipRects; /* cliprects for that buffer */
drm_clip_rect_t *pClipRects;
@@ -294,7 +296,16 @@ struct via_context {
int driFd;
__DRInativeDisplay *display;
- __DRIdrawablePrivate *driDrawable;
+ /**
+ * DRI drawable bound to this context for drawing.
+ */
+ __DRIdrawablePrivate *driDrawable;
+
+ /**
+ * DRI drawable bound to this context for reading.
+ */
+ __DRIdrawablePrivate *driReadable;
+
__DRIscreenPrivate *driScreen;
viaScreenPrivate *viaScreen;
drm_via_sarea_t *sarea;