r600: Assert that array index is not negative.
authorVinson Lee <vlee@vmware.com>
Wed, 24 Feb 2010 08:24:51 +0000 (00:24 -0800)
committerVinson Lee <vlee@vmware.com>
Wed, 24 Feb 2010 08:24:51 +0000 (00:24 -0800)
src/mesa/drivers/dri/r600/r700_assembler.c

index d0059fad2eac53348b1eebbc23e73c637efa5d56..8344dd9a5185f2a304c14e4ff53aee131e16ef74 100644 (file)
@@ -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];