From: Alok Hota Date: Fri, 25 May 2018 15:19:44 +0000 (-0500) Subject: swr/rast: Check gCoreBuckets/CORE_BUCKETS equal length at compile time X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f09636e2e1311b24cbcd2a2d49e97f8a69702cfd;p=mesa.git swr/rast: Check gCoreBuckets/CORE_BUCKETS equal length at compile time Reviewed-by: Bruce Cherniak --- diff --git a/src/gallium/drivers/swr/rasterizer/core/rdtsc_core.cpp b/src/gallium/drivers/swr/rasterizer/core/rdtsc_core.cpp index f289a319ca3..48ea397018b 100644 --- a/src/gallium/drivers/swr/rasterizer/core/rdtsc_core.cpp +++ b/src/gallium/drivers/swr/rasterizer/core/rdtsc_core.cpp @@ -89,6 +89,7 @@ BUCKET_DESC gCoreBuckets[] = { { "BEStoreTiles", "", true, 0xff00cccc }, { "BEEndTile", "", false, 0xffffffff }, }; +static_assert(NumBuckets == (sizeof(gCoreBuckets) / sizeof(gCoreBuckets[0])), "RDTSC Bucket enum and description table size mismatched."); /// @todo bucketmanager and mapping should probably be a part of the SWR context std::vector gBucketMap;