diff options
author | Eric Anholt <eric@anholt.net> | 2007-07-05 11:36:44 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-07-05 11:36:44 -0700 |
commit | 3cf20ddbfc9d3a1dad4c058050595c54589257d3 (patch) | |
tree | 57de53410bb0fb40979eed20d3c80d4c0ed68664 /src/mesa/swrast/s_aalinetemp.h | |
parent | 2ac17c68e2d64260168a54a275e839775828f534 (diff) | |
parent | 4fe48b4e8568896cdbc822323aeec0a41c72ff2a (diff) |
Merge branch 'i915-unification' of git+ssh://people.freedesktop.org/~anholt/mesa into i915-unification
Diffstat (limited to 'src/mesa/swrast/s_aalinetemp.h')
-rw-r--r-- | src/mesa/swrast/s_aalinetemp.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_aalinetemp.h b/src/mesa/swrast/s_aalinetemp.h index 8756f122d0..3d3511823d 100644 --- a/src/mesa/swrast/s_aalinetemp.h +++ b/src/mesa/swrast/s_aalinetemp.h @@ -1,6 +1,6 @@ /* * Mesa 3-D graphics library - * Version: 6.5.3 + * Version: 7.1 * * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. * @@ -185,10 +185,18 @@ NAME(line)(GLcontext *ctx, const SWvertex *v0, const SWvertex *v1) compute_plane(line.x0, line.y0, line.x1, line.y1, invW0, invW1, line.wPlane); ATTRIB_LOOP_BEGIN GLuint c; - for (c = 0; c < 4; c++) { - const GLfloat a0 = v0->attrib[attr][c] * invW0; - const GLfloat a1 = v1->attrib[attr][c] * invW1; - compute_plane(line.x0, line.y0, line.x1, line.y1, a0, a1, line.attrPlane[attr][c]); + if (swrast->_InterpMode[attr] == GL_FLAT) { + for (c = 0; c < 4; c++) { + constant_plane(v1->attrib[attr][c], line.attrPlane[attr][c]); + } + } + else { + for (c = 0; c < 4; c++) { + const GLfloat a0 = v0->attrib[attr][c] * invW0; + const GLfloat a1 = v1->attrib[attr][c] * invW1; + compute_plane(line.x0, line.y0, line.x1, line.y1, a0, a1, + line.attrPlane[attr][c]); + } } line.span.arrayAttribs |= (1 << attr); if (attr >= FRAG_ATTRIB_TEX0 && attr < FRAG_ATTRIB_VAR0) { |