aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/state_tracker/st_cb_readpixels.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_readpixels.c')
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_readpixels.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_readpixels.c b/mesalib/src/mesa/state_tracker/st_cb_readpixels.c
index b5df58c03..7547dfd8b 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_readpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_readpixels.c
@@ -166,7 +166,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y,
}
blit.src.resource = src;
- blit.src.level = strb->rtt_level;
+ blit.src.level = strb->surface->u.tex.level;
blit.src.format = src_format;
blit.dst.resource = dst;
blit.dst.level = 0;
@@ -175,7 +175,7 @@ st_readpixels(struct gl_context *ctx, GLint x, GLint y,
blit.dst.box.x = 0;
blit.src.box.y = y;
blit.dst.box.y = 0;
- blit.src.box.z = strb->rtt_face + strb->rtt_slice;
+ blit.src.box.z = strb->surface->u.tex.first_layer;
blit.dst.box.z = 0;
blit.src.box.width = blit.dst.box.width = width;
blit.src.box.height = blit.dst.box.height = height;