r300: remove unused software TNL path
authorMaciej Cencora <m.cencora@gmail.com>
Fri, 14 Aug 2009 14:39:01 +0000 (16:39 +0200)
committerMaciej Cencora <m.cencora@gmail.com>
Fri, 14 Aug 2009 15:06:02 +0000 (17:06 +0200)
This doesn't remove software TCL path - so RS480 and RS690 work as before.

src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r300/r300_emit.c
src/mesa/drivers/dri/r300/r300_emit.h
src/mesa/drivers/dri/r300/r300_render.c

index 799e6134cd4284254a5648bd27b858b2a73ad597..1baae8fc7652991f2be1c6fbc6d813f1546381ac 100644 (file)
@@ -64,7 +64,6 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r300_ioctl.h"
 #include "r300_tex.h"
 #include "r300_emit.h"
-#include "r300_render.h"
 #include "r300_swtcl.h"
 #include "radeon_bocs_wrapper.h"
 #include "radeon_buffer_objects.h"
@@ -155,7 +154,6 @@ const struct dri_extension gl_20_extension[] = {
 };
 
 static const struct tnl_pipeline_stage *r300_pipeline[] = {
-
        /* Catch any t&l fallbacks
         */
        &_tnl_vertex_transform_stage,
@@ -166,21 +164,7 @@ static const struct tnl_pipeline_stage *r300_pipeline[] = {
        &_tnl_texture_transform_stage,
        &_tnl_point_attenuation_stage,
        &_tnl_vertex_program_stage,
-
-       /* Try again to go to tcl?
-        *     - no good for asymmetric-twoside (do with multipass)
-        *     - no good for asymmetric-unfilled (do with multipass)
-        *     - good for material
-        *     - good for texgen
-        *     - need to manipulate a bit of state
-        *
-        * - worth it/not worth it?
-        */
-
-       /* Else do them here.
-        */
-       &_r300_render_stage,
-       &_tnl_render_stage,     /* FALLBACK  */
+       &_tnl_render_stage,
        0,
 };
 
index feb3370f372bacc9fb93af0fe3df705d7374a1df..07e62230874cd462727764f769aaca20512e8e8f 100644 (file)
@@ -124,41 +124,6 @@ GLuint r300VAPOutputCntl1(GLcontext * ctx, GLuint vp_writes)
        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);
index 3f8c60ffae1a7538777b31d41c7a1e7962fb87f9..8e57e354d1dc2e11bf9cbebfdfc3f5c78d9396b8 100644 (file)
@@ -104,7 +104,7 @@ static INLINE uint32_t cmdpacket3(struct radeon_screen *rscrn, int packet)
        return cmd.u;
 }
 
-static INLINE uint32_t cmdcpdelay(struct radeon_screen *rscrn,  
+static INLINE uint32_t cmdcpdelay(struct radeon_screen *rscrn,
                                   unsigned short count)
 {
        drm_r300_cmd_header_t cmd;
@@ -216,8 +216,6 @@ void static INLINE cp_wait(radeonContextPtr radeon, unsigned char flags)
        }
 }
 
-extern GLboolean r300EmitArrays(GLcontext * ctx);
-
 extern int r300PrimitiveType(r300ContextPtr rmesa, int prim);
 extern int r300NumVerts(r300ContextPtr rmesa, int num_verts, int prim);
 
index 08d67b73edcbb9581f3c4a7d63234469c196118f..22b0d316cfdea8b2c015e99f9c93442854ce0eb8 100644 (file)
@@ -382,37 +382,6 @@ void r300RunRenderPrimitive(GLcontext * ctx, int start, int end, int prim)
        COMMIT_BATCH();
 }
 
-static void r300RunRender(GLcontext * ctx, struct tnl_pipeline_stage *stage)
-{
-       r300ContextPtr rmesa = R300_CONTEXT(ctx);
-       int i;
-       TNLcontext *tnl = TNL_CONTEXT(ctx);
-       struct vertex_buffer *vb = &tnl->vb;
-
-       if (RADEON_DEBUG & DEBUG_PRIMS)
-               fprintf(stderr, "%s\n", __FUNCTION__);
-
-       r300UpdateShaders(rmesa);
-       r300EmitArrays(ctx);
-
-       r300UpdateShaderStates(rmesa);
-
-       r300EmitCacheFlush(rmesa);
-       radeonEmitState(&rmesa->radeon);
-
-       for (i = 0; i < vb->PrimitiveCount; i++) {
-               GLuint prim = _tnl_translate_prim(&vb->Primitive[i]);
-               GLuint start = vb->Primitive[i].start;
-               GLuint end = vb->Primitive[i].start + vb->Primitive[i].count;
-               r300RunRenderPrimitive(ctx, start, end, prim);
-       }
-
-       r300EmitCacheFlush(rmesa);
-
-       radeonReleaseArrays(ctx, ~0);
-}
-
-
 static const char *getFallbackString(uint32_t bit)
 {
        switch (bit) {
@@ -449,7 +418,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
        r300ContextPtr rmesa = R300_CONTEXT(ctx);
        uint32_t old_fallback = rmesa->fallback;
        static uint32_t fallback_warn = 0;
-       
+
        if (mode) {
                if ((fallback_warn & bit) == 0) {
                        if (RADEON_DEBUG & DEBUG_FALLBACKS)
@@ -470,7 +439,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
                /* update only if we change from no raster fallbacks to some raster fallbacks */
                if (((old_fallback & R300_RASTER_FALLBACK_MASK) == 0) &&
                        ((bit & R300_RASTER_FALLBACK_MASK) > 0)) {
-                       
+
                        radeon_firevertices(&rmesa->radeon);
                        rmesa->radeon.swtcl.RenderIndex = ~0;
                        _swsetup_Wakeup( ctx );
@@ -489,7 +458,7 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
                /* update only if we have disabled all raster fallbacks */
                if ((old_fallback & R300_RASTER_FALLBACK_MASK) == bit) {
                        _swrast_flush( ctx );
-                       
+
                        tnl->Driver.Render.Start = r300RenderStart;
                        tnl->Driver.Render.Finish = r300RenderFinish;
                        tnl->Driver.Render.PrimitiveNotify = r300RenderPrimitive;
@@ -497,38 +466,10 @@ void r300SwitchFallback(GLcontext *ctx, uint32_t bit, GLboolean mode)
                        tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
                        tnl->Driver.Render.CopyPV = _tnl_copy_pv;
                        tnl->Driver.Render.Interp = _tnl_interp;
-                       
+
                        _tnl_invalidate_vertex_state( ctx, ~0 );
                        _tnl_invalidate_vertices( ctx, ~0 );
                }
        }
-       
-}
-
-static GLboolean r300RunNonTCLRender(GLcontext * ctx,
-                                    struct tnl_pipeline_stage *stage)
-{
-       r300ContextPtr rmesa = R300_CONTEXT(ctx);
-
-       if (RADEON_DEBUG & DEBUG_PRIMS)
-               fprintf(stderr, "%s\n", __FUNCTION__);
-
-       if (rmesa->fallback & R300_RASTER_FALLBACK_MASK)
-               return GL_TRUE;
 
-       if (rmesa->options.hw_tcl_enabled == GL_FALSE)
-               return GL_TRUE;
-
-       r300RunRender(ctx, stage);
-
-       return GL_FALSE;
 }
-
-const struct tnl_pipeline_stage _r300_render_stage = {
-       "r300 Hardware Rasterization",
-       NULL,
-       NULL,
-       NULL,
-       NULL,
-       r300RunNonTCLRender
-};