[PATCH 10/15] glamor: Move shader precision stuff from build time to shader compile time.

Eric Anholt eric at anholt.net
Mon Feb 3 20:03:35 CET 2014


This is the last desktop-versus-ES2 build ifdef in core glamor.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 glamor/glamor_priv.h | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 81b46b6..e28a021 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -37,11 +37,10 @@
 
 #include <epoxy/gl.h>
 
-#ifdef GLAMOR_GLES2
-#define GLAMOR_DEFAULT_PRECISION   "precision mediump float;\n"
-#else
-#define GLAMOR_DEFAULT_PRECISION
-#endif
+#define GLAMOR_DEFAULT_PRECISION  \
+    "#ifdef GL_ES\n"              \
+    "precision mediump float;\n"  \
+    "#endif\n"
 
 #ifdef RENDER
 #include "glyphstr.h"
-- 
1.9.rc1



More information about the xorg-devel mailing list