diff options
author | Aapo Tahkola <[email protected]> | 2005-10-26 16:42:06 +0000 |
---|---|---|
committer | Aapo Tahkola <[email protected]> | 2005-10-26 16:42:06 +0000 |
commit | 4dc3249f0d800f9e36ee11ec5c00351e67dbeee3 (patch) | |
tree | 35c249c6e240c15d55d98fca862d9fcbf371d2f5 /src/mesa/drivers/dri/r300/r300_state.c | |
parent | 23f076ca67912c1a8ddd7a43f8a3e34c4bc5128a (diff) |
Sync with my local tree.
Changes to current operation:
-Elts are no longer converted to 16-bit format
-Cube maps
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_state.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 30 |
1 files changed, 30 insertions, 0 deletions
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.. * |