r600: hopefully fix segfault.
authorDave Airlie <airlied@linux.ie>
Sun, 22 Nov 2009 20:44:29 +0000 (06:44 +1000)
committerDave Airlie <airlied@linux.ie>
Sun, 22 Nov 2009 20:44:29 +0000 (06:44 +1000)
src/mesa/drivers/dri/r600/r700_assembler.c

index c46dd757d0db60c086f6332230372f17742ed252..702add977263273057bab5071439d78afcd8bba8 100644 (file)
@@ -6421,6 +6421,8 @@ GLboolean RelocProgram(r700_AssemblerBase * pAsm)
     R700ShaderInstruction *        pInst;
     R700ControlFlowGenericClause * pCFInst;
 
+    plstCFmain = pAsm->CALLSTACK[0].plstCFInstructions_local;
+
     /* remove flags init if they are not used */
     if((pAsm->unCFflags & HAS_LOOPRET) == 0)
     {
@@ -6462,7 +6464,6 @@ GLboolean RelocProgram(r700_AssemblerBase * pAsm)
         pAsm->pR700Shader->uStackSize = ((pAsm->CALLSTACK[0].max + 3)>>2) + 2;
     }
 
-    plstCFmain = pAsm->CALLSTACK[0].plstCFInstructions_local;
     unCFoffset = plstCFmain->uNumOfNode;
 
     /* Reloc subs */