summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTim Rowley <[email protected]>2017-08-18 12:34:48 -0500
committerTim Rowley <[email protected]>2017-09-13 10:08:46 -0500
commitf5031fb9521ecf3be4af8584a80516c7307ad61a (patch)
treead7dc32bc44b2af2dc32cb20f77e2327baa0e153 /src
parent2f6ffab1ce740fa39a3472f59ba95d0d50cfd151 (diff)
swr/rast: Add new API SwrStallBE
SwrStallBE stalls the backend threads until all work submitted before the stall has finished. The frontend threads can continue to make forward progress. Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/api.cpp9
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/api.h8
2 files changed, 17 insertions, 0 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp
index ccb6dfb7a19..632309821f8 100644
--- a/src/gallium/drivers/swr/rasterizer/core/api.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp
@@ -458,6 +458,14 @@ void SwrSync(HANDLE hContext, PFN_CALLBACK_FUNC pfnFunc, uint64_t userData, uint
AR_API_END(APISync, 1);
}
+void SwrStallBE(HANDLE hContext)
+{
+ SWR_CONTEXT* pContext = GetContext(hContext);
+ DRAW_CONTEXT* pDC = GetDrawContext(pContext);
+
+ pDC->dependent = true;
+}
+
void SwrWaitForIdle(HANDLE hContext)
{
SWR_CONTEXT *pContext = GetContext(hContext);
@@ -1672,6 +1680,7 @@ void SwrGetInterface(SWR_INTERFACE &out_funcs)
out_funcs.pfnSwrSaveState = SwrSaveState;
out_funcs.pfnSwrRestoreState = SwrRestoreState;
out_funcs.pfnSwrSync = SwrSync;
+ out_funcs.pfnSwrStallBE = SwrStallBE;
out_funcs.pfnSwrWaitForIdle = SwrWaitForIdle;
out_funcs.pfnSwrWaitForIdleFE = SwrWaitForIdleFE;
out_funcs.pfnSwrSetVertexBuffers = SwrSetVertexBuffers;
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.h b/src/gallium/drivers/swr/rasterizer/core/api.h
index a39420552b5..577cfb157a5 100644
--- a/src/gallium/drivers/swr/rasterizer/core/api.h
+++ b/src/gallium/drivers/swr/rasterizer/core/api.h
@@ -263,6 +263,13 @@ SWR_FUNC(void, SwrSync,
uint64_t userData3);
//////////////////////////////////////////////////////////////////////////
+/// @brief Stall cmd. Stalls the backend until all previous work has been completed.
+/// Frontend work can continue to make progress
+/// @param hContext - Handle passed back from SwrCreateContext
+SWR_FUNC(void, SwrStallBE,
+ HANDLE hContext);
+
+//////////////////////////////////////////////////////////////////////////
/// @brief Blocks until all rendering has been completed.
/// @param hContext - Handle passed back from SwrCreateContext
SWR_FUNC(void, SwrWaitForIdle,
@@ -709,6 +716,7 @@ struct SWR_INTERFACE
PFNSwrSaveState pfnSwrSaveState;
PFNSwrRestoreState pfnSwrRestoreState;
PFNSwrSync pfnSwrSync;
+ PFNSwrStallBE pfnSwrStallBE;
PFNSwrWaitForIdle pfnSwrWaitForIdle;
PFNSwrWaitForIdleFE pfnSwrWaitForIdleFE;
PFNSwrSetVertexBuffers pfnSwrSetVertexBuffers;