bool dependent; // Backend work is dependent on all previous BE
bool isCompute; // Is this DC a compute context?
bool cleanupState; // True if this is the last draw using an entry in the state ring.
- volatile bool doneFE; // Is FE work done for this draw?
FE_WORK FeWork;
+ volatile OSALIGNLINE(bool) doneFE; // Is FE work done for this draw?
volatile OSALIGNLINE(uint32_t) FeLock;
- volatile int32_t threadsDone;
+ volatile OSALIGNLINE(uint32_t) threadsDone;
SYNC_DESC retireCallback; // Call this func when this DC is retired.
};
// Scratch space for workers.
uint8_t** ppScratch;
- volatile int32_t drawsOutstandingFE;
+ volatile OSALIGNLINE(uint32_t) drawsOutstandingFE;
- CachingAllocator cachingArenaAllocator;
+ OSALIGNLINE(CachingAllocator) cachingArenaAllocator;
uint32_t frameCount;
uint32_t lastFrameChecked;
// inlined-only version
INLINE int32_t CompleteDrawContextInl(SWR_CONTEXT* pContext, uint32_t workerId, DRAW_CONTEXT* pDC)
{
- int32_t result = InterlockedDecrement((volatile long*)&pDC->threadsDone);
+ int32_t result = static_cast<int32_t>(InterlockedDecrement(&pDC->threadsDone));
SWR_ASSERT(result >= 0);
AR_FLUSH(pDC->drawId);
_mm_mfence();
pDC->doneFE = true;
- InterlockedDecrement((volatile long*)&pContext->drawsOutstandingFE);
+ InterlockedDecrement(&pContext->drawsOutstandingFE);
}
void WorkOnFifoFE(SWR_CONTEXT *pContext, uint32_t workerId, uint32_t &curDrawFE)