mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
swr: [rasterizer core] Use CS spill/fill size in core
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
ee9621e2f5
commit
244ae7af1b
4 changed files with 9 additions and 5 deletions
|
|
@ -527,11 +527,13 @@ void SwrSetGsFunc(
|
|||
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(
|
||||
|
|
|
|||
|
|
@ -254,12 +254,14 @@ void SWR_API SwrSetGsFunc(
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
/// @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.
|
||||
|
|
|
|||
|
|
@ -82,8 +82,7 @@ void ProcessComputeBE(DRAW_CONTEXT* pDC, uint32_t workerId, uint32_t threadGroup
|
|||
// 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);
|
||||
|
|
|
|||
|
|
@ -245,6 +245,7 @@ OSALIGNLINE(struct) API_STATE
|
|||
// CS - Compute Shader
|
||||
PFN_CS_FUNC pfnCsFunc;
|
||||
uint32_t totalThreadsInGroup;
|
||||
uint32_t totalSpillFillSize;
|
||||
|
||||
// FE - Frontend State
|
||||
SWR_FRONTEND_STATE frontendState;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue