diff options
author | Brian Paul <[email protected]> | 2012-01-16 13:02:19 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2012-01-24 14:12:32 -0700 |
commit | 0c1862851f27c428a18ba5509636efcc2f0084f8 (patch) | |
tree | 29052f5a725fab48742c42fc7807f0ed37588d5c /src/mesa/swrast/s_stencil.c | |
parent | 797c18be1f907337ebd85b18ce43dfa0b056f492 (diff) |
swrast: use swrast_renderbuffer instead of gl_renderbuffer
Diffstat (limited to 'src/mesa/swrast/s_stencil.c')
-rw-r--r-- | src/mesa/swrast/s_stencil.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/swrast/s_stencil.c b/src/mesa/swrast/s_stencil.c index 9aa7ffc8598..bbfbf44cce2 100644 --- a/src/mesa/swrast/s_stencil.c +++ b/src/mesa/swrast/s_stencil.c @@ -292,12 +292,13 @@ get_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb, GLuint count, const GLint x[], const GLint y[], GLubyte stencil[]) { + struct swrast_renderbuffer *srb = swrast_renderbuffer(rb); const GLint w = rb->Width, h = rb->Height; const GLubyte *map = _swrast_pixel_address(rb, 0, 0); GLuint i; if (rb->Format == MESA_FORMAT_S8) { - const GLint rowStride = rb->RowStrideBytes; + const GLint rowStride = srb->RowStride; for (i = 0; i < count; i++) { if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) { stencil[i] = *(map + y[i] * rowStride + x[i]); @@ -306,7 +307,7 @@ get_s8_values(struct gl_context *ctx, struct gl_renderbuffer *rb, } else { const GLint bpp = _mesa_get_format_bytes(rb->Format); - const GLint rowStride = rb->RowStrideBytes; + const GLint rowStride = srb->RowStride; for (i = 0; i < count; i++) { if (x[i] >= 0 && y[i] >= 0 && x[i] < w && y[i] < h) { const GLubyte *src = map + y[i] * rowStride + x[i] * bpp; |