swr/rast: Refactor scratch space variable names

Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
Alok Hota 2018-09-11 17:20:19 -05:00
parent 0b4db43705
commit c503b58878
4 changed files with 13 additions and 13 deletions

View file

@ -633,15 +633,15 @@ void SwrSetCsFunc(HANDLE hContext,
PFN_CS_FUNC pfnCsFunc,
uint32_t totalThreadsInGroup,
uint32_t totalSpillFillSize,
uint32_t scratchSpaceSizePerInstance,
uint32_t numInstances)
uint32_t scratchSpaceSizePerWarp,
uint32_t numWarps)
{
API_STATE* pState = GetDrawState(GetContext(hContext));
pState->pfnCsFunc = pfnCsFunc;
pState->totalThreadsInGroup = totalThreadsInGroup;
pState->totalSpillFillSize = totalSpillFillSize;
pState->scratchSpaceSize = scratchSpaceSizePerInstance;
pState->scratchSpaceNumInstances = numInstances;
API_STATE* pState = GetDrawState(GetContext(hContext));
pState->pfnCsFunc = pfnCsFunc;
pState->totalThreadsInGroup = totalThreadsInGroup;
pState->totalSpillFillSize = totalSpillFillSize;
pState->scratchSpaceSizePerWarp = scratchSpaceSizePerWarp;
pState->scratchSpaceNumWarps = numWarps;
}
void SwrSetTsState(HANDLE hContext, SWR_TS_STATE* pState)

View file

@ -65,7 +65,7 @@ void ProcessComputeBE(DRAW_CONTEXT* pDC,
}
size_t scratchSpaceSize =
pDC->pState->state.scratchSpaceSize * pDC->pState->state.scratchSpaceNumInstances;
pDC->pState->state.scratchSpaceSizePerWarp * pDC->pState->state.scratchSpaceNumWarps;
if (scratchSpaceSize && pScratchSpace == nullptr)
{
pScratchSpace = pDC->pArena->AllocAlignedSync(scratchSpaceSize, KNOB_SIMD16_BYTES);
@ -81,7 +81,7 @@ void ProcessComputeBE(DRAW_CONTEXT* pDC,
csContext.pTGSM = pContext->ppScratch[workerId];
csContext.pSpillFillBuffer = (uint8_t*)pSpillFillBuffer;
csContext.pScratchSpace = (uint8_t*)pScratchSpace;
csContext.scratchSpacePerSimd = pDC->pState->state.scratchSpaceSize;
csContext.scratchSpacePerWarp = pDC->pState->state.scratchSpaceSizePerWarp;
state.pfnCsFunc(GetPrivateState(pDC),
pContext->threadPool.pThreadData[workerId].pWorkerPrivateData,

View file

@ -264,8 +264,8 @@ OSALIGNLINE(struct) API_STATE
PFN_CS_FUNC pfnCsFunc;
uint32_t totalThreadsInGroup;
uint32_t totalSpillFillSize;
uint32_t scratchSpaceSize;
uint32_t scratchSpaceNumInstances;
uint32_t scratchSpaceSizePerWarp;
uint32_t scratchSpaceNumWarps;
// FE - Frontend State
SWR_FRONTEND_STATE frontendState;

View file

@ -421,7 +421,7 @@ struct SWR_CS_CONTEXT
uint8_t* pSpillFillBuffer; // Spill/fill buffer for barrier support
uint8_t* pScratchSpace; // Pointer to scratch space buffer used by the shader, shader is
// responsible for subdividing scratch space per instance/simd
uint32_t scratchSpacePerSimd; // Scratch space per work item x SIMD_WIDTH
uint32_t scratchSpacePerWarp; // Scratch space per work item x SIMD_WIDTH
SWR_SHADER_STATS stats; // OUT: shader statistics used for archrast.
};