void SwrSetCsFunc(
HANDLE hContext,
PFN_CS_FUNC pfnCsFunc,
- uint32_t totalThreadsInGroup)
+ uint32_t totalThreadsInGroup,
+ uint32_t totalSpillFillSize)
{
API_STATE* pState = GetDrawState(GetContext(hContext));
pState->pfnCsFunc = pfnCsFunc;
pState->totalThreadsInGroup = totalThreadsInGroup;
+ pState->totalSpillFillSize = totalSpillFillSize;
}
void SwrSetTsState(
//////////////////////////////////////////////////////////////////////////
/// @brief Set compute shader
/// @param hContext - Handle passed back from SwrCreateContext
-/// @param pState - Pointer to compute shader function
+/// @param pfnCsFunc - Pointer to compute shader function
/// @param totalThreadsInGroup - product of thread group dimensions.
+/// @param totalSpillFillSize - size in bytes needed for spill/fill.
void SWR_API SwrSetCsFunc(
HANDLE hContext,
PFN_CS_FUNC pfnCsFunc,
- uint32_t totalThreadsInGroup);
+ uint32_t totalThreadsInGroup,
+ uint32_t totalSpillFillSize);
//////////////////////////////////////////////////////////////////////////
/// @brief Set tessellation state.
// Ensure spill fill memory has been allocated.
if (pSpillFillBuffer == nullptr)
{
- ///@todo Add state which indicates the spill fill size.
- pSpillFillBuffer = pDC->pArena->AllocAlignedSync(4 * sizeof(MEGABYTE), sizeof(float) * 8);
+ pSpillFillBuffer = pDC->pArena->AllocAlignedSync(pDC->pState->state.totalSpillFillSize, sizeof(float) * 8);
}
const API_STATE& state = GetApiState(pDC);
// CS - Compute Shader
PFN_CS_FUNC pfnCsFunc;
uint32_t totalThreadsInGroup;
+ uint32_t totalSpillFillSize;
// FE - Frontend State
SWR_FRONTEND_STATE frontendState;