mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 02:58:05 +02:00
swr/rast: Convert system memory pointers to gfxptr_t
Fulfills an unused internal interface Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
parent
4b03a19a0b
commit
20d5c88760
6 changed files with 18 additions and 3 deletions
|
|
@ -196,6 +196,7 @@ HANDLE SwrCreateContext(SWR_CREATECONTEXT_INFO* pCreateInfo)
|
|||
pContext->pfnLoadTile = pCreateInfo->pfnLoadTile;
|
||||
pContext->pfnStoreTile = pCreateInfo->pfnStoreTile;
|
||||
pContext->pfnClearTile = pCreateInfo->pfnClearTile;
|
||||
pContext->pfnMakeGfxPtr = pCreateInfo->pfnMakeGfxPtr;
|
||||
pContext->pfnUpdateSoWriteOffset = pCreateInfo->pfnUpdateSoWriteOffset;
|
||||
pContext->pfnUpdateStats = pCreateInfo->pfnUpdateStats;
|
||||
pContext->pfnUpdateStatsFE = pCreateInfo->pfnUpdateStatsFE;
|
||||
|
|
|
|||
|
|
@ -145,6 +145,9 @@ typedef void(SWR_API* PFN_CLEAR_TILE)(HANDLE hPrivateContex
|
|||
uint32_t renderTargetArrayIndex,
|
||||
const float* pClearColor);
|
||||
|
||||
typedef gfxptr_t(SWR_API* PFN_MAKE_GFXPTR)(HANDLE hPrivateContext,
|
||||
void* sysAddr);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
/// @brief Callback to allow driver to update their copy of streamout write offset.
|
||||
/// This is call is made for any draw operation that has streamout enabled
|
||||
|
|
@ -241,6 +244,7 @@ struct SWR_CREATECONTEXT_INFO
|
|||
PFN_LOAD_TILE pfnLoadTile;
|
||||
PFN_STORE_TILE pfnStoreTile;
|
||||
PFN_CLEAR_TILE pfnClearTile;
|
||||
PFN_MAKE_GFXPTR pfnMakeGfxPtr;
|
||||
PFN_UPDATE_SO_WRITE_OFFSET pfnUpdateSoWriteOffset;
|
||||
PFN_UPDATE_STATS pfnUpdateStats;
|
||||
PFN_UPDATE_STATS_FE pfnUpdateStatsFE;
|
||||
|
|
|
|||
|
|
@ -528,6 +528,7 @@ struct SWR_CONTEXT
|
|||
PFN_LOAD_TILE pfnLoadTile;
|
||||
PFN_STORE_TILE pfnStoreTile;
|
||||
PFN_CLEAR_TILE pfnClearTile;
|
||||
PFN_MAKE_GFXPTR pfnMakeGfxPtr;
|
||||
PFN_UPDATE_SO_WRITE_OFFSET pfnUpdateSoWriteOffset;
|
||||
PFN_UPDATE_STATS pfnUpdateStats;
|
||||
PFN_UPDATE_STATS_FE pfnUpdateStatsFE;
|
||||
|
|
|
|||
|
|
@ -1840,9 +1840,10 @@ void ProcessDraw(SWR_CONTEXT* pContext, DRAW_CONTEXT* pDC, uint32_t workerId, vo
|
|||
{
|
||||
vIndex = _simd16_add_epi32(_simd16_set1_epi32(work.startVertexID), vScale);
|
||||
|
||||
fetchInfo_lo.xpIndices = (gfxptr_t)&vIndex;
|
||||
fetchInfo_hi.xpIndices =
|
||||
(gfxptr_t)&vIndex + KNOB_SIMD_WIDTH * sizeof(int32_t); // 1/2 of KNOB_SIMD16_WIDTH
|
||||
fetchInfo_lo.xpIndices =
|
||||
pDC->pContext->pfnMakeGfxPtr(GetPrivateState(pDC), &vIndex);
|
||||
fetchInfo_hi.xpIndices =
|
||||
pDC->pContext->pfnMakeGfxPtr(GetPrivateState(pDC), &vIndex + KNOB_SIMD_WIDTH * sizeof(int32_t)); // 1/2 of KNOB_SIMD16_WIDTH
|
||||
}
|
||||
|
||||
fetchInfo_lo.CurInstance = instanceNum;
|
||||
|
|
|
|||
|
|
@ -494,6 +494,7 @@ swr_create_context(struct pipe_screen *p_screen, void *priv, unsigned flags)
|
|||
createInfo.pfnClearTile = swr_StoreHotTileClear;
|
||||
createInfo.pfnUpdateStats = swr_UpdateStats;
|
||||
createInfo.pfnUpdateStatsFE = swr_UpdateStatsFE;
|
||||
createInfo.pfnMakeGfxPtr = swr_MakeGfxPtr;
|
||||
|
||||
SWR_THREADING_INFO threadingInfo {0};
|
||||
|
||||
|
|
|
|||
|
|
@ -68,3 +68,10 @@ swr_StoreHotTileClear(HANDLE hPrivateContext,
|
|||
|
||||
pDC->pAPI->pfnSwrStoreHotTileClear(hWorkerPrivateData, pDstSurface, renderTargetIndex, x, y, renderTargetArrayIndex, pClearColor);
|
||||
}
|
||||
|
||||
INLINE gfxptr_t
|
||||
swr_MakeGfxPtr(HANDLE hPrivateContext, void* sysAddr)
|
||||
{
|
||||
// Fulfill an unused internal interface
|
||||
return (gfxptr_t)sysAddr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue