summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2005-05-01 23:36:43 +0000
committerAapo Tahkola <aet@rasterburn.org>2005-05-01 23:36:43 +0000
commit138b7ef4d97734aea56d86c3d9add15dfa841dcf (patch)
treef9da32860349d1585004db75e792f35416015d2e /src/mesa/drivers/dri
parent3a934557bf695febc4710875764964f0dd4b18d4 (diff)
Add support to external tnl switcher and disable hw tnl by default.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c4
-rw-r--r--src/mesa/drivers/dri/r300/r300_maos.c3
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c8
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertexprog.c4
4 files changed, 13 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 42c80e7ced..e4aa7ccb22 100644
--- a/src/mesa/drivers/dri/r300/r300_context.c
+++ b/src/mesa/drivers/dri/r300/r300_context.c
@@ -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.
*/
diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c
index b435b0cbbd..5bbd5986d4 100644
--- a/src/mesa/drivers/dri/r300/r300_maos.c
+++ b/src/mesa/drivers/dri/r300/r300_maos.c
@@ -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);
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 4ecb2905b1..8f09288a3f 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -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)
diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c
index 7d4c4de1dc..cbcbdcbe6f 100644
--- a/src/mesa/drivers/dri/r300/r300_vertexprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c
@@ -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;
}