enable hw vertex programs by default
authorAapo Tahkola <aet@rasterburn.org>
Fri, 27 Jan 2006 14:03:22 +0000 (14:03 +0000)
committerAapo Tahkola <aet@rasterburn.org>
Fri, 27 Jan 2006 14:03:22 +0000 (14:03 +0000)
src/mesa/drivers/dri/r300/r300_context.c
src/mesa/drivers/dri/r300/r300_render.c

index 3e18725f04a1df08400c7c6c06a699fc0ca3ba1d..31b643383a297da582818b6d013046c9ad42df3a 100644 (file)
@@ -68,8 +68,8 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "xmlpool.h"           /* for symbolic values of enum-type options */
 
 /* 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;
+int future_hw_tcl_on=1;
+int hw_tcl_on=1;
 
 #define need_GL_ARB_multisample
 #define need_GL_ARB_texture_compression
index 6a7f126b9e68df46bd787ece7960f5d87bf7fc93..1fa22f7649796403793964eb28a8794980f74d1f 100644 (file)
@@ -847,6 +847,7 @@ static GLboolean r300_run_tcl_render(GLcontext *ctx,
 {
        r300ContextPtr rmesa = R300_CONTEXT(ctx);
        struct r300_vertex_program *vp;
+       int i;
    
        hw_tcl_on=future_hw_tcl_on;
    
@@ -855,6 +856,12 @@ static GLboolean r300_run_tcl_render(GLcontext *ctx,
        if(hw_tcl_on == GL_FALSE)
                return GL_TRUE;
        
+       for (i = 0; i < ctx->Const.MaxTextureUnits; i++)
+               if (ctx->Texture.Unit[i]._ReallyEnabled & TEXTURE_RECT_BIT) {
+                       hw_tcl_on = GL_FALSE;
+                       return GL_TRUE;
+               }
+       
        r300UpdateShaders(rmesa);
 
        vp = (struct r300_vertex_program *)CURRENT_VERTEX_SHADER(ctx);