Merge commit 'origin/mesa_7_5_branch' into mesa_7_6_branch
[mesa.git] / src / mesa / drivers / dri / r300 / r300_emit.c
index c3817721dc47566d25d09d375e3ae2e76978b109..07e62230874cd462727764f769aaca20512e8e8f 100644 (file)
@@ -81,17 +81,17 @@ GLuint r300VAPInputCntl1(GLcontext * ctx, GLuint InputsRead)
        return vic_1;
 }
 
-GLuint r300VAPOutputCntl0(GLcontext * ctx, GLuint vp_writes, GLuint fp_reads)
+GLuint r300VAPOutputCntl0(GLcontext * ctx, GLuint vp_writes)
 {
        GLuint ret = 0;
 
        if (vp_writes & (1 << VERT_RESULT_HPOS))
                ret |= R300_VAP_OUTPUT_VTX_FMT_0__POS_PRESENT;
 
-       if (vp_writes & (1 << VERT_RESULT_COL0) && fp_reads & FRAG_BIT_COL0)
+       if (vp_writes & (1 << VERT_RESULT_COL0))
                ret |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_0_PRESENT;
 
-       if (vp_writes & (1 << VERT_RESULT_COL1) && fp_reads & FRAG_BIT_COL1)
+       if (vp_writes & (1 << VERT_RESULT_COL1))
                ret |= R300_VAP_OUTPUT_VTX_FMT_0__COLOR_1_PRESENT;
 
        /* Two sided lighting works only if all 4 colors are written */
@@ -105,26 +105,17 @@ GLuint r300VAPOutputCntl0(GLcontext * ctx, GLuint vp_writes, GLuint fp_reads)
        return ret;
 }
 
-GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes, GLuint fp_reads)
+GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes)
 {
        GLuint i, ret = 0, first_free_texcoord = 0;
 
        for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
-               if (vp_writes & (1 << (VERT_RESULT_TEX0 + i)) && fp_reads & FRAG_BIT_TEX(i)) {
+               if (vp_writes & (1 << (VERT_RESULT_TEX0 + i))) {
                        ret |= (4 << (3 * first_free_texcoord));
                        ++first_free_texcoord;
                }
        }
 
-       if (fp_reads & FRAG_BIT_WPOS) {
-               ret |= (4 << (3 * first_free_texcoord));
-               ++first_free_texcoord;
-       }
-
-       if (vp_writes & (1 << VERT_RESULT_FOGC) && fp_reads & FRAG_BIT_FOGC) {
-               ret |= 4 << (3 * first_free_texcoord);
-       }
-
        if (first_free_texcoord > 8) {
                fprintf(stderr, "\tout of free texcoords\n");
                _mesa_exit(-1);
@@ -133,41 +124,6 @@ GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes, GLuint fp_reads)
        return ret;
 }
 
-GLboolean r300EmitArrays(GLcontext * ctx)
-{
-       r300ContextPtr r300 = R300_CONTEXT(ctx);
-       struct r300_vertex_buffer *vbuf = &r300->vbuf;
-       GLuint InputsRead, OutputsWritten;
-
-       r300ChooseSwtclVertexFormat(ctx, &InputsRead, &OutputsWritten);
-
-       r300SwitchFallback(ctx, R300_FALLBACK_AOS_LIMIT, vbuf->num_attribs > R300_MAX_AOS_ARRAYS);
-       if (r300->fallback & R300_RASTER_FALLBACK_MASK)
-               return GL_FALSE;
-
-       {
-               struct vertex_buffer *mesa_vb = &TNL_CONTEXT(ctx)->vb;
-               GLuint attr, i;
-
-               for (i = 0; i < vbuf->num_attribs; i++) {
-                       attr = vbuf->attribs[i].element;
-                       rcommon_emit_vector(ctx, &r300->radeon.tcl.aos[i], mesa_vb->AttribPtr[attr]->data,
-                                       mesa_vb->AttribPtr[attr]->size, mesa_vb->AttribPtr[attr]->stride, mesa_vb->Count);
-               }
-
-               r300->radeon.tcl.aos_count = vbuf->num_attribs;
-
-               /* Fill index buffer info */
-               r300->ind_buf.ptr = mesa_vb->Elts;
-               r300->ind_buf.is_32bit = GL_TRUE;
-               r300->ind_buf.free_needed = GL_FALSE;
-       }
-
-       r300SetupVAP(ctx, InputsRead, OutputsWritten);
-
-       return GL_TRUE;
-}
-
 void r300EmitCacheFlush(r300ContextPtr rmesa)
 {
        BATCH_LOCALS(&rmesa->radeon);