Mesa (mesa_7_6_branch): progs/glsl: Fix trirast GLSL compilation errors on Mac OS.

Vinson Lee vlee at kemper.freedesktop.org
Wed Dec 2 20:21:11 PST 2009


Module: Mesa
Branch: mesa_7_6_branch
Commit: 0a107d36c2f290cd42e29008dec5194df55b7690
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0a107d36c2f290cd42e29008dec5194df55b7690

Author: Vinson Lee <vlee at vmware.com>
Date:   Wed Nov 18 14:02:20 2009 -0800

progs/glsl: Fix trirast GLSL compilation errors on Mac OS.
(cherry picked from commit 4b3ec2acf2cc2830b0907e4fb4db8bd1ff4a18e3)

---

 progs/glsl/trirast.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/progs/glsl/trirast.c b/progs/glsl/trirast.c
index 53bd91e..8573426 100644
--- a/progs/glsl/trirast.c
+++ b/progs/glsl/trirast.c
@@ -179,9 +179,9 @@ Init(void)
       "\n"
       "void main() {\n"
       "   vec2 p = gl_FragCoord.xy; \n"
-      "   if (crs(v1 - v0, p - v0) >= 0 && \n"
-      "       crs(v2 - v1, p - v1) >= 0 && \n"
-      "       crs(v0 - v2, p - v2) >= 0) \n"
+      "   if (crs(v1 - v0, p - v0) >= 0.0 && \n"
+      "       crs(v2 - v1, p - v1) >= 0.0 && \n"
+      "       crs(v0 - v2, p - v2) >= 0.0) \n"
       "      gl_FragColor = vec4(1.0); \n"
       "   else \n"
       "      gl_FragColor = vec4(0.5); \n"



More information about the mesa-commit mailing list