CreateThreadPool(pContext, &pContext->threadPool);
pContext->ppScratch = new uint8_t*[pContext->NumWorkerThreads];
- pContext->pStats = new SWR_STATS[pContext->NumWorkerThreads];
+ pContext->pStats = (SWR_STATS*)AlignedMalloc(sizeof(SWR_STATS) * pContext->NumWorkerThreads, 64);
#if defined(KNOB_ENABLE_AR)
// Setup ArchRast thread contexts which includes +1 for API thread.
// free the fifos
for (uint32_t i = 0; i < KNOB_MAX_DRAWS_IN_FLIGHT; ++i)
{
- delete[] pContext->dcRing[i].dynState.pStats;
+ AlignedFree(pContext->dcRing[i].dynState.pStats);
delete pContext->dcRing[i].pArena;
delete pContext->dsRing[i].pArena;
pContext->pMacroTileManagerArray[i].~MacroTileMgr();
}
delete[] pContext->ppScratch;
- delete[] pContext->pStats;
+ AlignedFree(pContext->pStats);
delete(pContext->pHotTileMgr);
}
DRAW_DYNAMIC_STATE& dynState = pDC->dynState;
- SWR_STATS stats{ 0 };
+ OSALIGNLINE(SWR_STATS) stats{ 0 };
// Sum up stats across all workers before sending to client.
for (uint32_t i = 0; i < pContext->NumWorkerThreads; ++i)
// Initialize DRAW_CONTEXT's per-thread stats
for (uint32_t dc = 0; dc < KNOB_MAX_DRAWS_IN_FLIGHT; ++dc)
{
- pContext->dcRing[dc].dynState.pStats = new SWR_STATS[numThreads];
+ pContext->dcRing[dc].dynState.pStats = (SWR_STATS*)AlignedMalloc(sizeof(SWR_STATS) * numThreads, 64);
memset(pContext->dcRing[dc].dynState.pStats, 0, sizeof(SWR_STATS) * numThreads);
}