diff options
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r-- | src/mesa/swrast/s_context.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h index 36ab86a5e84..7f1e4c78ee4 100644 --- a/src/mesa/swrast/s_context.h +++ b/src/mesa/swrast/s_context.h @@ -429,7 +429,7 @@ 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; + const GLint rowStride = rb->RowStrideBytes; assert(x >= 0); assert(y >= 0); /* NOTE: using <= only because of s_tritemp.h which gets a pixel @@ -437,8 +437,8 @@ _swrast_pixel_address(struct gl_renderbuffer *rb, GLint x, GLint y) */ assert(x <= (GLint) rb->Width); assert(y <= (GLint) rb->Height); - assert(rb->Data); - return (GLubyte *) rb->Data + y * rowStride + x * bpp; + assert(rb->Map); + return (GLubyte *) rb->Map + y * rowStride + x * bpp; } |