From b10c9507cee20edc7cd41682b50c62bb8abef85b Mon Sep 17 00:00:00 2001 From: Tim Rowley Date: Wed, 24 May 2017 13:43:48 -0500 Subject: [PATCH 1/1] swr/rast: whitespace changes Reviewed-by: Bruce Cherniak --- src/gallium/drivers/swr/rasterizer/core/api.cpp | 8 ++------ src/gallium/drivers/swr/rasterizer/core/context.h | 2 -- src/gallium/drivers/swr/rasterizer/core/state.h | 1 + 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp index a463790bd4e..5dd4dc3430c 100644 --- a/src/gallium/drivers/swr/rasterizer/core/api.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp @@ -329,7 +329,6 @@ DRAW_CONTEXT* GetDrawContext(SWR_CONTEXT *pContext, bool isSplitDraw = false) pCurDrawContext->drawId = pContext->dcRing.GetHead(); pCurDrawContext->cleanupState = true; - } else { @@ -783,10 +782,12 @@ void SetupMacroTileScissors(DRAW_CONTEXT *pDC) } } + // templated backend function tables extern PFN_BACKEND_FUNC gBackendNullPs[SWR_MULTISAMPLE_TYPE_COUNT]; extern PFN_BACKEND_FUNC gBackendSingleSample[SWR_INPUT_COVERAGE_COUNT][2][2]; extern PFN_BACKEND_FUNC gBackendSampleRateTable[SWR_MULTISAMPLE_TYPE_COUNT][SWR_INPUT_COVERAGE_COUNT][2][2]; + void SetupPipeline(DRAW_CONTEXT *pDC) { DRAW_STATE* pState = pDC->pState; @@ -1133,7 +1134,6 @@ void DrawInstanced( pState->rastState.cullMode = SWR_CULLMODE_NONE; } - int draw = 0; while (remainingVerts) { @@ -1174,7 +1174,6 @@ void DrawInstanced( pDC = GetDrawContext(pContext); pDC->pState->state.rastState.cullMode = oldCullMode; - AR_API_END(APIDraw, numVertices * numInstances); } @@ -1276,7 +1275,6 @@ void DrawIndexedInstance( pState->rastState.cullMode = SWR_CULLMODE_NONE; } - while (remainingIndices) { uint32_t numIndicesForDraw = (remainingIndices < maxIndicesPerDraw) ? @@ -1322,7 +1320,6 @@ void DrawIndexedInstance( pDC = GetDrawContext(pContext); pDC->pState->state.rastState.cullMode = oldCullMode; - AR_API_END(APIDrawIndexed, numIndices * numInstances); } @@ -1657,7 +1654,6 @@ void SwrInit() InitBackendFuncTables(); } - void SwrGetInterface(SWR_INTERFACE &out_funcs) { out_funcs.pfnSwrCreateContext = SwrCreateContext; diff --git a/src/gallium/drivers/swr/rasterizer/core/context.h b/src/gallium/drivers/swr/rasterizer/core/context.h index 7781feaf101..62332db173b 100644 --- a/src/gallium/drivers/swr/rasterizer/core/context.h +++ b/src/gallium/drivers/swr/rasterizer/core/context.h @@ -418,8 +418,6 @@ struct DRAW_CONTEXT volatile int32_t threadsDone; SYNC_DESC retireCallback; // Call this func when this DC is retired. - - }; static_assert((sizeof(DRAW_CONTEXT) & 63) == 0, "Invalid size for DRAW_CONTEXT"); diff --git a/src/gallium/drivers/swr/rasterizer/core/state.h b/src/gallium/drivers/swr/rasterizer/core/state.h index 75d1210cce3..364a898c280 100644 --- a/src/gallium/drivers/swr/rasterizer/core/state.h +++ b/src/gallium/drivers/swr/rasterizer/core/state.h @@ -1046,6 +1046,7 @@ struct SWR_RASTSTATE uint8_t clipDistanceMask; }; + enum SWR_CONSTANT_SOURCE { SWR_CONSTANT_SOURCE_CONST_0000, -- 2.30.2