aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAlok Hota <[email protected]>2018-09-11 17:20:19 -0500
committerAlok Hota <[email protected]>2019-02-15 14:54:14 -0600
commitc503b58878c2d0eee52b57a86e06ee8e32d7644c (patch)
treea46407451489b296900d34149d506b408185fb0f /src/gallium
parent0b4db4370544459fcd47499d9f8663e421fcae34 (diff)
swr/rast: Refactor scratch space variable names
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/api.cpp18
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/backend.cpp4
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/context.h4
-rw-r--r--src/gallium/drivers/swr/rasterizer/core/state.h2
4 files changed, 14 insertions, 14 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp
index 203a74bdb24..0423a4fd600 100644
--- a/src/gallium/drivers/swr/rasterizer/core/api.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp
@@ -633,15 +633,15 @@ void SwrSetCsFunc(HANDLE hContext,
PFN_CS_FUNC pfnCsFunc,
uint32_t totalThreadsInGroup,
uint32_t totalSpillFillSize,
- uint32_t scratchSpaceSizePerInstance,
- uint32_t numInstances)
-{
- API_STATE* pState = GetDrawState(GetContext(hContext));
- pState->pfnCsFunc = pfnCsFunc;
- pState->totalThreadsInGroup = totalThreadsInGroup;
- pState->totalSpillFillSize = totalSpillFillSize;
- pState->scratchSpaceSize = scratchSpaceSizePerInstance;
- pState->scratchSpaceNumInstances = numInstances;
+ uint32_t scratchSpaceSizePerWarp,
+ uint32_t numWarps)
+{
+ 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)
diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp
index db6b778a672..ad358bcc0a5 100644
--- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp
+++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp
@@ -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,
diff --git a/src/gallium/drivers/swr/rasterizer/core/context.h b/src/gallium/drivers/swr/rasterizer/core/context.h
index 5a9ccfb5ded..393d42b477e 100644
--- a/src/gallium/drivers/swr/rasterizer/core/context.h
+++ b/src/gallium/drivers/swr/rasterizer/core/context.h
@@ -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;
diff --git a/src/gallium/drivers/swr/rasterizer/core/state.h b/src/gallium/drivers/swr/rasterizer/core/state.h
index bdf4f6e2e8f..c2594b04cc4 100644
--- a/src/gallium/drivers/swr/rasterizer/core/state.h
+++ b/src/gallium/drivers/swr/rasterizer/core/state.h
@@ -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.
};