diff options
author | marha <marha@users.sourceforge.net> | 2011-12-25 17:27:22 +0100 |
---|---|---|
committer | Marc Haesen <marc@hc-consult.be> | 2011-12-25 17:27:22 +0100 |
commit | 0fd2d56b0fc0ce74c5f3e5e23cb26b0d1a075ba1 (patch) | |
tree | d449668fac922e358f442aeb82d0936ca786ed72 /mesalib/src/mesa/swrast/s_context.h | |
parent | 0b3f475361d87764004432f541e34bb86af1b9f3 (diff) | |
download | vcxsrv-0fd2d56b0fc0ce74c5f3e5e23cb26b0d1a075ba1.tar.gz vcxsrv-0fd2d56b0fc0ce74c5f3e5e23cb26b0d1a075ba1.tar.bz2 vcxsrv-0fd2d56b0fc0ce74c5f3e5e23cb26b0d1a075ba1.zip |
mesa xkeyboard-config xserver git update 25 dec 2011
Diffstat (limited to 'mesalib/src/mesa/swrast/s_context.h')
-rw-r--r-- | mesalib/src/mesa/swrast/s_context.h | 12 |
1 files changed, 12 insertions, 0 deletions
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 |