aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Hellstrom <[email protected]>2019-05-08 16:26:27 +0200
committerThomas Hellstrom <[email protected]>2019-05-17 08:44:31 +0200
commita119da3bc9bde850717f9f03a2eeddef520b9416 (patch)
tree91047dddd99e81fab3e5a71bd9bd6d99b4001b4a
parentfb6d09764d8169662a4d24380c51f9edff1a9afd (diff)
svga: Set the rendered-to flag for dma transfers to surfaces
The rendered-to flag indicates that the HW surface content is more recent than the content of the mob. That's the case after a SurfaceDMA transfer to the surface. Signed-off-by: Thomas Hellstrom <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Charmaine Lee <[email protected]>
-rw-r--r--src/gallium/drivers/svga/svga_resource_texture.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index e9449e8a1ff..307b5ca4a10 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -753,6 +753,9 @@ svga_texture_transfer_unmap_dma(struct svga_context *svga,
if (st->base.usage & PIPE_TRANSFER_WRITE) {
/* Use DMA to transfer texture data */
SVGA3dSurfaceDMAFlags flags;
+ struct pipe_resource *texture = st->base.resource;
+ struct svga_texture *tex = svga_texture(texture);
+
memset(&flags, 0, sizeof flags);
if (st->base.usage & PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE) {
@@ -763,6 +766,7 @@ svga_texture_transfer_unmap_dma(struct svga_context *svga,
}
svga_transfer_dma(svga, st, SVGA3D_WRITE_HOST_VRAM, flags);
+ svga_set_texture_rendered_to(tex, st->slice, st->base.level);
}
FREE(st->swbuf);