diff options
author | Charmaine Lee <[email protected]> | 2017-01-26 18:46:23 -0800 |
---|---|---|
committer | Brian Paul <[email protected]> | 2017-04-07 13:46:44 -0600 |
commit | 16bd2c6d04b0a80f3808266fa530dcfd219d5c9d (patch) | |
tree | aac701b7e3037471b519947022e6771c25499783 /src/gallium/drivers/svga/svga_winsys.h | |
parent | e000b17f87bd960c4ce1c0892017023d4dc59609 (diff) |
svga: add context pointer to the invalidate surface interface
With this patch, we will specify the current context
when we invalidate the surface before the surface is
put back to the recycled surface pool. This allows the
winsys layer to use the specified context to do the
invalidation rather than using the last context that
referenced the surface. This prevents race condition if
the last referenced context is now made current in another thread.
Tested with MTT glretrace, NobelClinicianViewer.
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.h | 15 |
1 files changed, 7 insertions, 8 deletions
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. |