mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 02:40:11 +01:00
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 <brianp@vmware.com>
(cherry picked from commit 31fe1d10b2)
This commit is contained in:
parent
c36c8ec528
commit
759d84177e
1 changed files with 8 additions and 7 deletions
|
|
@ -410,7 +410,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)) {
|
||||
|
|
@ -418,13 +418,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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue