Mesa (master): r300g: Use MAX3 and MIN3.

Corbin Simpson csimpson at kemper.freedesktop.org
Fri Nov 20 22:45:08 UTC 2009


Module: Mesa
Branch: master
Commit: 6a3eb1f91b4ccd4ee7ac6b91505e0dfa476922d4
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6a3eb1f91b4ccd4ee7ac6b91505e0dfa476922d4

Author: Corbin Simpson <MostAwesomeDude at gmail.com>
Date:   Fri Nov 20 14:10:45 2009 -0800

r300g: Use MAX3 and MIN3.

---

 src/gallium/drivers/r300/r300_emit.c          |    3 ---
 src/gallium/drivers/r300/r300_state_derived.c |    2 +-
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/r300/r300_emit.c b/src/gallium/drivers/r300/r300_emit.c
index 2a8d322..4cd5074 100644
--- a/src/gallium/drivers/r300/r300_emit.c
+++ b/src/gallium/drivers/r300/r300_emit.c
@@ -701,9 +701,6 @@ static unsigned bitcount(unsigned n)
     return bits;
 }
 
-/* XXX ... and this one too. */
-#define MIN3(x, y, z) MIN2(MIN2(x, y), z)
-
 void r300_emit_vertex_program_code(struct r300_context* r300,
                                    struct r300_vertex_program_code* code)
 {
diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c
index 7166694..b4d0eea 100644
--- a/src/gallium/drivers/r300/r300_state_derived.c
+++ b/src/gallium/drivers/r300/r300_state_derived.c
@@ -458,7 +458,7 @@ static void r300_update_rs_block(struct r300_context* r300,
     rs->count = (rs_tex_comp) | (col_count << R300_IC_COUNT_SHIFT) |
         R300_HIRES_EN;
 
-    rs->inst_count = MAX2(MAX2(col_count - 1, tex_count - 1), 0);
+    rs->inst_count = MAX3(col_count - 1, tex_count - 1, 0);
 }
 
 /* Update the vertex format. */




More information about the mesa-commit mailing list