summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_context.h
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-01-16 13:02:19 -0700
committerBrian Paul <[email protected]>2012-01-24 14:12:32 -0700
commit0c1862851f27c428a18ba5509636efcc2f0084f8 (patch)
tree29052f5a725fab48742c42fc7807f0ed37588d5c /src/mesa/swrast/s_context.h
parent797c18be1f907337ebd85b18ce43dfa0b056f492 (diff)
swrast: use swrast_renderbuffer instead of gl_renderbuffer
Diffstat (limited to 'src/mesa/swrast/s_context.h')
-rw-r--r--src/mesa/swrast/s_context.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_context.h b/src/mesa/swrast/s_context.h
index f03f0485bcd..2fb61eaee5a 100644
--- a/src/mesa/swrast/s_context.h
+++ b/src/mesa/swrast/s_context.h
@@ -453,8 +453,9 @@ _swrast_unmap_renderbuffers(struct gl_context *ctx);
static inline GLubyte *
_swrast_pixel_address(struct gl_renderbuffer *rb, GLint x, GLint y)
{
+ struct swrast_renderbuffer *srb = swrast_renderbuffer(rb);
const GLint bpp = _mesa_get_format_bytes(rb->Format);
- const GLint rowStride = rb->RowStrideBytes;
+ const GLint rowStride = srb->RowStride;
assert(x >= 0);
assert(y >= 0);
/* NOTE: using <= only because of s_tritemp.h which gets a pixel
@@ -462,8 +463,8 @@ _swrast_pixel_address(struct gl_renderbuffer *rb, GLint x, GLint y)
*/
assert(x <= (GLint) rb->Width);
assert(y <= (GLint) rb->Height);
- assert(rb->Map);
- return (GLubyte *) rb->Map + y * rowStride + x * bpp;
+ assert(srb->Map);
+ return (GLubyte *) srb->Map + y * rowStride + x * bpp;
}