aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2019-06-03 11:39:34 -0700
committerChia-I Wu <[email protected]>2019-06-04 21:37:03 +0000
commit65439291a02066f0e18090f8ce9645a8a1ba97a4 (patch)
tree0b6e15ef9e3fcb41912dad5f225499b964e857bc /src
parent067018d4e745a9145627793c7f458ced4d4b4010 (diff)
virgl: resolve to correct level during texture read
When PIPE_TRANSFER_READ requires a resolve, we blit from the host storage to a temporary storage, and do a format conversion from the temporary storage to the guest storage. This change makes sure we convert to the correct level of the guest storage. Signed-off-by: Chia-I Wu <[email protected]> Reviewed-by: Alexandros Frantzis <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/virgl/virgl_texture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/virgl/virgl_texture.c b/src/gallium/drivers/virgl/virgl_texture.c
index 926f8a56f9d..7eca56bd927 100644
--- a/src/gallium/drivers/virgl/virgl_texture.c
+++ b/src/gallium/drivers/virgl/virgl_texture.c
@@ -220,8 +220,8 @@ static void *texture_transfer_map_resolve(struct pipe_context *ctx,
if (!ptr)
goto fail;
- if (!util_format_translate_3d(resource->format,
- ptr,
+ if (!util_format_translate_3d(resource->format,
+ ptr + vtex->metadata.level_offset[level],
trans->base.stride,
trans->base.layer_stride,
box->x, box->y, box->z,