Module: Mesa Branch: master Commit: 4750c4e5439f5c2689051ac072003cc3a2ff5c1b URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4750c4e5439f5c2689051ac072003cc3a2ff5c1b
Author: Charmaine Lee <[email protected]> Date: Thu Sep 29 16:41:21 2016 -0700 svga: set rendered_to flag with texture uploaded using TransferFromBuffer command This patch sets the rendered_to flag for the texture subresource that is uploaded using the TransferFromBuffer command. This is to ensure that the subresource will be read back or invalidated before it will be directly mapped to. This makes sure that the content of the GB surface will not be accidentally overwritten by the device at suspend/resume time. Reviewed-by: Brian Paul <[email protected]> --- src/gallium/drivers/svga/svga_resource_texture.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c index fc5c374..5792961 100644 --- a/src/gallium/drivers/svga/svga_resource_texture.c +++ b/src/gallium/drivers/svga/svga_resource_texture.c @@ -1427,6 +1427,7 @@ svga_texture_transfer_unmap_upload(struct svga_context *svga, struct svga_winsys_surface *srcsurf; struct svga_winsys_surface *dstsurf; struct pipe_resource *texture = st->base.resource; + struct svga_texture *tex = svga_texture(texture); enum pipe_error ret; unsigned subResource; unsigned numMipLevels; @@ -1468,6 +1469,9 @@ svga_texture_transfer_unmap_upload(struct svga_context *svga, assert(ret == PIPE_OK); } offset += st->base.layer_stride; + + /* Set rendered-to flag */ + svga_set_texture_rendered_to(tex, layer, st->base.level); } pipe_resource_reference(&st->upload.buf, NULL); _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
