r600: remove mask from output intructions
authorAndre Maasikas <amaasikas@gmail.com>
Thu, 2 Sep 2010 08:03:38 +0000 (11:03 +0300)
committerAndre Maasikas <amaasikas@gmail.com>
Thu, 9 Sep 2010 08:08:11 +0000 (11:08 +0300)
in case of relative addressing we never get to know which comps
were really written.

src/mesa/drivers/dri/r600/evergreen_fragprog.c
src/mesa/drivers/dri/r600/evergreen_vertprog.c
src/mesa/drivers/dri/r600/r700_assembler.c
src/mesa/drivers/dri/r600/r700_assembler.h
src/mesa/drivers/dri/r600/r700_fragprog.c
src/mesa/drivers/dri/r600/r700_vertprog.c

index 0d31b1dcf107d5023b4b3a83eb61e450e7526e3b..fb1f53a36425e128899cdc9d51ef3918e1d252a4 100644 (file)
@@ -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; ui<pAsm->number_of_exports; ui++)
-    {
-        pAsm->pucOutMask[ui] = 0x0;
-    }
-
     pAsm->flag_reg_index = pAsm->number_used_registers++;
 
     pAsm->uFirstHelpReg = pAsm->number_used_registers;
index bdd9a9eb121bd848b28a6107cdd36e3604b1b802..291158009df3061d714dda4c248b6266145ca349 100644 (file)
@@ -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; ui<pAsm->number_of_exports; ui++)
-    {
-        pAsm->pucOutMask[ui] = 0x0;
-    }
-
     /* Map temporary registers (GPRs) */
     pAsm->starting_temp_register_number = pAsm->number_used_registers;
 
index d639fe002bd903a2b8380a20d8ce813a24015a4d..9c5a5053d97fc3ec9fed52d5389f3a788a630df4 100644 (file)
@@ -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)
index d357b0e3ec01990f6c575437ad6484b563ab1cf1..c7c7ab2d4ffecab29faa7443f47f629435dfd8ff 100644 (file)
@@ -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
        //-----------------------------------------------------------------------------------
index 6fdd93a3302c2584c0ffd4f8a0fbf52c66a66c31..217b0e27a4af488ae846feeda63f3747ef9247f9 100644 (file)
@@ -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; ui<pAsm->number_of_exports; ui++)
-    {
-        pAsm->pucOutMask[ui] = 0x0;
-    }
-
     pAsm->flag_reg_index = pAsm->number_used_registers++;
 
     pAsm->uFirstHelpReg = pAsm->number_used_registers;
index 7ed4b7d23870030c2ac3a3c5e8082911c25f0b02..2fee5b4433e186c6a0f12a7546543aeff6684de4 100644 (file)
@@ -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; ui<pAsm->number_of_exports; ui++)
-    {
-        pAsm->pucOutMask[ui] = 0x0;
-    }
-
     /* Map temporary registers (GPRs) */
     pAsm->starting_temp_register_number = pAsm->number_used_registers;