Demos (master): tri-2101010: clean up test fix bugs in conv

Dave Airlie airlied at kemper.freedesktop.org
Tue Aug 2 12:30:50 PDT 2011


Module: Demos
Branch: master
Commit: 3618a561fe3250ea7014005b3e3e0cb8095cae4c
URL:    http://cgit.freedesktop.org/mesa/demos/commit/?id=3618a561fe3250ea7014005b3e3e0cb8095cae4c

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Aug  2 20:22:55 2011 +0100

tri-2101010: clean up test fix bugs in conv

---

 src/trivial/tri-2101010.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/trivial/tri-2101010.c b/src/trivial/tri-2101010.c
index ff2db5b..f8e8e09 100644
--- a/src/trivial/tri-2101010.c
+++ b/src/trivial/tri-2101010.c
@@ -31,11 +31,6 @@
 #include <GL/glew.h>
 #include "glut_wrap.h"
 
-
-#define CI_OFFSET_1 16
-#define CI_OFFSET_2 32
-
-
 GLenum doubleBuffer = 1;
 int win;
 
@@ -77,8 +72,8 @@ static void Key(unsigned char key, int x, int y)
    }
 }
 
-#define i32to10(x) ((x) > 0 ? (x & 0x1ff) : 1024-(abs((x))& 0x1ff))
-#define i32to2(x) ((x) > 0 ? (x & 0x1) : 3-abs((x)))
+#define i32to10(x) ((x) >= 0 ? (x & 0x1ff) : 1024-(abs((x))& 0x1ff))
+#define i32to2(x) ((x) >= 0 ? (x & 0x1) : 3-abs((x)))
 
 static uint32_t iconv(int x, int y, int z, int w)
 {
@@ -133,7 +128,6 @@ int main(int argc, char **argv)
 {
    GLenum type;
 
-
    glutInit(&argc, argv);
 
    if (Args(argc, argv) == GL_FALSE) {



More information about the mesa-commit mailing list