diff options
author | Tim Rowley <[email protected]> | 2016-08-03 15:22:20 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-08-10 11:07:53 -0500 |
commit | 8dfaf249cc00178e126cc2469671fedb789698fa (patch) | |
tree | 97c11cdd14b194989444909054e409286c97c526 /src/gallium/drivers/swr | |
parent | 6624e01114c6d15ed48813f0cec97940885aca45 (diff) |
swr: [rasterizer core] change threadsDone to be a 32-bit value.
Signed-off-by: Tim Rowley <[email protected]>
Diffstat (limited to 'src/gallium/drivers/swr')
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/context.h | 2 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/threads.cpp | 6 | ||||
-rw-r--r-- | src/gallium/drivers/swr/rasterizer/core/threads.h | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/context.h b/src/gallium/drivers/swr/rasterizer/core/context.h index b36154bee53..48cd7991084 100644 --- a/src/gallium/drivers/swr/rasterizer/core/context.h +++ b/src/gallium/drivers/swr/rasterizer/core/context.h @@ -399,7 +399,7 @@ struct DRAW_CONTEXT FE_WORK FeWork; volatile OSALIGNLINE(uint32_t) FeLock; - volatile int64_t threadsDone; + volatile int32_t threadsDone; SYNC_DESC retireCallback; // Call this func when this DC is retired. }; diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.cpp b/src/gallium/drivers/swr/rasterizer/core/threads.cpp index e87e732fc85..ea7cbab3647 100644 --- a/src/gallium/drivers/swr/rasterizer/core/threads.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/threads.cpp @@ -343,9 +343,9 @@ INLINE void ExecuteCallbacks(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC) } // inlined-only version -INLINE int64_t CompleteDrawContextInl(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC) +INLINE int32_t CompleteDrawContextInl(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC) { - int64_t result = InterlockedDecrement64(&pDC->threadsDone); + int32_t result = InterlockedDecrement((volatile LONG*)&pDC->threadsDone); SWR_ASSERT(result >= 0); if (result == 0) @@ -372,7 +372,7 @@ INLINE int64_t CompleteDrawContextInl(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC) } // available to other translation modules -int64_t CompleteDrawContext(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC) +int32_t CompleteDrawContext(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC) { return CompleteDrawContextInl(pContext, pDC); } diff --git a/src/gallium/drivers/swr/rasterizer/core/threads.h b/src/gallium/drivers/swr/rasterizer/core/threads.h index e7b4924f0e8..215c699a9d3 100644 --- a/src/gallium/drivers/swr/rasterizer/core/threads.h +++ b/src/gallium/drivers/swr/rasterizer/core/threads.h @@ -67,4 +67,4 @@ void DestroyThreadPool(SWR_CONTEXT *pContext, THREAD_POOL *pPool); void WorkOnFifoFE(SWR_CONTEXT *pContext, uint32_t workerId, uint32_t &curDrawFE); void WorkOnFifoBE(SWR_CONTEXT *pContext, uint32_t workerId, uint32_t &curDrawBE, TileSet &usedTiles, uint32_t numaNode, uint32_t numaMask); void WorkOnCompute(SWR_CONTEXT *pContext, uint32_t workerId, uint32_t &curDrawBE); -int64_t CompleteDrawContext(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC);
\ No newline at end of file +int32_t CompleteDrawContext(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC); |