From 50fd99d1723a6c7f3bd2dedffeeadf7d5e33b83b Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Mon, 22 Nov 2010 15:06:47 -0700 Subject: [PATCH] glsl: fix off by one in register index assertion --- src/mesa/program/ir_to_mesa.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2