OSDN Git Service

r300: fix performance regression
authorMaciej Cencora <m.cencora@gmail.com>
Fri, 24 Apr 2009 14:28:47 +0000 (16:28 +0200)
committerDave Airlie <airlied@linux.ie>
Mon, 27 Apr 2009 09:08:41 +0000 (19:08 +1000)
This performance regression on non TCL hw was introduced by ed4c6cbe017b4e8bacb7e012d4baaf77a20a2c33.
This patch depends on "r300: always route 4 texcoord components to RS" and "r300: add point attenuation stage for TCL fallbacks".

src/mesa/drivers/dri/r300/r300_context.c

index 5119890..c80dcd8 100644 (file)
@@ -364,7 +364,10 @@ GLboolean r300CreateContext(const __GLcontextModes * glVisual,
 
        ctx = r300->radeon.glCtx;
        r300InitConstValues(ctx, screen);
-       ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
+
+       if (hw_tcl_on)
+               ctx->VertexProgram._MaintainTnlProgram = GL_TRUE;
+
        ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
 
        /* Initialize the software rasterizer and helper modules.