summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/r300/r300_render.c
diff options
context:
space:
mode:
authorAapo Tahkola <aet@rasterburn.org>2005-03-17 21:50:01 +0000
committerAapo Tahkola <aet@rasterburn.org>2005-03-17 21:50:01 +0000
commita78bbd0816a894a366bf3824fbbfbc5c794cd61d (patch)
tree81d09667294cf4b600f691c4e5f6a48f08d9bc90 /src/mesa/drivers/dri/r300/r300_render.c
parent80a939cafb7a67837a9fc82e45b5ec85c5912a06 (diff)
Simple TCL stage and ability to disable vps.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_render.c')
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c49
1 files changed, 48 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c
index 19377c2d34..b855c81673 100644
--- a/src/mesa/drivers/dri/r300/r300_render.c
+++ b/src/mesa/drivers/dri/r300/r300_render.c
@@ -672,7 +672,7 @@ static void r300_check_render(GLcontext *ctx, struct tnl_pipeline_stage *stage)
stage->active = GL_FALSE;
return;
}
-
+
/* I'm almost certain I forgot something here */
#if 0 /* These should work now.. */
@@ -731,3 +731,50 @@ 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)
+{
+ r300ContextPtr rmesa = R300_CONTEXT(ctx);
+ TNLcontext *tnl = TNL_CONTEXT(ctx);
+ struct vertex_buffer *VB = &tnl->vb;
+ GLuint i;
+
+ if (RADEON_DEBUG & DEBUG_PRIMS)
+ fprintf(stderr, "%s\n", __FUNCTION__);
+
+ return r300_run_vb_render(ctx, stage);
+}
+
+static void r300_check_tcl_render(GLcontext *ctx, struct tnl_pipeline_stage *stage)
+{
+ r300ContextPtr r300 = R300_CONTEXT(ctx);
+ int i;
+
+ if (RADEON_DEBUG & DEBUG_STATE)
+ fprintf(stderr, "%s\n", __FUNCTION__);
+
+ /* We only support rendering in hardware for now */
+ if (ctx->RenderMode != GL_RENDER) {
+ stage->active = GL_FALSE;
+ return;
+ }
+ if((r300->current_vp != NULL) && ctx->VertexProgram._Enabled) {
+ stage->active = GL_TRUE;
+ stage->inputs = ctx->VertexProgram.Current->InputsRead;
+ } else {
+ stage->active = GL_FALSE;
+ }
+}
+
+const struct tnl_pipeline_stage _r300_tcl_stage = {
+ "r300 tcl",
+ _NEW_ALL, /* re-check (always re-check for now) */
+ 0, /* re-run (always runs) */
+ GL_TRUE, /* active */
+ 0, 0, /* inputs (set in check_render), outputs */
+ 0, 0, /* changed_inputs, private */
+ dtr, /* destructor */
+ r300_check_tcl_render, /* check */
+ r300_run_tcl_render /* run */
+};