GLboolean Clean_Up_Assembler(r700_AssemblerBase *pR700AsmCode)
{
- FREE(pR700AsmCode->pInstDeps);
+ if(NULL != pR700AsmCode->pInstDeps)
+ {
+ FREE(pR700AsmCode->pInstDeps);
+ pR700AsmCode->pInstDeps = NULL;
+ }
if(NULL != pR700AsmCode->subs)
{
FREE(pR700AsmCode->subs);
+ pR700AsmCode->subs = NULL;
}
if(NULL != pR700AsmCode->callers)
{
FREE(pR700AsmCode->callers);
+ pR700AsmCode->callers = NULL;
}
if(NULL != pR700AsmCode->presubs)
{
FREE(pR700AsmCode->presubs);
+ pR700AsmCode->presubs = NULL;
}
return GL_TRUE;
void Clean_Up_Shader(R700_Shader *pShader)
{
- FREE(pShader->pProgram);
+ if(NULL != pShader->pProgram)
+ {
+ FREE(pShader->pProgram);
+ pShader->pProgram = NULL;
+ }
R700ShaderInstruction *pInst;
R700ShaderInstruction *pInstToFree;
pInst = pInst->pNextInst;
FREE(pInstToFree);
};
+ pShader->lstCFInstructions.pHead = NULL;
+
pInst = pShader->lstALUInstructions.pHead;
while(NULL != pInst)
{
pInst = pInst->pNextInst;
FREE(pInstToFree);
};
+ pShader->lstALUInstructions.pHead = NULL;
+
pInst = pShader->lstTEXInstructions.pHead;
while(NULL != pInst)
{
pInst = pInst->pNextInst;
FREE(pInstToFree);
};
+ pShader->lstTEXInstructions.pHead = NULL;
+
pInst = pShader->lstVTXInstructions.pHead;
while(NULL != pInst)
{
pInst = pInst->pNextInst;
FREE(pInstToFree);
};
+ pShader->lstVTXInstructions.pHead = NULL;
}