summaryrefslogtreecommitdiff
path: root/src/mesa/swrast/s_triangle.c
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-02-24 15:17:30 -0800
committerIan Romanick <ian.d.romanick@intel.com>2010-03-03 12:37:03 -0800
commit0ed9c4bc7affb7a6b9be5ff129815fccf8c3885d (patch)
treea24d6436b378fd9f013131ebda51d41d525e2b15 /src/mesa/swrast/s_triangle.c
parentd05badba291ce4444b6aaabfd577bdbcf7929193 (diff)
swrast: Remove support for rendering triangles into a color-index buffer
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/swrast/s_triangle.c')
-rw-r--r--src/mesa/swrast/s_triangle.c29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/mesa/swrast/s_triangle.c b/src/mesa/swrast/s_triangle.c
index 11184b72ce..812dddf15c 100644
--- a/src/mesa/swrast/s_triangle.c
+++ b/src/mesa/swrast/s_triangle.c
@@ -70,18 +70,6 @@ _swrast_culltriangle( GLcontext *ctx,
/*
- * Render a smooth or flat-shaded color index triangle.
- */
-#define NAME ci_triangle
-#define INTERP_Z 1
-#define INTERP_ATTRIBS 1 /* just for fog */
-#define INTERP_INDEX 1
-#define RENDER_SPAN( span ) _swrast_write_index_span(ctx, &span);
-#include "s_tritemp.h"
-
-
-
-/*
* Render a flat-shaded RGBA triangle.
*/
#define NAME flat_rgba_triangle
@@ -1007,7 +995,6 @@ void
_swrast_choose_triangle( GLcontext *ctx )
{
SWcontext *swrast = SWRAST_CONTEXT(ctx);
- const GLboolean rgbmode = ctx->Visual.rgbMode;
if (ctx->Polygon.CullFlag &&
ctx->Polygon.CullFaceMode == GL_FRONT_AND_BACK) {
@@ -1029,23 +1016,15 @@ _swrast_choose_triangle( GLcontext *ctx )
ctx->Depth.Mask == GL_FALSE &&
ctx->Depth.Func == GL_LESS &&
!ctx->Stencil._Enabled) {
- if ((rgbmode &&
- ctx->Color.ColorMask[0][0] == 0 &&
- ctx->Color.ColorMask[0][1] == 0 &&
- ctx->Color.ColorMask[0][2] == 0 &&
- ctx->Color.ColorMask[0][3] == 0)
- ||
- (!rgbmode && ctx->Color.IndexMask == 0)) {
+ if (ctx->Color.ColorMask[0][0] == 0 &&
+ ctx->Color.ColorMask[0][1] == 0 &&
+ ctx->Color.ColorMask[0][2] == 0 &&
+ ctx->Color.ColorMask[0][3] == 0) {
USE(occlusion_zless_triangle);
return;
}
}
- if (!rgbmode) {
- USE(ci_triangle);
- return;
- }
-
/*
* XXX should examine swrast->_ActiveAttribMask to determine what
* needs to be interpolated.