nir: Fix the Mesa build without -DDEBUG.
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 20 Feb 2015 20:31:31 +0000 (12:31 -0800)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 20 Feb 2015 21:43:44 +0000 (13:43 -0800)
commitb6393d70402a60c124c1884d8d0cc1dc6a9b4ca5
treea9be20e7c04d1c695fc4c6fc502f573662782b7f
parentbef38f62e026c5bce5073f82f2797151f941b586
nir: Fix the Mesa build without -DDEBUG.

With -DDEBUG -UNDEBUG, this assert uses reg_state::stack_size, which
doesn't exist, breaking the build:

assert(state->states[index].index < state->states[index].stack_size);

Switch it to ifndef NDEBUG, so the field will exist if the assertion
actually generates code.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Matt Turner <mattst88@gmail.com>
src/glsl/nir/nir_to_ssa.c