summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_triangle.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2006-12-13 15:05:23 -0700
committerBrian <[email protected]>2006-12-13 15:05:23 -0700
commit12ef1fbefcee964b715783d3ade6b69b2c699ed8 (patch)
tree4daf73a2c8aec72103b064c48b98c34a249771a6 /src/mesa/swrast/s_triangle.c
parenta328e469d328f8b6fd5afdfc21d576fa1a2c43fc (diff)
Checkpoint for GLSL compiler changes.
In brief: Check for enabled fragment program by looking at ctx->FragmentProgram._Current. New code for varying variables.
Diffstat (limited to 'src/mesa/swrast/s_triangle.c')
-rw-r--r--src/mesa/swrast/s_triangle.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index b17c4354605..9b775928cda 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -883,8 +883,8 @@ fast_persp_span(GLcontext *ctx, SWspan *span,
/*
* This is the big one!
- * Interpolate Z, RGB, Alpha, specular, fog, N sets of texture coordinates, and varying floats.
- * Yup, it's slow.
+ * Interpolate Z, RGB, Alpha, specular, fog, N sets of texture coordinates,
+ * and varying floats. Yup, it's slow.
*/
#define NAME multitextured_triangle
#define INTERP_Z 1
@@ -1073,8 +1073,9 @@ _swrast_choose_triangle( GLcontext *ctx )
}
}
- if (ctx->Texture._EnabledCoordUnits || ctx->FragmentProgram._Enabled ||
- ctx->ATIFragmentShader._Enabled || ctx->ShaderObjects._FragmentShaderPresent) {
+ if (ctx->Texture._EnabledCoordUnits ||
+ ctx->FragmentProgram._Current ||
+ ctx->ATIFragmentShader._Enabled) {
/* Ugh, we do a _lot_ of tests to pick the best textured tri func */
const struct gl_texture_object *texObj2D;
const struct gl_texture_image *texImg;
@@ -1089,9 +1090,8 @@ _swrast_choose_triangle( GLcontext *ctx )
/* First see if we can use an optimized 2-D texture function */
if (ctx->Texture._EnabledCoordUnits == 0x1
- && !ctx->FragmentProgram._Enabled
+ && !ctx->FragmentProgram._Current
&& !ctx->ATIFragmentShader._Enabled
- && !ctx->ShaderObjects._FragmentShaderPresent
&& ctx->Texture.Unit[0]._ReallyEnabled == TEXTURE_2D_BIT
&& texObj2D->WrapS == GL_REPEAT
&& texObj2D->WrapT == GL_REPEAT
@@ -1137,7 +1137,8 @@ _swrast_choose_triangle( GLcontext *ctx )
}
else {
/* general case textured triangles */
- if (ctx->Texture._EnabledCoordUnits > 1) {
+ if (ctx->Texture._EnabledCoordUnits > 1 ||
+ ctx->FragmentProgram._Current) {
USE(multitextured_triangle);
}
else {