summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xmesaP.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-11-05 10:48:18 -0600
committerBrian Paul <[email protected]>2011-11-07 14:25:47 -0700
commit32c3957991bd0e1df744d866943a8c47b2757c9e (patch)
tree1ca3cb3436a39690fcd07fbb9825bc50d458748b /src/mesa/drivers/x11/xmesaP.h
parent68c3d21b6857ec39f0849867355b736191823479 (diff)
xlib: implement renderbuffer mapping/unmapping
This fixes the glReadPixels() regression for reading from the front/back color buffers. Note, we only allow one mapping of an XImage/Pixmap renderbuffer at any time. That might need to be revisited in the future.
Diffstat (limited to 'src/mesa/drivers/x11/xmesaP.h')
-rw-r--r--src/mesa/drivers/x11/xmesaP.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mesa/drivers/x11/xmesaP.h b/src/mesa/drivers/x11/xmesaP.h
index f2488695e14..29f070aa040 100644
--- a/src/mesa/drivers/x11/xmesaP.h
+++ b/src/mesa/drivers/x11/xmesaP.h
@@ -186,6 +186,10 @@ struct xmesa_renderbuffer
GLint bottom; /* used for FLIP macro, equals height - 1 */
ClearFunc clearFunc;
+
+ GLuint map_x, map_y, map_w, map_h;
+ GLbitfield map_mode;
+ XMesaImage *map_ximage;
};
@@ -473,7 +477,8 @@ extern const int xmesa_kernel1[16];
*/
extern struct xmesa_renderbuffer *
-xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name, const struct gl_config *visual,
+xmesa_new_renderbuffer(struct gl_context *ctx, GLuint name,
+ const struct xmesa_visual *xmvis,
GLboolean backBuffer);
extern void
@@ -506,6 +511,16 @@ xmesa_set_renderbuffer_funcs(struct xmesa_renderbuffer *xrb,
enum pixel_format pixelformat, GLint depth);
extern void
+xmesa_MapRenderbuffer(struct gl_context *ctx,
+ struct gl_renderbuffer *rb,
+ GLuint x, GLuint y, GLuint w, GLuint h,
+ GLbitfield mode,
+ GLubyte **mapOut, GLint *rowStrideOut);
+
+extern void
+xmesa_UnmapRenderbuffer(struct gl_context *ctx, struct gl_renderbuffer *rb);
+
+extern void
xmesa_destroy_buffers_on_display(XMesaDisplay *dpy);