[Mesa-dev] [PATCH] r600: Remove some unused code.
Henri Verbeet
hverbeet at gmail.com
Mon Jul 19 13:50:32 PDT 2010
---
src/mesa/drivers/dri/r600/r700_assembler.c | 119 ----------------------------
src/mesa/drivers/dri/r600/r700_assembler.h | 10 ---
src/mesa/drivers/dri/r600/r700_shader.c | 41 ----------
src/mesa/drivers/dri/r600/r700_shader.h | 1 -
4 files changed, 0 insertions(+), 171 deletions(-)
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c
index 99a33df..c2d7f72 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.c
+++ b/src/mesa/drivers/dri/r600/r700_assembler.c
@@ -75,11 +75,6 @@ COMPILED_SUB noise1_presub = {
0
};
-BITS addrmode_PVSDST(PVSDST * pPVSDST)
-{
- return pPVSDST->addrmode0 | ((BITS)pPVSDST->addrmode1 << 1);
-}
-
void setaddrmode_PVSDST(PVSDST * pPVSDST, BITS addrmode)
{
pPVSDST->addrmode0 = addrmode & 1;
@@ -229,35 +224,6 @@ void onecomp_PVSSRC(PVSSRC* pPVSSRC, int c)
}
}
-BITS is_misc_component_exported(VAP_OUT_VTX_FMT_0* pOutVTXFmt0)
-{
- return (pOutVTXFmt0->point_size |
- pOutVTXFmt0->edge_flag |
- pOutVTXFmt0->rta_index |
- pOutVTXFmt0->kill_flag |
- pOutVTXFmt0->viewport_index);
-}
-
-BITS is_depth_component_exported(OUT_FRAGMENT_FMT_0* pFPOutFmt)
-{
- return (pFPOutFmt->depth |
- pFPOutFmt->stencil_ref |
- pFPOutFmt->mask |
- pFPOutFmt->coverage_to_mask);
-}
-
-GLboolean is_reduction_opcode(PVSDWORD* dest)
-{
- if (dest->dst.op3 == 0)
- {
- if ( (dest->dst.opcode == SQ_OP2_INST_DOT4 || dest->dst.opcode == SQ_OP2_INST_DOT4_IEEE || dest->dst.opcode == SQ_OP2_INST_CUBE) )
- {
- return GL_TRUE;
- }
- }
- return GL_FALSE;
-}
-
GLuint GetSurfaceFormat(GLenum eType, GLuint nChannels, GLuint * pClient_size)
{
GLuint format = FMT_INVALID;
@@ -1013,22 +979,6 @@ GLboolean assemble_vfetch_instruction2(r700_AssemblerBase* pAsm,
return GL_TRUE;
}
-GLboolean cleanup_vfetch_instructions(r700_AssemblerBase* pAsm)
-{
- GLint i;
- pAsm->cf_current_clause_type = CF_EMPTY_CLAUSE;
- pAsm->cf_current_vtx_clause_ptr = NULL;
-
- for (i=0; i<VERT_ATTRIB_MAX; i++)
- {
- pAsm->vfetch_instruction_ptr_array[ i ] = NULL;
- }
-
- cleanup_vfetch_shaderinst(pAsm->pR700Shader);
-
- return GL_TRUE;
-}
-
GLuint gethelpr(r700_AssemblerBase* pAsm)
{
GLuint r = pAsm->uHelpReg;
@@ -2785,12 +2735,6 @@ GLboolean assemble_ARL(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
-GLboolean assemble_BAD(char *opcode_str)
-{
- radeon_error("Not yet implemented instruction (%s)\n", opcode_str);
- return GL_FALSE;
-}
-
GLboolean assemble_CMP(r700_AssemblerBase *pAsm)
{
int tmp;
@@ -3146,11 +3090,6 @@ GLboolean assemble_FLR(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
-GLboolean assemble_FLR_INT(r700_AssemblerBase *pAsm)
-{
- return assemble_math_function(pAsm, SQ_OP2_INST_FLT_TO_INT);
-}
-
GLboolean assemble_FRC(r700_AssemblerBase *pAsm)
{
checkop1(pAsm);
@@ -4190,43 +4129,6 @@ GLboolean assemble_SGE(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
-GLboolean assemble_SLT(r700_AssemblerBase *pAsm)
-{
- if( GL_FALSE == checkop2(pAsm) )
- {
- return GL_FALSE;
- }
-
- pAsm->D.dst.opcode = SQ_OP2_INST_SETGT;
-
- if( GL_FALSE == assemble_dst(pAsm) )
- {
- return GL_FALSE;
- }
-
- if( GL_FALSE == assemble_src(pAsm, 0, 1) )
- {
- return GL_FALSE;
- }
-
- if( GL_FALSE == assemble_src(pAsm, 1, 0) )
- {
- return GL_FALSE;
- }
-
- if( GL_FALSE == next_ins(pAsm) )
- {
- return GL_FALSE;
- }
-
- return GL_TRUE;
-}
-
-GLboolean assemble_STP(r700_AssemblerBase *pAsm)
-{
- return GL_TRUE;
-}
-
GLboolean assemble_TEX(r700_AssemblerBase *pAsm)
{
GLboolean src_const;
@@ -4615,11 +4517,6 @@ GLboolean assemble_XPD(r700_AssemblerBase *pAsm)
return GL_TRUE;
}
-GLboolean assemble_EXPORT(r700_AssemblerBase *pAsm)
-{
- return GL_TRUE;
-}
-
static inline void decreaseCurrent(r700_AssemblerBase *pAsm, GLuint uReason)
{
switch (uReason)
@@ -5541,7 +5438,6 @@ GLboolean AssembleInstr(GLuint uiFirstInst,
break;
case OPCODE_ARR:
radeon_error("Not yet implemented instruction OPCODE_ARR \n");
- //if ( GL_FALSE == assemble_BAD("ARR") )
return GL_FALSE;
break;
@@ -5579,11 +5475,6 @@ GLboolean AssembleInstr(GLuint uiFirstInst,
if ( GL_FALSE == assemble_FLR(pR700AsmCode) )
return GL_FALSE;
break;
- //case OP_FLR_INT: ;
-
- // if ( GL_FALSE == assemble_FLR_INT() )
- // return GL_FALSE;
- // break;
case OPCODE_FRC:
if ( GL_FALSE == assemble_FRC(pR700AsmCode) )
@@ -5740,11 +5631,6 @@ GLboolean AssembleInstr(GLuint uiFirstInst,
}
break;
- //case OP_STP:
- // if ( GL_FALSE == assemble_STP(pR700AsmCode) )
- // return GL_FALSE;
- // break;
-
case OPCODE_SWZ:
if ( GL_FALSE == assemble_MOV(pR700AsmCode) )
{
@@ -5863,11 +5749,6 @@ GLboolean AssembleInstr(GLuint uiFirstInst,
}
break;
- //case OPCODE_EXPORT:
- // if ( GL_FALSE == assemble_EXPORT() )
- // return GL_FALSE;
- // break;
-
case OPCODE_ENDSUB:
return assemble_ENDSUB(pR700AsmCode);
diff --git a/src/mesa/drivers/dri/r600/r700_assembler.h b/src/mesa/drivers/dri/r600/r700_assembler.h
index dbc6cdb..8a1a34e 100644
--- a/src/mesa/drivers/dri/r600/r700_assembler.h
+++ b/src/mesa/drivers/dri/r600/r700_assembler.h
@@ -492,7 +492,6 @@ typedef struct r700_AssemblerBase
} r700_AssemblerBase;
//Internal use
-BITS addrmode_PVSDST(PVSDST * pPVSDST);
void setaddrmode_PVSDST(PVSDST * pPVSDST, BITS addrmode);
void nomask_PVSDST(PVSDST * pPVSDST);
BITS addrmode_PVSSRC(PVSSRC* pPVSSRC);
@@ -505,9 +504,6 @@ void noneg_PVSSRC(PVSSRC* pPVSSRC);
void flipneg_PVSSRC(PVSSRC* pPVSSRC);
void zerocomp_PVSSRC(PVSSRC* pPVSSRC, int c);
void onecomp_PVSSRC(PVSSRC* pPVSSRC, int c);
-BITS is_misc_component_exported(VAP_OUT_VTX_FMT_0* pOutVTXFmt0);
-BITS is_depth_component_exported(OUT_FRAGMENT_FMT_0* pFPOutFmt) ;
-GLboolean is_reduction_opcode(PVSDWORD * dest);
GLuint GetSurfaceFormat(GLenum eType, GLuint nChannels, GLuint * pClient_size);
unsigned int r700GetNumOperands(GLuint opcode, GLuint nIsOp3);
@@ -535,7 +531,6 @@ GLboolean assemble_vfetch_instruction2(r700_AssemblerBase* pAsm,
GLboolean normalize,
GLenum format,
VTX_FETCH_METHOD * pFetchMethod);
-GLboolean cleanup_vfetch_instructions(r700_AssemblerBase* pAsm);
GLuint gethelpr(r700_AssemblerBase* pAsm);
void resethelpr(r700_AssemblerBase* pAsm);
void checkop_init(r700_AssemblerBase* pAsm);
@@ -594,14 +589,12 @@ GLboolean assemble_math_function(r700_AssemblerBase* pAsm, BITS opcode);
GLboolean assemble_ABS(r700_AssemblerBase *pAsm);
GLboolean assemble_ADD(r700_AssemblerBase *pAsm);
GLboolean assemble_ARL(r700_AssemblerBase *pAsm);
-GLboolean assemble_BAD(char *opcode_str);
GLboolean assemble_CMP(r700_AssemblerBase *pAsm);
GLboolean assemble_DOT(r700_AssemblerBase *pAsm);
GLboolean assemble_DST(r700_AssemblerBase *pAsm);
GLboolean assemble_EX2(r700_AssemblerBase *pAsm);
GLboolean assemble_EXP(r700_AssemblerBase *pAsm);
GLboolean assemble_FLR(r700_AssemblerBase *pAsm);
-GLboolean assemble_FLR_INT(r700_AssemblerBase *pAsm);
GLboolean assemble_FRC(r700_AssemblerBase *pAsm);
GLboolean assemble_KIL(r700_AssemblerBase *pAsm, GLuint opcode);
GLboolean assemble_LG2(r700_AssemblerBase *pAsm);
@@ -624,11 +617,8 @@ GLboolean assemble_LOGIC(r700_AssemblerBase *pAsm, BITS opcode);
GLboolean assemble_LOGIC_PRED(r700_AssemblerBase *pAsm, BITS opcode);
GLboolean assemble_TRIG(r700_AssemblerBase *pAsm, BITS opcode);
-GLboolean assemble_SLT(r700_AssemblerBase *pAsm);
-GLboolean assemble_STP(r700_AssemblerBase *pAsm);
GLboolean assemble_TEX(r700_AssemblerBase *pAsm);
GLboolean assemble_XPD(r700_AssemblerBase *pAsm);
-GLboolean assemble_EXPORT(r700_AssemblerBase *pAsm);
GLboolean assemble_IF(r700_AssemblerBase *pAsm, GLboolean bHasElse);
GLboolean assemble_ELSE(r700_AssemblerBase *pAsm);
GLboolean assemble_ENDIF(r700_AssemblerBase *pAsm);
diff --git a/src/mesa/drivers/dri/r600/r700_shader.c b/src/mesa/drivers/dri/r600/r700_shader.c
index 67b0d40..e8e658b 100644
--- a/src/mesa/drivers/dri/r600/r700_shader.c
+++ b/src/mesa/drivers/dri/r600/r700_shader.c
@@ -541,47 +541,6 @@ void DebugPrint(void)
{
}
-void cleanup_vfetch_shaderinst(R700_Shader *pShader)
-{
- R700ShaderInstruction *pInst;
- R700ShaderInstruction *pInstToFree;
- R700VertexInstruction *pVTXInst;
- R700ControlFlowInstruction *pCFInst;
-
- pInst = pShader->lstVTXInstructions.pHead;
- while(NULL != pInst)
- {
- pVTXInst = (R700VertexInstruction *)pInst;
- pShader->uShaderBinaryDWORDSize -= GetInstructionSize(pVTXInst->m_ShaderInstType);
-
- if(NULL != pVTXInst->m_pLinkedGenericClause)
- {
- pCFInst = (R700ControlFlowInstruction*)(pVTXInst->m_pLinkedGenericClause);
-
- TakeInstOutFromList(&(pShader->lstCFInstructions),
- (R700ShaderInstruction*)pCFInst);
-
- pShader->uShaderBinaryDWORDSize -= GetInstructionSize(pCFInst->m_ShaderInstType);
- }
-
- pInst = pInst->pNextInst;
- };
-
- //destroy each item in pShader->lstVTXInstructions;
- pInst = pShader->lstVTXInstructions.pHead;
- while(NULL != pInst)
- {
- pInstToFree = pInst;
- pInst = pInst->pNextInst;
- FREE(pInstToFree);
- };
-
- //set NULL pShader->lstVTXInstructions
- pShader->lstVTXInstructions.pHead=NULL;
- pShader->lstVTXInstructions.pTail=NULL;
- pShader->lstVTXInstructions.uNumOfNode=0;
-}
-
void Clean_Up_Shader(R700_Shader *pShader)
{
FREE(pShader->pProgram);
diff --git a/src/mesa/drivers/dri/r600/r700_shader.h b/src/mesa/drivers/dri/r600/r700_shader.h
index 0599ffd..3ab24ec 100644
--- a/src/mesa/drivers/dri/r600/r700_shader.h
+++ b/src/mesa/drivers/dri/r600/r700_shader.h
@@ -145,7 +145,6 @@ void LoadProgram(R700_Shader *pShader);
void UpdateShaderRegisters(R700_Shader *pShader);
void DeleteInstructions(R700_Shader *pShader);
void DebugPrint(void);
-void cleanup_vfetch_shaderinst(R700_Shader *pShader);
void Clean_Up_Shader(R700_Shader *pShader);
--
1.7.1
More information about the mesa-dev
mailing list