summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_aatriangle.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-02-05 10:10:01 -0700
committerBrian <[email protected]>2007-02-05 10:10:01 -0700
commitdd34fe8679fa200e55cfaf8e80bbecdecea084e3 (patch)
tree329b7c0280a198b8dabd02a5afb97dcaa5f3f4bd /src/mesa/swrast/s_aatriangle.c
parent93b975a1d9fcc4a10987676f7368809522f27d71 (diff)
Merge SWvertex texcoord and varying fields into attrib[] array field.
Fragment texcoords and varying code is now unified in the point/line/triangle rasterization code. In the future, merge color, fog, etc. attribs.
Diffstat (limited to 'src/mesa/swrast/s_aatriangle.c')
-rw-r--r--src/mesa/swrast/s_aatriangle.c52
1 files changed, 8 insertions, 44 deletions
diff --git a/src/mesa/swrast/s_aatriangle.c b/src/mesa/swrast/s_aatriangle.c
index 63a13cf3fba..5e3059af93b 100644
--- a/src/mesa/swrast/s_aatriangle.c
+++ b/src/mesa/swrast/s_aatriangle.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.3
+ * Version: 6.5.3
*
- * Copyright (C) 1999-2004 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -408,7 +408,7 @@ tex_aa_tri(GLcontext *ctx,
#define DO_Z
#define DO_FOG
#define DO_RGBA
-#define DO_TEX
+#define DO_TEXVAR
#include "s_aatritemp.h"
}
@@ -422,39 +422,12 @@ spec_tex_aa_tri(GLcontext *ctx,
#define DO_Z
#define DO_FOG
#define DO_RGBA
-#define DO_TEX
+#define DO_TEXVAR
#define DO_SPEC
#include "s_aatritemp.h"
}
-static void
-multitex_aa_tri(GLcontext *ctx,
- const SWvertex *v0,
- const SWvertex *v1,
- const SWvertex *v2)
-{
-#define DO_Z
-#define DO_FOG
-#define DO_RGBA
-#define DO_MULTITEX
-#include "s_aatritemp.h"
-}
-
-static void
-spec_multitex_aa_tri(GLcontext *ctx,
- const SWvertex *v0,
- const SWvertex *v1,
- const SWvertex *v2)
-{
-#define DO_Z
-#define DO_FOG
-#define DO_RGBA
-#define DO_MULTITEX
-#define DO_SPEC
-#include "s_aatritemp.h"
-}
-
/*
* Examine GL state and set swrast->Triangle to an
@@ -465,22 +438,13 @@ _swrast_set_aa_triangle_function(GLcontext *ctx)
{
ASSERT(ctx->Polygon.SmoothFlag);
- if (ctx->Texture._EnabledCoordUnits != 0) {
+ if (ctx->Texture._EnabledCoordUnits != 0
+ || ctx->FragmentProgram._Current) {
if (NEED_SECONDARY_COLOR(ctx)) {
- if (ctx->Texture._EnabledCoordUnits > 1) {
- SWRAST_CONTEXT(ctx)->Triangle = spec_multitex_aa_tri;
- }
- else {
- SWRAST_CONTEXT(ctx)->Triangle = spec_tex_aa_tri;
- }
+ SWRAST_CONTEXT(ctx)->Triangle = spec_tex_aa_tri;
}
else {
- if (ctx->Texture._EnabledCoordUnits > 1) {
- SWRAST_CONTEXT(ctx)->Triangle = multitex_aa_tri;
- }
- else {
- SWRAST_CONTEXT(ctx)->Triangle = tex_aa_tri;
- }
+ SWRAST_CONTEXT(ctx)->Triangle = tex_aa_tri;
}
}
else if (ctx->Visual.rgbMode) {