From 0fd2d56b0fc0ce74c5f3e5e23cb26b0d1a075ba1 Mon Sep 17 00:00:00 2001 From: marha Date: Sun, 25 Dec 2011 17:27:22 +0100 Subject: mesa xkeyboard-config xserver git update 25 dec 2011 --- mesalib/src/mesa/swrast/s_context.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'mesalib/src/mesa/swrast/s_context.h') diff --git a/mesalib/src/mesa/swrast/s_context.h b/mesalib/src/mesa/swrast/s_context.h index 446b990d9..af9e49ecb 100644 --- a/mesalib/src/mesa/swrast/s_context.h +++ b/mesalib/src/mesa/swrast/s_context.h @@ -422,5 +422,17 @@ _swrast_unmap_renderbuffers(struct gl_context *ctx); #define ATTRIB_LOOP_END } } +/** + * Return the address of a pixel value in a mapped renderbuffer. + */ +static inline GLubyte * +_swrast_pixel_address(struct gl_renderbuffer *rb, GLint x, GLint y) +{ + const GLint bpp = _mesa_get_format_bytes(rb->Format); + const GLint rowStride = rb->RowStride * bpp; + return (GLubyte *) rb->Data + y * rowStride + x * bpp; +} + + #endif -- cgit v1.2.3