summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/svga/svga_winsys.h
diff options
context:
space:
mode:
authorCharmaine Lee <[email protected]>2016-03-08 11:18:51 -0800
committerBrian Paul <[email protected]>2016-07-08 12:53:20 -0600
commitda98cee067fcf61ac6f2c70c91b0c8eab27eba92 (patch)
tree8bf1f7aae51a2a57135960b9fa2793f498ab7c2a /src/gallium/drivers/svga/svga_winsys.h
parentca531aeeb120cdda966120a17cdf50aa14c3129b (diff)
svga: invalidate gb surface before it is reused
With this patch, a guest-backed surface will be invalidated using the SVGA_3D_CMD_INVALIDATE_GB_SURFACE command before the surface is reused. This fixes the updating dirty image error from the device when a surface is reused. v2: Instead of invalidating the surface when it is reused, send the invalidate command before the surface is put into the recycle pool. v3: (1) surface invalidate is a noop operation in Linux winsys, since surface invalidation is not needed for DMA path. (2) Instead of invalidating the surface content in svga_screen_surface_destroy() when a surface is to be destroyed, it is done in svga_screen_cache_flush() when the surface is no longer referenced in a command buffer and is ready to be moved to the unused list. At this point, the surface will be moved to the invalidate list. When the surface invalidation is submitted, the surface will be moved to the unused list. Tested with piglit, glretrace. Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Sinclair Yeh <[email protected]>
Diffstat (limited to 'src/gallium/drivers/svga/svga_winsys.h')
-rw-r--r--src/gallium/drivers/svga/svga_winsys.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h
index b96a8e46c4d..90e4f81da8d 100644
--- a/src/gallium/drivers/svga/svga_winsys.h
+++ b/src/gallium/drivers/svga/svga_winsys.h
@@ -419,6 +419,14 @@ struct svga_winsys_screen
uint32 numMipLevels);
/**
+ * Invalidate the content of this surface
+ */
+ void
+ (*surface_invalidate)(struct svga_winsys_screen *sws,
+ struct svga_winsys_surface *surface);
+
+
+ /**
* Buffer management. Buffer attributes are mostly fixed over its lifetime.
*
* @param usage bitmask of SVGA_BUFFER_USAGE_* flags.