svga: set rendered-to flag after updating the texture using PredCopyRegion
authorCharmaine Lee <charmainel@vmware.com>
Mon, 3 Oct 2016 20:29:58 +0000 (13:29 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 3 Nov 2016 20:29:22 +0000 (14:29 -0600)
This patch sets the rendered-to flag for the subresource after it is
updated using the PredCopyRegion command. This is to ensure that the GB surface
will be sync up properly before it will be directly mapped to.

Tested with MTT piglit, glretrace.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/gallium/drivers/svga/svga_pipe_blit.c

index 054e3f5..3e236fc 100644 (file)
@@ -82,7 +82,11 @@ copy_region_vgpu10(struct svga_context *svga, struct pipe_resource *src_tex,
       assert(ret == PIPE_OK);
    }
 
+   /* Mark the texture subresource as defined. */
    svga_define_texture_level(dtex, dst_face, dst_level);
+
+   /* Mark the texture subresource as rendered-to. */
+   svga_set_texture_rendered_to(dtex, dst_face, dst_level);
 }