swr/rast: Check gCoreBuckets/CORE_BUCKETS equal length at compile time
authorAlok Hota <alok.hota@intel.com>
Fri, 25 May 2018 15:19:44 +0000 (10:19 -0500)
committerTim Rowley <timothy.o.rowley@intel.com>
Fri, 25 May 2018 15:56:01 +0000 (10:56 -0500)
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
src/gallium/drivers/swr/rasterizer/core/rdtsc_core.cpp

index f289a31..48ea397 100644 (file)
@@ -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<uint32_t> gBucketMap;