Add support to external tnl switcher and disable hw tnl by default.
authorAapo Tahkola <aet@rasterburn.org>
Sun, 1 May 2005 23:36:43 +0000 (23:36 +0000)
committerAapo Tahkola <aet@rasterburn.org>
Sun, 1 May 2005 23:36:43 +0000 (23:36 +0000)
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r300/r300_maos.c
src/mesa/drivers/dri/r300/r300_render.c
src/mesa/drivers/dri/r300/r300_vertexprog.c

index 42c80e7ced4fd4bb74d1e288482c5d0b48924001..e4aa7ccb22ad473f4999428a781807e92880f4a7 100644 (file)
@@ -62,7 +62,9 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "utils.h"
 #include "xmlpool.h"           /* for symbolic values of enum-type options */
 
-int hw_tcl_on=1;
+/* hw_tcl_on derives from future_hw_tcl_on when its safe to change it. */
+int future_hw_tcl_on=0;
+int hw_tcl_on=0;
 
 /* Extension strings exported by the R300 driver.
  */
index b435b0cbbd4ad970c1211f366a8f2616aec67481..5bbd5986d48786e2c7d20322af06d16c3920ed33 100644 (file)
@@ -173,7 +173,8 @@ static void emit_vector(GLcontext * ctx,
                fprintf(stderr, "%s count %d size %d stride %d\n",
                        __FUNCTION__, count, size, stride);
 
-       assert(!rvb->buf);
+       /* Gets triggered when playing with future_hw_tcl_on ...*/
+       //assert(!rvb->buf);
 
        if (stride == 0) {
                r300AllocDmaRegion(rmesa, rvb, size * 4, 4);
index 4ecb2905b1081228450e696326d26c157f48af1e..8f09288a3f4bfd2fc7b55749c1ba53536381367d 100644 (file)
@@ -58,6 +58,8 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "r300_maos.h"
 #include "r300_emit.h"
 
+extern int future_hw_tcl_on;
+
 /**********************************************************************
 *                     Hardware rasterization
 *
@@ -459,6 +461,7 @@ static GLboolean r300_run_immediate_render(GLcontext *ctx,
    return GL_FALSE;
 }
 
+
 /* vertex buffer implementation */
 
 static void inline fire_EB(PREFIX unsigned long addr, int vertex_count, int type)
@@ -737,7 +740,7 @@ const struct tnl_pipeline_stage _r300_render_stage = {
        r300_check_render,      /* check */
        r300_run_render         /* run */
 };
-       
+
 static GLboolean r300_run_tcl_render(GLcontext *ctx,
                                 struct tnl_pipeline_stage *stage)
 {
@@ -745,7 +748,8 @@ static GLboolean r300_run_tcl_render(GLcontext *ctx,
    TNLcontext *tnl = TNL_CONTEXT(ctx);
    struct vertex_buffer *VB = &tnl->vb;
    GLuint i;
-
+       hw_tcl_on=future_hw_tcl_on;
+   
        if (RADEON_DEBUG & DEBUG_PRIMS)
                fprintf(stderr, "%s\n", __FUNCTION__);
        if(hw_tcl_on == GL_FALSE)
index 7d4c4de1dc724a689229b80faa3ce5cfdda8386f..cbcbdcbe6f26a2ef433d055d7bb6f7d9946f78ef 100644 (file)
@@ -180,7 +180,7 @@ void dump_program_params(GLcontext *ctx, struct vertex_program *vp)
        }
 }
 
-static void debug_vp(GLcontext *ctx, struct vertex_program *vp)
+void debug_vp(GLcontext *ctx, struct vertex_program *vp)
 {
        struct vp_instruction *vpi;
        int i, operand_index;
@@ -340,7 +340,7 @@ static unsigned long t_dst_index(struct r300_vertex_program *vp, struct vp_dst_r
                        case VERT_RESULT_BFC1:
                        case VERT_RESULT_FOGC:
                        case VERT_RESULT_PSIZ:
-                       default: WARN_ONCE("Unknown output\n"); return 1;
+                       default: WARN_ONCE("Unknown output\n"); return 10;
                }
        return dst->Index;
 }