diff options
author | Aapo Tahkola <aet@rasterburn.org> | 2006-06-06 22:24:12 +0000 |
---|---|---|
committer | Aapo Tahkola <aet@rasterburn.org> | 2006-06-06 22:24:12 +0000 |
commit | 9248882ca27b289180a76262aa3d9b26c0cb0e8b (patch) | |
tree | 4be41552706b53802d8a034e70c132d98cd7a827 /src/mesa/drivers | |
parent | 9ba2006594a54173956b2af69055f633fa813bf8 (diff) |
prevent run_arb_vertex_program from running tnl programs unless ctx->_MaintainTnlProgram is set
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.c | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c index cadb27ba8b..ab582525ab 100644 --- a/src/mesa/drivers/dri/r300/r300_context.c +++ b/src/mesa/drivers/dri/r300/r300_context.c @@ -48,6 +48,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "tnl/tnl.h" #include "tnl/t_pipeline.h" +#include "tnl/t_vp_build.h" #include "drivers/common/driverfuncs.h" @@ -274,9 +275,6 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual, ctx->Const.MaxLineWidth = R300_LINESIZE_MAX; ctx->Const.MaxLineWidthAA = R300_LINESIZE_MAX; - if (hw_tcl_on) - ctx->_MaintainTnlProgram = GL_TRUE; - #ifdef USER_BUFFERS /* Needs further modifications */ #if 0 @@ -325,6 +323,7 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual, ctx->Const.FragmentProgram.MaxNativeInstructions = PFS_MAX_ALU_INST+PFS_MAX_TEX_INST; ctx->Const.FragmentProgram.MaxNativeTexIndirections = PFS_MAX_TEX_INDIRECT; ctx->Const.FragmentProgram.MaxNativeAddressRegs = 0; /* and these are?? */ + _tnl_ProgramCacheInit(ctx); ctx->_MaintainTexEnvProgram = GL_TRUE; driInitExtensions(ctx, card_extensions, GL_TRUE); @@ -454,6 +453,7 @@ void r300DestroyContext(__DRIcontextPrivate * driContextPriv) release_texture_heaps = (r300->radeon.glCtx->Shared->RefCount == 1); _swsetup_DestroyContext(r300->radeon.glCtx); + _tnl_ProgramCacheDestroy(r300->radeon.glCtx); _tnl_DestroyContext(r300->radeon.glCtx); _ac_DestroyContext(r300->radeon.glCtx); _swrast_DestroyContext(r300->radeon.glCtx); diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 70d42c2ea3..1e06992394 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -1678,10 +1678,6 @@ void r300UpdateShaders(r300ContextPtr rmesa) ctx = rmesa->radeon.glCtx; - /* Disable tnl programs when doing software vertex programs. - I can only hope this actually disables it at the right time. */ - ctx->_MaintainTnlProgram = hw_tcl_on; - if (rmesa->NewGLState && hw_tcl_on) { rmesa->NewGLState = 0; |