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_copypix.c | |
parent | 797c18be1f907337ebd85b18ce43dfa0b056f492 (diff) |
swrast: use swrast_renderbuffer instead of gl_renderbuffer
Diffstat (limited to 'src/mesa/swrast/s_copypix.c')
-rw-r--r-- | src/mesa/swrast/s_copypix.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c index 91541d2c93c..592d35a9898 100644 --- a/src/mesa/swrast/s_copypix.c +++ b/src/mesa/swrast/s_copypix.c @@ -567,6 +567,7 @@ map_readbuffer(struct gl_context *ctx, GLenum type) { struct gl_framebuffer *fb = ctx->ReadBuffer; struct gl_renderbuffer *rb; + struct swrast_renderbuffer *srb; switch (type) { case GL_COLOR: @@ -583,7 +584,9 @@ map_readbuffer(struct gl_context *ctx, GLenum type) return NULL; } - if (!rb || rb->Map) { + srb = swrast_renderbuffer(rb); + + if (!srb || srb->Map) { /* no buffer, or buffer is mapped already, we're done */ return NULL; } @@ -591,7 +594,7 @@ map_readbuffer(struct gl_context *ctx, GLenum type) ctx->Driver.MapRenderbuffer(ctx, rb, 0, 0, rb->Width, rb->Height, GL_MAP_READ_BIT, - &rb->Map, &rb->RowStrideBytes); + &srb->Map, &srb->RowStride); return rb; } @@ -650,7 +653,8 @@ _swrast_CopyPixels( struct gl_context *ctx, swrast_render_finish(ctx); if (rb) { + struct swrast_renderbuffer *srb = swrast_renderbuffer(rb); ctx->Driver.UnmapRenderbuffer(ctx, rb); - rb->Map = NULL; + srb->Map = NULL; } } |