r600 : fix stack depth setting bug.
authorRichard Li <richardradeon@gmail.com>
Tue, 24 Nov 2009 17:16:39 +0000 (12:16 -0500)
committerRichard Li <richardradeon@gmail.com>
Tue, 24 Nov 2009 17:16:39 +0000 (12:16 -0500)
src/mesa/drivers/dri/r600/r700_assembler.c

index 8e57396a0d973e36dc940ecdc242aa17ff245b9d..0c16594adce648d2aaa0a58a8a197ed57d04f7ea 100644 (file)
@@ -6503,14 +6503,14 @@ GLboolean RelocProgram(r700_AssemblerBase * pAsm)
         };
     }
 
-    if(0 == pAsm->unSubArrayPointer)
+    if(pAsm->CALLSTACK[0].max > 0)
     {
-        return GL_TRUE;
+        pAsm->pR700Shader->uStackSize = ((pAsm->CALLSTACK[0].max + 3)>>2) + 2;
     }
 
-    if(pAsm->CALLSTACK[0].max > 0)
+    if(0 == pAsm->unSubArrayPointer)
     {
-        pAsm->pR700Shader->uStackSize = ((pAsm->CALLSTACK[0].max + 3)>>2) + 2;
+        return GL_TRUE;
     }
 
     unCFoffset = plstCFmain->uNumOfNode;