summaryrefslogtreecommitdiff
path: root/src/mesa/tnl_dd/t_dd_unfilled.h
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2010-03-15 15:24:38 -0400
committerZack Rusin <zackr@vmware.com>2010-03-15 15:24:38 -0400
commit275c4bd3643d773210780cb8d578ca84f2604684 (patch)
tree8266edc39d4253ac0f2a0ecd41f560f3d815bb5c /src/mesa/tnl_dd/t_dd_unfilled.h
parentc5c5cd7132e18f4aad8e73d8ee879f8823c4c1e7 (diff)
parentd0b35352ed27b1e66785c45ee95a352ed06b47ce (diff)
Merge remote branch 'origin/master' into gallium_draw_llvm
Diffstat (limited to 'src/mesa/tnl_dd/t_dd_unfilled.h')
-rw-r--r--src/mesa/tnl_dd/t_dd_unfilled.h117
1 files changed, 38 insertions, 79 deletions
diff --git a/src/mesa/tnl_dd/t_dd_unfilled.h b/src/mesa/tnl_dd/t_dd_unfilled.h
index e4d82aa080..9c467291a1 100644
--- a/src/mesa/tnl_dd/t_dd_unfilled.h
+++ b/src/mesa/tnl_dd/t_dd_unfilled.h
@@ -25,13 +25,6 @@
* Keith Whitwell <keith@tungstengraphics.com>
*/
-#if HAVE_RGBA
-#define VERT_SET_IND( v, c )
-#define VERT_COPY_IND( v0, v1 )
-#define VERT_SAVE_IND( idx )
-#define VERT_RESTORE_IND( idx )
-#endif
-
#if !HAVE_SPEC
#define VERT_SET_SPEC( v, c )
#define VERT_COPY_SPEC( v0, v1 )
@@ -53,23 +46,16 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
v[2] = (VERTEX *)GET_VERTEX(e2);
if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
- if (HAVE_RGBA) {
- VERT_SAVE_RGBA(0);
- VERT_SAVE_RGBA(1);
- VERT_COPY_RGBA(v[0], v[2]);
- VERT_COPY_RGBA(v[1], v[2]);
-
- if (HAVE_SPEC) {
- VERT_SAVE_SPEC(0);
- VERT_SAVE_SPEC(1);
- VERT_COPY_SPEC(v[0], v[2]);
- VERT_COPY_SPEC(v[1], v[2]);
- }
- } else {
- VERT_SAVE_IND(0);
- VERT_SAVE_IND(1);
- VERT_COPY_IND(v[0], v[2]);
- VERT_COPY_IND(v[1], v[2]);
+ VERT_SAVE_RGBA(0);
+ VERT_SAVE_RGBA(1);
+ VERT_COPY_RGBA(v[0], v[2]);
+ VERT_COPY_RGBA(v[1], v[2]);
+
+ if (HAVE_SPEC) {
+ VERT_SAVE_SPEC(0);
+ VERT_SAVE_SPEC(1);
+ VERT_COPY_SPEC(v[0], v[2]);
+ VERT_COPY_SPEC(v[1], v[2]);
}
}
@@ -98,17 +84,12 @@ static void TAG(unfilled_tri)( GLcontext *ctx,
}
if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
- if (HAVE_RGBA) {
- VERT_RESTORE_RGBA(0);
- VERT_RESTORE_RGBA(1);
-
- if (HAVE_SPEC) {
- VERT_RESTORE_SPEC(0);
- VERT_RESTORE_SPEC(1);
- }
- } else {
- VERT_RESTORE_IND(0);
- VERT_RESTORE_IND(1);
+ VERT_RESTORE_RGBA(0);
+ VERT_RESTORE_RGBA(1);
+
+ if (HAVE_SPEC) {
+ VERT_RESTORE_SPEC(0);
+ VERT_RESTORE_SPEC(1);
}
}
}
@@ -133,29 +114,20 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
* support flatshading, this will already have been done:
*/
if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
- if (HAVE_RGBA) {
- VERT_SAVE_RGBA(0);
- VERT_SAVE_RGBA(1);
- VERT_SAVE_RGBA(2);
- VERT_COPY_RGBA(v[0], v[3]);
- VERT_COPY_RGBA(v[1], v[3]);
- VERT_COPY_RGBA(v[2], v[3]);
-
- if (HAVE_SPEC) {
- VERT_SAVE_SPEC(0);
- VERT_SAVE_SPEC(1);
- VERT_SAVE_SPEC(2);
- VERT_COPY_SPEC(v[0], v[3]);
- VERT_COPY_SPEC(v[1], v[3]);
- VERT_COPY_SPEC(v[2], v[3]);
- }
- } else {
- VERT_SAVE_IND(0);
- VERT_SAVE_IND(1);
- VERT_SAVE_IND(2);
- VERT_COPY_IND(v[0], v[3]);
- VERT_COPY_IND(v[1], v[3]);
- VERT_COPY_IND(v[2], v[3]);
+ VERT_SAVE_RGBA(0);
+ VERT_SAVE_RGBA(1);
+ VERT_SAVE_RGBA(2);
+ VERT_COPY_RGBA(v[0], v[3]);
+ VERT_COPY_RGBA(v[1], v[3]);
+ VERT_COPY_RGBA(v[2], v[3]);
+
+ if (HAVE_SPEC) {
+ VERT_SAVE_SPEC(0);
+ VERT_SAVE_SPEC(1);
+ VERT_SAVE_SPEC(2);
+ VERT_COPY_SPEC(v[0], v[3]);
+ VERT_COPY_SPEC(v[1], v[3]);
+ VERT_COPY_SPEC(v[2], v[3]);
}
}
@@ -175,32 +147,19 @@ static void TAG(unfilled_quad)( GLcontext *ctx,
}
if (ctx->Light.ShadeModel == GL_FLAT && HAVE_HW_FLATSHADE) {
- if (HAVE_RGBA) {
- VERT_RESTORE_RGBA(0);
- VERT_RESTORE_RGBA(1);
- VERT_RESTORE_RGBA(2);
-
- if (HAVE_SPEC) {
- VERT_RESTORE_SPEC(0);
- VERT_RESTORE_SPEC(1);
- VERT_RESTORE_SPEC(2);
- }
- } else {
- VERT_RESTORE_IND(0);
- VERT_RESTORE_IND(1);
- VERT_RESTORE_IND(2);
+ VERT_RESTORE_RGBA(0);
+ VERT_RESTORE_RGBA(1);
+ VERT_RESTORE_RGBA(2);
+
+ if (HAVE_SPEC) {
+ VERT_RESTORE_SPEC(0);
+ VERT_RESTORE_SPEC(1);
+ VERT_RESTORE_SPEC(2);
}
}
}
-#if HAVE_RGBA
-#undef VERT_SET_IND
-#undef VERT_COPY_IND
-#undef VERT_SAVE_IND
-#undef VERT_RESTORE_IND
-#endif
-
#if !HAVE_SPEC
#undef VERT_SET_SPEC
#undef VERT_COPY_SPEC