From: Eric Anholt Date: Fri, 20 Sep 2013 03:06:35 +0000 (-0700) Subject: mesa: Convert some runtime asserts to static asserts. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=669b88eb12496dd5f1ba933a56c8311624245639;p=mesa.git mesa: Convert some runtime asserts to static asserts. Noticed while grepping through the code for something else. v2: Don't convert really-runtime asserts to static asserts. Reviewed-by: Kenneth Graunke Reviewed-by: Ian Romanick --- diff --git a/src/mesa/program/program.c b/src/mesa/program/program.c index 2529c130524..3a1eb73d780 100644 --- a/src/mesa/program/program.c +++ b/src/mesa/program/program.c @@ -72,10 +72,10 @@ _mesa_init_program(struct gl_context *ctx) ASSERT(ctx->Const.FragmentProgram.MaxAddressOffset <= (1 << INST_INDEX_BITS)); /* If this fails, increase prog_instruction::TexSrcUnit size */ - ASSERT(MAX_TEXTURE_UNITS <= (1 << 5)); + STATIC_ASSERT(MAX_TEXTURE_UNITS <= (1 << 5)); /* If this fails, increase prog_instruction::TexSrcTarget size */ - ASSERT(NUM_TEXTURE_TARGETS <= (1 << 4)); + STATIC_ASSERT(NUM_TEXTURE_TARGETS <= (1 << 4)); ctx->Program.ErrorPos = -1; ctx->Program.ErrorString = _mesa_strdup("");