From: Vinson Lee Date: Wed, 24 Feb 2010 08:24:51 +0000 (-0800) Subject: r600: Assert that array index is not negative. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e16f0c14f353cc04ad6cbcf99e3b95ccb1d2c06b;p=mesa.git r600: Assert that array index is not negative. --- diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index d0059fad2ea..8344dd9a518 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -1250,6 +1250,7 @@ GLboolean assemble_src(r700_AssemblerBase *pAsm, if(pAsm->aArgSubst[1+src] >= 0) { + assert(fld >= 0); setaddrmode_PVSSRC(&(pAsm->S[fld].src), ADDR_ABSOLUTE); pAsm->S[fld].src.rtype = SRC_REG_TEMPORARY; pAsm->S[fld].src.reg = pAsm->aArgSubst[1+src];