diff options
author | Tim Rowley <[email protected]> | 2016-07-14 12:02:51 -0600 |
---|---|---|
committer | Tim Rowley <[email protected]> | 2016-07-20 10:22:15 -0500 |
commit | a123d12e1424816b4c3ac5422db7e5373df8d2fa (patch) | |
tree | d244aad787ae8aed0c56f02623cc37f5df66892b | |
parent | e41d9dd5769542b2118d222359fb7b7280564317 (diff) |
swr: [rasterizer core] rename *_MAX enum values to *_COUNT
Makes these names semantically correct.
Signed-off-by: Tim Rowley <[email protected]>
5 files changed, 21 insertions, 22 deletions
diff --git a/src/gallium/drivers/swr/rasterizer/core/api.cpp b/src/gallium/drivers/swr/rasterizer/core/api.cpp index c3a1539b506..8a2787beb7e 100644 --- a/src/gallium/drivers/swr/rasterizer/core/api.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/api.cpp @@ -735,10 +735,10 @@ void SetupMacroTileScissors(DRAW_CONTEXT *pDC) } // templated backend function tables -extern PFN_BACKEND_FUNC gBackendNullPs[SWR_MULTISAMPLE_TYPE_MAX]; +extern PFN_BACKEND_FUNC gBackendNullPs[SWR_MULTISAMPLE_TYPE_COUNT]; extern PFN_BACKEND_FUNC gBackendSingleSample[2][2][2]; -extern PFN_BACKEND_FUNC gBackendPixelRateTable[SWR_MULTISAMPLE_TYPE_MAX][SWR_MSAA_SAMPLE_PATTERN_MAX][2][2][2][2]; -extern PFN_BACKEND_FUNC gBackendSampleRateTable[SWR_MULTISAMPLE_TYPE_MAX][2][2][2]; +extern PFN_BACKEND_FUNC gBackendPixelRateTable[SWR_MULTISAMPLE_TYPE_COUNT][SWR_MSAA_SAMPLE_PATTERN_COUNT][2][2][2][2]; +extern PFN_BACKEND_FUNC gBackendSampleRateTable[SWR_MULTISAMPLE_TYPE_COUNT][2][2][2]; void SetupPipeline(DRAW_CONTEXT *pDC) { DRAW_STATE* pState = pDC->pState; diff --git a/src/gallium/drivers/swr/rasterizer/core/backend.cpp b/src/gallium/drivers/swr/rasterizer/core/backend.cpp index 5d83baf391c..81abb29e892 100644 --- a/src/gallium/drivers/swr/rasterizer/core/backend.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/backend.cpp @@ -1155,19 +1155,19 @@ void InitClearTilesTable() sClearTilesTable[R8_UINT] = ClearMacroTile<R8_UINT>; } -PFN_BACKEND_FUNC gBackendNullPs[SWR_MULTISAMPLE_TYPE_MAX]; +PFN_BACKEND_FUNC gBackendNullPs[SWR_MULTISAMPLE_TYPE_COUNT]; PFN_BACKEND_FUNC gBackendSingleSample[2] // input coverage [2] // centroid [2] // canEarlyZ = {}; -PFN_BACKEND_FUNC gBackendPixelRateTable[SWR_MULTISAMPLE_TYPE_MAX] - [SWR_MSAA_SAMPLE_PATTERN_MAX] +PFN_BACKEND_FUNC gBackendPixelRateTable[SWR_MULTISAMPLE_TYPE_COUNT] + [SWR_MSAA_SAMPLE_PATTERN_COUNT] [2] // input coverage [2] // centroid [2] // forcedSampleCount [2] // canEarlyZ = {}; -PFN_BACKEND_FUNC gBackendSampleRateTable[SWR_MULTISAMPLE_TYPE_MAX] +PFN_BACKEND_FUNC gBackendSampleRateTable[SWR_MULTISAMPLE_TYPE_COUNT] [2] // input coverage [2] // centroid [2] // canEarlyZ @@ -1255,11 +1255,11 @@ void InitBackendSingleFuncTable(PFN_BACKEND_FUNC (&table)[2][2][2]) } } -void InitBackendPixelFuncTable(PFN_BACKEND_FUNC (&table)[SWR_MULTISAMPLE_TYPE_MAX][SWR_MSAA_SAMPLE_PATTERN_MAX][2][2][2][2]) +void InitBackendPixelFuncTable(PFN_BACKEND_FUNC (&table)[SWR_MULTISAMPLE_TYPE_COUNT][SWR_MSAA_SAMPLE_PATTERN_COUNT][2][2][2][2]) { - for(uint32_t sampleCount = SWR_MULTISAMPLE_1X; sampleCount < SWR_MULTISAMPLE_TYPE_MAX; sampleCount++) + for(uint32_t sampleCount = SWR_MULTISAMPLE_1X; sampleCount < SWR_MULTISAMPLE_TYPE_COUNT; sampleCount++) { - for(uint32_t samplePattern = SWR_MSAA_CENTER_PATTERN; samplePattern < SWR_MSAA_SAMPLE_PATTERN_MAX; samplePattern++) + for(uint32_t samplePattern = SWR_MSAA_CENTER_PATTERN; samplePattern < SWR_MSAA_SAMPLE_PATTERN_COUNT; samplePattern++) { for(uint32_t inputCoverage = 0; inputCoverage < 2; inputCoverage++) { @@ -1280,9 +1280,9 @@ void InitBackendPixelFuncTable(PFN_BACKEND_FUNC (&table)[SWR_MULTISAMPLE_TYPE_MA } } -void InitBackendSampleFuncTable(PFN_BACKEND_FUNC (&table)[SWR_MULTISAMPLE_TYPE_MAX][2][2][2]) +void InitBackendSampleFuncTable(PFN_BACKEND_FUNC (&table)[SWR_MULTISAMPLE_TYPE_COUNT][2][2][2]) { - for(uint32_t sampleCount = SWR_MULTISAMPLE_1X; sampleCount < SWR_MULTISAMPLE_TYPE_MAX; sampleCount++) + for(uint32_t sampleCount = SWR_MULTISAMPLE_1X; sampleCount < SWR_MULTISAMPLE_TYPE_COUNT; sampleCount++) { for(uint32_t inputCoverage = 0; inputCoverage < 2; inputCoverage++) { diff --git a/src/gallium/drivers/swr/rasterizer/core/multisample.h b/src/gallium/drivers/swr/rasterizer/core/multisample.h index bba0d9ab79a..55387a2ec6e 100644 --- a/src/gallium/drivers/swr/rasterizer/core/multisample.h +++ b/src/gallium/drivers/swr/rasterizer/core/multisample.h @@ -36,8 +36,8 @@ typedef std::integral_constant<int, 1> SingleSampleT; INLINE uint32_t GetNumSamples(SWR_MULTISAMPLE_COUNT sampleCount) { - static const uint32_t sampleCountLUT[SWR_MULTISAMPLE_TYPE_MAX] {1, 2, 4, 8, 16}; - assert(sampleCount < SWR_MULTISAMPLE_TYPE_MAX); + static const uint32_t sampleCountLUT[SWR_MULTISAMPLE_TYPE_COUNT] {1, 2, 4, 8, 16}; + assert(sampleCount < SWR_MULTISAMPLE_TYPE_COUNT); return sampleCountLUT[sampleCount]; } diff --git a/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp b/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp index 408d1d5bb93..897556a052c 100644 --- a/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/rasterizer.cpp @@ -1545,8 +1545,8 @@ PFN_WORK_FUNC GetRasterizerFunc( ) { return TemplateArgUnroller<RasterizerChooser>::GetFunc( - IntArg<0,4>{numSamples}, + IntArg<SWR_MULTISAMPLE_1X,SWR_MULTISAMPLE_TYPE_COUNT-1>{numSamples}, IsConservative, - IntArg<SWR_INPUT_COVERAGE_NONE, SWR_INPUT_COVERAGE_MAX>{InputCoverage}, + IntArg<SWR_INPUT_COVERAGE_NONE, SWR_INPUT_COVERAGE_COUNT-1>{InputCoverage}, RasterizeScissorEdges); } diff --git a/src/gallium/drivers/swr/rasterizer/core/state.h b/src/gallium/drivers/swr/rasterizer/core/state.h index 0931c82b5d2..3514a8fd26c 100644 --- a/src/gallium/drivers/swr/rasterizer/core/state.h +++ b/src/gallium/drivers/swr/rasterizer/core/state.h @@ -761,7 +761,7 @@ enum SWR_MULTISAMPLE_COUNT SWR_MULTISAMPLE_4X, SWR_MULTISAMPLE_8X, SWR_MULTISAMPLE_16X, - SWR_MULTISAMPLE_TYPE_MAX + SWR_MULTISAMPLE_TYPE_COUNT }; struct SWR_BLEND_STATE @@ -872,7 +872,7 @@ enum SWR_MSAA_SAMPLE_PATTERN { SWR_MSAA_CENTER_PATTERN, SWR_MSAA_STANDARD_PATTERN, - SWR_MSAA_SAMPLE_PATTERN_MAX + SWR_MSAA_SAMPLE_PATTERN_COUNT }; enum SWR_PIXEL_LOCATION @@ -1008,7 +1008,7 @@ enum SWR_SHADING_RATE { SWR_SHADING_RATE_PIXEL, SWR_SHADING_RATE_SAMPLE, - SWR_SHADING_RATE_MAX, + SWR_SHADING_RATE_COUNT, }; enum SWR_INPUT_COVERAGE @@ -1016,7 +1016,7 @@ enum SWR_INPUT_COVERAGE SWR_INPUT_COVERAGE_NONE, SWR_INPUT_COVERAGE_NORMAL, SWR_INPUT_COVERAGE_INNER_CONSERVATIVE, - SWR_INPUT_COVERAGE_MAX, + SWR_INPUT_COVERAGE_COUNT, }; enum SWR_PS_POSITION_OFFSET @@ -1024,7 +1024,7 @@ enum SWR_PS_POSITION_OFFSET SWR_PS_POSITION_SAMPLE_NONE, SWR_PS_POSITION_SAMPLE_OFFSET, SWR_PS_POSITION_CENTROID_OFFSET, - SWR_PS_POSITION_OFFSET_MAX, + SWR_PS_POSITION_OFFSET_COUNT, }; enum SWR_BARYCENTRICS_MASK @@ -1032,7 +1032,6 @@ enum SWR_BARYCENTRICS_MASK SWR_BARYCENTRIC_PER_PIXEL_MASK = 0x1, SWR_BARYCENTRIC_CENTROID_MASK = 0x2, SWR_BARYCENTRIC_PER_SAMPLE_MASK = 0x4, - SWR_BARYCENTRICS_MASK_MAX = 0x8 }; // pixel shader state |