diff options
Diffstat (limited to 'src/gallium/drivers/svga')
-rw-r--r-- | src/gallium/drivers/svga/svga_context.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_screen_cache.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_screen_cache.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/svga/svga_winsys.h | 15 |
4 files changed, 16 insertions, 11 deletions
diff --git a/src/gallium/drivers/svga/svga_context.c b/src/gallium/drivers/svga/svga_context.c index 04466fb7dee..a6f3b34890d 100644 --- a/src/gallium/drivers/svga/svga_context.c +++ b/src/gallium/drivers/svga/svga_context.c @@ -367,7 +367,7 @@ svga_context_flush(struct svga_context *svga, svga->hud.num_flushes++; - svga_screen_cache_flush(svgascreen, fence); + svga_screen_cache_flush(svgascreen, svga, fence); SVGA3D_ResetLastCommand(svga->swc); diff --git a/src/gallium/drivers/svga/svga_screen_cache.c b/src/gallium/drivers/svga/svga_screen_cache.c index d26e79a5c4a..82d2ebce976 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.c +++ b/src/gallium/drivers/svga/svga_screen_cache.c @@ -32,6 +32,7 @@ #include "svga_winsys.h" #include "svga_screen.h" #include "svga_screen_cache.h" +#include "svga_context.h" #define SVGA_SURFACE_CACHE_ENABLED 1 @@ -310,6 +311,7 @@ svga_screen_cache_add(struct svga_screen *svgascreen, */ void svga_screen_cache_flush(struct svga_screen *svgascreen, + struct svga_context *svga, struct pipe_fence_handle *fence) { struct svga_host_surface_cache *cache = &svgascreen->cache; @@ -357,8 +359,10 @@ svga_screen_cache_flush(struct svga_screen *svgascreen, /* remove entry from the validated list */ LIST_DEL(&entry->head); - /* it is now safe to invalidate the surface content. */ - sws->surface_invalidate(sws, entry->handle); + /* It is now safe to invalidate the surface content. + * It will be done using the current context. + */ + svga->swc->surface_invalidate(svga->swc, entry->handle); /* add the entry to the invalidated list */ LIST_ADD(&entry->head, &cache->invalidated); diff --git a/src/gallium/drivers/svga/svga_screen_cache.h b/src/gallium/drivers/svga/svga_screen_cache.h index 2ade1025fca..03b809a41a7 100644 --- a/src/gallium/drivers/svga/svga_screen_cache.h +++ b/src/gallium/drivers/svga/svga_screen_cache.h @@ -53,6 +53,7 @@ struct svga_winsys_surface; struct svga_screen; +struct svga_context; /** * Same as svga_winsys_screen::surface_create. @@ -136,6 +137,7 @@ svga_screen_cache_cleanup(struct svga_screen *svgascreen); void svga_screen_cache_flush(struct svga_screen *svgascreen, + struct svga_context *svga, struct pipe_fence_handle *fence); enum pipe_error diff --git a/src/gallium/drivers/svga/svga_winsys.h b/src/gallium/drivers/svga/svga_winsys.h index f226581774e..3bb23ce1438 100644 --- a/src/gallium/drivers/svga/svga_winsys.h +++ b/src/gallium/drivers/svga/svga_winsys.h @@ -392,6 +392,13 @@ struct svga_winsys_context boolean *rebind); /** + * Invalidate the content of this surface + */ + void + (*surface_invalidate)(struct svga_winsys_context *swc, + struct svga_winsys_surface *surface); + + /** * Create and define a DX GB shader that resides in the device COTable. * Caller of this function will issue the DXDefineShader command. */ @@ -556,14 +563,6 @@ 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. |