[Mesa-dev] [PATCH 08/14] svga: minor code simplification in svga_texture_transfer_unmap()

Brian Paul brianp at vmware.com
Fri Aug 26 15:27:12 UTC 2016


Use the tex variable instead of using svga_texture() again.
---
 src/gallium/drivers/svga/svga_resource_texture.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/svga/svga_resource_texture.c b/src/gallium/drivers/svga/svga_resource_texture.c
index aff6fb1..1f1a76b 100644
--- a/src/gallium/drivers/svga/svga_resource_texture.c
+++ b/src/gallium/drivers/svga/svga_resource_texture.c
@@ -692,8 +692,7 @@ svga_texture_transfer_unmap(struct pipe_context *pipe,
 
       svga_transfer_dma(svga, st, SVGA3D_WRITE_HOST_VRAM, flags);
    } else if (transfer->usage & PIPE_TRANSFER_WRITE) {
-      struct svga_winsys_surface *surf =
-	 svga_texture(transfer->resource)->handle;
+      struct svga_winsys_surface *surf = tex->handle;
       SVGA3dBox box;
       enum pipe_error ret;
       unsigned nlayers = 1;
-- 
1.9.1



More information about the mesa-dev mailing list