From: Andre Maasikas Date: Thu, 2 Sep 2010 08:03:38 +0000 (+0300) Subject: r600: remove mask from output intructions X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5697bf166082119593bf1297028d03a7938eacfb;p=mesa.git r600: remove mask from output intructions in case of relative addressing we never get to know which comps were really written. --- diff --git a/src/mesa/drivers/dri/r600/evergreen_fragprog.c b/src/mesa/drivers/dri/r600/evergreen_fragprog.c index 0d31b1dcf10..fb1f53a3642 100644 --- a/src/mesa/drivers/dri/r600/evergreen_fragprog.c +++ b/src/mesa/drivers/dri/r600/evergreen_fragprog.c @@ -99,7 +99,6 @@ void evergreen_Map_Fragment_Program(r700_AssemblerBase *pAsm, { unsigned int unBit; unsigned int i; - GLuint ui; /* match fp inputs with vp exports. */ struct evergreen_vertex_program_cont *vpc = @@ -246,12 +245,6 @@ void evergreen_Map_Fragment_Program(r700_AssemblerBase *pAsm, pAsm->pR700Shader->depthIsExported = 1; } - pAsm->pucOutMask = (unsigned char*) MALLOC(pAsm->number_of_exports); - for(ui=0; uinumber_of_exports; ui++) - { - pAsm->pucOutMask[ui] = 0x0; - } - pAsm->flag_reg_index = pAsm->number_used_registers++; pAsm->uFirstHelpReg = pAsm->number_used_registers; diff --git a/src/mesa/drivers/dri/r600/evergreen_vertprog.c b/src/mesa/drivers/dri/r600/evergreen_vertprog.c index bdd9a9eb121..291158009df 100644 --- a/src/mesa/drivers/dri/r600/evergreen_vertprog.c +++ b/src/mesa/drivers/dri/r600/evergreen_vertprog.c @@ -200,7 +200,6 @@ void evergreen_Map_Vertex_Program(GLcontext *ctx, struct evergreen_vertex_program *vp, struct gl_vertex_program *mesa_vp) { - GLuint ui; r700_AssemblerBase *pAsm = &(vp->r700AsmCode); unsigned int num_inputs; @@ -226,13 +225,6 @@ void evergreen_Map_Vertex_Program(GLcontext *ctx, pAsm->number_used_registers += pAsm->number_of_exports; - pAsm->pucOutMask = (unsigned char*) MALLOC(pAsm->number_of_exports); - - for(ui=0; uinumber_of_exports; ui++) - { - pAsm->pucOutMask[ui] = 0x0; - } - /* Map temporary registers (GPRs) */ pAsm->starting_temp_register_number = pAsm->number_used_registers; diff --git a/src/mesa/drivers/dri/r600/r700_assembler.c b/src/mesa/drivers/dri/r600/r700_assembler.c index d639fe002bd..9c5a5053d97 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.c +++ b/src/mesa/drivers/dri/r600/r700_assembler.c @@ -1413,17 +1413,6 @@ static GLboolean next_ins(r700_AssemblerBase *pAsm) if (pAsm->D.dst.rtype == DST_REG_OUT) { assert(pAsm->D.dst.reg >= pAsm->starting_export_register_number); - - if (pAsm->D.dst.op3) - { - // There is no mask for OP3 instructions, so all channels are written - pAsm->pucOutMask[pAsm->D.dst.reg - pAsm->starting_export_register_number] = 0xF; - } - else - { - pAsm->pucOutMask[pAsm->D.dst.reg - pAsm->starting_export_register_number] - |= (unsigned char)pAsm->pILInst[pAsm->uiCurInst].DstReg.WriteMask; - } } //reset for next inst. @@ -7751,7 +7740,7 @@ GLboolean Process_Export(r700_AssemblerBase* pAsm, { assert(starting_register_number >= pAsm->starting_export_register_number); - ucWriteMask = pAsm->pucOutMask[starting_register_number - pAsm->starting_export_register_number]; + ucWriteMask = 0x0F; /* exports Z as a float into Red channel */ if (GL_TRUE == is_depth_export) ucWriteMask = 0x1; @@ -8087,7 +8076,6 @@ GLboolean Process_Vertex_Exports(r700_AssemblerBase *pR700AsmCode, GLboolean Clean_Up_Assembler(r700_AssemblerBase *pR700AsmCode) { - FREE(pR700AsmCode->pucOutMask); FREE(pR700AsmCode->pInstDeps); if(NULL != pR700AsmCode->subs) diff --git a/src/mesa/drivers/dri/r600/r700_assembler.h b/src/mesa/drivers/dri/r600/r700_assembler.h index d357b0e3ec0..c7c7ab2d4ff 100644 --- a/src/mesa/drivers/dri/r600/r700_assembler.h +++ b/src/mesa/drivers/dri/r600/r700_assembler.h @@ -414,8 +414,6 @@ typedef struct r700_AssemblerBase unsigned char ucVP_AttributeMap[VERT_ATTRIB_MAX]; unsigned char ucVP_OutputMap[VERT_RESULT_MAX]; - unsigned char * pucOutMask; - //----------------------------------------------------------------------------------- // flow control members //----------------------------------------------------------------------------------- diff --git a/src/mesa/drivers/dri/r600/r700_fragprog.c b/src/mesa/drivers/dri/r600/r700_fragprog.c index 6fdd93a3302..217b0e27a4a 100644 --- a/src/mesa/drivers/dri/r600/r700_fragprog.c +++ b/src/mesa/drivers/dri/r600/r700_fragprog.c @@ -99,7 +99,6 @@ void Map_Fragment_Program(r700_AssemblerBase *pAsm, { unsigned int unBit; unsigned int i; - GLuint ui; /* match fp inputs with vp exports. */ struct r700_vertex_program_cont *vpc = @@ -245,12 +244,6 @@ void Map_Fragment_Program(r700_AssemblerBase *pAsm, } } - pAsm->pucOutMask = (unsigned char*) MALLOC(pAsm->number_of_exports); - for(ui=0; uinumber_of_exports; ui++) - { - pAsm->pucOutMask[ui] = 0x0; - } - pAsm->flag_reg_index = pAsm->number_used_registers++; pAsm->uFirstHelpReg = pAsm->number_used_registers; diff --git a/src/mesa/drivers/dri/r600/r700_vertprog.c b/src/mesa/drivers/dri/r600/r700_vertprog.c index 7ed4b7d2387..2fee5b4433e 100644 --- a/src/mesa/drivers/dri/r600/r700_vertprog.c +++ b/src/mesa/drivers/dri/r600/r700_vertprog.c @@ -201,7 +201,6 @@ void Map_Vertex_Program(GLcontext *ctx, struct r700_vertex_program *vp, struct gl_vertex_program *mesa_vp) { - GLuint ui; r700_AssemblerBase *pAsm = &(vp->r700AsmCode); unsigned int num_inputs; @@ -227,13 +226,6 @@ void Map_Vertex_Program(GLcontext *ctx, pAsm->number_used_registers += pAsm->number_of_exports; - pAsm->pucOutMask = (unsigned char*) MALLOC(pAsm->number_of_exports); - - for(ui=0; uinumber_of_exports; ui++) - { - pAsm->pucOutMask[ui] = 0x0; - } - /* Map temporary registers (GPRs) */ pAsm->starting_temp_register_number = pAsm->number_used_registers;