From: Brian Paul Date: Mon, 22 Nov 2010 22:06:47 +0000 (-0700) Subject: glsl: fix off by one in register index assertion X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50fd99d1723a6c7f3bd2dedffeeadf7d5e33b83b;p=mesa.git glsl: fix off by one in register index assertion --- diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 98da90d359a..4f263add7a4 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -2239,7 +2239,7 @@ mesa_src_reg_from_ir_src_reg(ir_to_mesa_src_reg reg) struct prog_src_register mesa_reg; mesa_reg.File = reg.file; - assert(reg.index < (1 << INST_INDEX_BITS) - 1); + assert(reg.index < (1 << INST_INDEX_BITS)); mesa_reg.Index = reg.index; mesa_reg.Swizzle = reg.swizzle; mesa_reg.RelAddr = reg.reladdr != NULL;