From 4dc3249f0d800f9e36ee11ec5c00351e67dbeee3 Mon Sep 17 00:00:00 2001 From: Aapo Tahkola Date: Wed, 26 Oct 2005 16:42:06 +0000 Subject: Sync with my local tree. Changes to current operation: -Elts are no longer converted to 16-bit format -Cube maps --- src/mesa/drivers/dri/r300/r300_state.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'src/mesa/drivers/dri/r300/r300_state.c') diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index c0b4dcc8cab..e0f357d8c45 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1553,6 +1553,36 @@ void r300SetupVertexProgram(r300ContextPtr rmesa) #endif } +extern int future_hw_tcl_on; +void r300UpdateShaderStates(r300ContextPtr rmesa) +{ + GLcontext *ctx; + struct r300_vertex_program *vp; + + ctx = rmesa->radeon.glCtx; + + if(ctx->VertexProgram._Enabled == GL_FALSE){ + _tnl_UpdateFixedFunctionProgram(ctx); + } + vp = (struct r300_vertex_program *)CURRENT_VERTEX_SHADER(ctx); + if(vp->translated == GL_FALSE) + translate_vertex_shader(vp); + if(vp->translated == GL_FALSE){ + fprintf(stderr, "Failing back to sw-tcl\n"); + debug_vp(ctx, &vp->mesa_program); + hw_tcl_on=future_hw_tcl_on=0; + r300ResetHwState(rmesa); + + return ; + } + + r300_setup_textures(ctx); + r300_setup_rs_unit(ctx); + + r300SetupVertexShader(rmesa); + r300SetupPixelShader(rmesa); +} + /* This is probably wrong for some values, I need to test this * some more. Range checking would be a good idea also.. * -- cgit v1.2.3