diff options
author | Alok Hota <[email protected]> | 2018-09-12 10:51:36 -0500 |
---|---|---|
committer | Alok Hota <[email protected]> | 2019-02-15 14:54:19 -0600 |
commit | f9c29a301a38304312911238167056e1962dca13 (patch) | |
tree | 7096c3eb7304cf3dcc47dd5e4f770067e6e70fe4 /src | |
parent | c503b58878c2d0eee52b57a86e06ee8e32d7644c (diff) |
swr/rast: convert DWORD->uint32_t, QWORD->uint64_t
Reviewed-by: Bruce Cherniak <[email protected]>
Diffstat (limited to 'src')
5 files changed, 25 insertions, 25 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.h b/src/gallium/drivers/swr/rasterizer/core/backend.h index 79d9007bee6..c9eb6c259e3 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend.h +++ b/src/gallium/drivers/swr/rasterizer/core/backend.h @@ -53,7 +53,7 @@ typedef void (*PFN_CLEAR_TILES)(DRAW_CONTEXT*, SWR_RENDERTARGET_ATTACHMENT rt, uint32_t, uint32_t, - DWORD[4], + uint32_t[4], const SWR_RECT& rect); extern PFN_CLEAR_TILES gClearTilesTable[NUM_SWR_FORMATS]; diff --git a/src/gallium/drivers/swr/rasterizer/core/backend_clear.cpp b/src/gallium/drivers/swr/rasterizer/core/backend_clear.cpp index 0b14ca09f4c..623ebc81d77 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend_clear.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/backend_clear.cpp @@ -81,7 +81,7 @@ INLINE void ClearMacroTile(DRAW_CONTEXT* pDC, SWR_RENDERTARGET_ATTACHMENT rt, uint32_t macroTile, uint32_t renderTargetArrayIndex, - DWORD clear[4], + uint32_t clear[4], const SWR_RECT& rect) { // convert clear color to hottile format @@ -223,10 +223,10 @@ void ProcessClearBE(DRAW_CONTEXT* pDC, uint32_t workerId, uint32_t macroTile, vo pClear->renderTargetArrayIndex); // All we want to do here is to mark the hot tile as being in a "needs clear" state. - pHotTile->clearData[0] = *(DWORD*)&(pClear->clearRTColor[0]); - pHotTile->clearData[1] = *(DWORD*)&(pClear->clearRTColor[1]); - pHotTile->clearData[2] = *(DWORD*)&(pClear->clearRTColor[2]); - pHotTile->clearData[3] = *(DWORD*)&(pClear->clearRTColor[3]); + pHotTile->clearData[0] = *(uint32_t*)&(pClear->clearRTColor[0]); + pHotTile->clearData[1] = *(uint32_t*)&(pClear->clearRTColor[1]); + pHotTile->clearData[2] = *(uint32_t*)&(pClear->clearRTColor[2]); + pHotTile->clearData[3] = *(uint32_t*)&(pClear->clearRTColor[3]); pHotTile->state = HOTTILE_CLEAR; } } @@ -241,7 +241,7 @@ void ProcessClearBE(DRAW_CONTEXT* pDC, uint32_t workerId, uint32_t macroTile, vo true, numSamples, pClear->renderTargetArrayIndex); - pHotTile->clearData[0] = *(DWORD*)&pClear->clearDepth; + pHotTile->clearData[0] = *(uint32_t*)&pClear->clearDepth; pHotTile->state = HOTTILE_CLEAR; } @@ -270,11 +270,11 @@ void ProcessClearBE(DRAW_CONTEXT* pDC, uint32_t workerId, uint32_t macroTile, vo if (pClear->attachmentMask & SWR_ATTACHMENT_MASK_COLOR) { - DWORD clearData[4]; - clearData[0] = *(DWORD*)&(pClear->clearRTColor[0]); - clearData[1] = *(DWORD*)&(pClear->clearRTColor[1]); - clearData[2] = *(DWORD*)&(pClear->clearRTColor[2]); - clearData[3] = *(DWORD*)&(pClear->clearRTColor[3]); + uint32_t clearData[4]; + clearData[0] = *(uint32_t*)&(pClear->clearRTColor[0]); + clearData[1] = *(uint32_t*)&(pClear->clearRTColor[1]); + clearData[2] = *(uint32_t*)&(pClear->clearRTColor[2]); + clearData[3] = *(uint32_t*)&(pClear->clearRTColor[3]); PFN_CLEAR_TILES pfnClearTiles = gClearTilesTable[KNOB_COLOR_HOT_TILE_FORMAT]; SWR_ASSERT(pfnClearTiles != nullptr); @@ -297,8 +297,8 @@ void ProcessClearBE(DRAW_CONTEXT* pDC, uint32_t workerId, uint32_t macroTile, vo if (pClear->attachmentMask & SWR_ATTACHMENT_DEPTH_BIT) { - DWORD clearData[4]; - clearData[0] = *(DWORD*)&pClear->clearDepth; + uint32_t clearData[4]; + clearData[0] = *(uint32_t*)&pClear->clearDepth; PFN_CLEAR_TILES pfnClearTiles = gClearTilesTable[KNOB_DEPTH_HOT_TILE_FORMAT]; SWR_ASSERT(pfnClearTiles != nullptr); @@ -313,7 +313,7 @@ void ProcessClearBE(DRAW_CONTEXT* pDC, uint32_t workerId, uint32_t macroTile, vo if (pClear->attachmentMask & SWR_ATTACHMENT_STENCIL_BIT) { - DWORD clearData[4]; + uint32_t clearData[4]; clearData[0] = pClear->clearStencil; PFN_CLEAR_TILES pfnClearTiles = gClearTilesTable[KNOB_STENCIL_HOT_TILE_FORMAT]; diff --git a/src/gallium/drivers/swr/rasterizer/core/binner.cpp b/src/gallium/drivers/swr/rasterizer/core/binner.cpp index 6d9680b72c5..7731e997ea5 100644 --- a/src/gallium/drivers/swr/rasterizer/core/binner.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/binner.cpp @@ -816,7 +816,7 @@ void SIMDCALL BinTrianglesImpl(DRAW_CONTEXT* pDC, uint32_t frontFaceMask = frontWindingTris; uint32_t* pPrimID = (uint32_t*)&primID; const uint32_t* pViewportIndex = (uint32_t*)&viewportIdx; - DWORD triIndex = 0; + uint32_t triIndex = 0; uint32_t edgeEnable; PFN_WORK_FUNC pfnWork; @@ -1103,7 +1103,7 @@ endBinTriangles: TransposeVertices(vHorizW, vRecipW0, vRecipW1, vRecipW2); // scan remaining valid triangles and bin each separately - while (_BitScanForward(&triIndex, triMask)) + while (_BitScanForward((DWORD*)&triIndex, triMask)) { uint32_t linkageCount = state.backendState.numAttributes; uint32_t numScalarAttribs = linkageCount * 4; @@ -1339,12 +1339,12 @@ void BinPostSetupPointsImpl(DRAW_CONTEXT* pDC, const uint32_t* aRTAI = reinterpret_cast<const uint32_t*>(&rtIdx); uint32_t* pPrimID = (uint32_t*)&primID; - DWORD primIndex = 0; + uint32_t primIndex = 0; const SWR_BACKEND_STATE& backendState = pDC->pState->state.backendState; // scan remaining valid triangles and bin each separately - while (_BitScanForward(&primIndex, primMask)) + while (_BitScanForward((DWORD*)&primIndex, primMask)) { uint32_t linkageCount = backendState.numAttributes; uint32_t numScalarAttribs = linkageCount * 4; @@ -1499,8 +1499,8 @@ void BinPostSetupPointsImpl(DRAW_CONTEXT* pDC, // scan remaining valid prims and bin each separately const SWR_BACKEND_STATE& backendState = state.backendState; - DWORD primIndex; - while (_BitScanForward(&primIndex, primMask)) + uint32_t primIndex; + while (_BitScanForward((DWORD*)&primIndex, primMask)) { uint32_t linkageCount = backendState.numAttributes; uint32_t numScalarAttribs = linkageCount * 4; @@ -1799,8 +1799,8 @@ void BinPostSetupLinesImpl(DRAW_CONTEXT* pDC, TransposeVertices(vHorizW, vRecipW0, vRecipW1, SIMD_T::setzero_ps()); // scan remaining valid prims and bin each separately - DWORD primIndex; - while (_BitScanForward(&primIndex, primMask)) + uint32_t primIndex; + while (_BitScanForward((DWORD*)&primIndex, primMask)) { uint32_t linkageCount = state.backendState.numAttributes; uint32_t numScalarAttribs = linkageCount * 4; diff --git a/src/gallium/drivers/swr/rasterizer/core/tilemgr.h b/src/gallium/drivers/swr/rasterizer/core/tilemgr.h index 7173b0248f1..ea6e28c4b05 100644 --- a/src/gallium/drivers/swr/rasterizer/core/tilemgr.h +++ b/src/gallium/drivers/swr/rasterizer/core/tilemgr.h @@ -246,7 +246,7 @@ struct HOTTILE { uint8_t* pBuffer; HOTTILE_STATE state; - DWORD clearData[4]; // May need to change based on pfnClearTile implementation. Reorder for + uint32_t clearData[4]; // May need to change based on pfnClearTile implementation. Reorder for // alignment? uint32_t numSamples; uint32_t renderTargetArrayIndex; // current render target array index loaded diff --git a/src/gallium/drivers/swr/rasterizer/core/utils.h b/src/gallium/drivers/swr/rasterizer/core/utils.h index 27c9c606d17..e008cc8d739 100644 --- a/src/gallium/drivers/swr/rasterizer/core/utils.h +++ b/src/gallium/drivers/swr/rasterizer/core/utils.h @@ -370,7 +370,7 @@ static INLINE std::string GetEnv(const std::string& variableName) { std::string output; #if defined(_WIN32) - DWORD valueSize = GetEnvironmentVariableA(variableName.c_str(), nullptr, 0); + uint32_t valueSize = GetEnvironmentVariableA(variableName.c_str(), nullptr, 0); if (!valueSize) return output; output.resize(valueSize - 1); // valueSize includes null, output.resize() does not |