diff options
author | Neha Bhende <[email protected]> | 2016-10-27 12:35:03 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-06-30 08:24:27 -0600 |
commit | 31fe1d10b291bcd1b9ee376d53db05028719831d (patch) | |
tree | 7e3f91a914632bb267daed1d187cc0adf9621bde /src/gallium/drivers/svga | |
parent | 203d88460c46ea9b92c42129a3c6d33c7a2e8a0c (diff) |
svga: loop over box.depth for ReadBack_image on each slice
piglit test ext_texture_array-gen-mipmap is fixed with this patch.
Tested with mtt piglit, glretrace, viewperf and conform. No regression.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_resource_texture.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index a24d630cb5e..670100cb568 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -414,7 +414,7 @@ svga_texture_transfer_map_direct(struct svga_context *svga, struct svga_texture *tex = svga_texture(texture); struct svga_winsys_surface *surf = tex->handle; unsigned level = st->base.level; - unsigned w, h, nblocksx, nblocksy; + unsigned w, h, nblocksx, nblocksy, i; unsigned usage = st->base.usage; if (need_tex_readback(transfer)) { @@ -422,13 +422,14 @@ svga_texture_transfer_map_direct(struct svga_context *svga, svga_surfaces_flush(svga); - if (svga_have_vgpu10(svga)) { - ret = readback_image_vgpu10(svga, surf, st->slice, level, - tex->b.b.last_level + 1); - } else { - ret = readback_image_vgpu9(svga, surf, st->slice, level); + for (i = 0; i < st->base.box.depth; i++) { + if (svga_have_vgpu10(svga)) { + ret = readback_image_vgpu10(svga, surf, st->slice + i, level, + tex->b.b.last_level + 1); + } else { + ret = readback_image_vgpu9(svga, surf, st->slice + i, level); + } } - svga->hud.num_readbacks++; SVGA_STATS_COUNT_INC(sws, SVGA_STATS_COUNT_TEXREADBACK); |