softpipe: Use STATIC_ASSERT whenever possible.
authorJose Fonseca <jfonseca@vmware.com>
Tue, 12 Apr 2016 06:35:38 +0000 (07:35 +0100)
committerJose Fonseca <jfonseca@vmware.com>
Tue, 12 Apr 2016 15:56:15 +0000 (16:56 +0100)
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/gallium/drivers/softpipe/sp_tile_cache.c

index 9cc8ac125253163205ad8050b6f508c3fe44f0a7..c6233261938a53734fee9a2329ae1f9147a362a6 100644 (file)
@@ -99,9 +99,9 @@ sp_create_tile_cache( struct pipe_context *pipe )
    maxTexSize = 1 << (maxLevels - 1);
    assert(MAX_WIDTH >= maxTexSize);
 
-   assert(sizeof(union tile_address) == 4);
+   STATIC_ASSERT(sizeof(union tile_address) == 4);
 
-   assert((TILE_SIZE << TILE_ADDR_BITS) >= MAX_WIDTH);
+   STATIC_ASSERT((TILE_SIZE << TILE_ADDR_BITS) >= MAX_WIDTH);
 
    tc = CALLOC_STRUCT( softpipe_tile_cache );
    if (tc) {