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

Alex Deucher alexdeucher at gmail.com
Fri Feb 28 10:02:29 PST 2014


From: Eric Anholt <eric at anholt.net>

Ported from Eric's glamor xserver tree.

Signed-off-by: Eric Anholt <eric at anholt.net>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 src/glamor_priv.h | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/glamor_priv.h b/src/glamor_priv.h
index 6803e0f..f7fdb88 100644
--- a/src/glamor_priv.h
+++ b/src/glamor_priv.h
@@ -46,14 +46,17 @@
 #include <GLES2/gl2.h>
 #include <GLES2/gl2ext.h>
 
-#define GLAMOR_DEFAULT_PRECISION   "precision mediump float;\n"
 #include "glamor_glext.h"
 #else
 #include <GL/gl.h>
 #include <GL/glext.h>
-#define GLAMOR_DEFAULT_PRECISION
 #endif
 
+#define GLAMOR_DEFAULT_PRECISION     \
+	"#ifdef GL_ES\n"	     \
+	"precision mediump float;\n" \
+	"#endif\n"
+
 #ifdef RENDER
 #include "glyphstr.h"
 #endif
-- 
1.8.3.1



More information about the Glamor mailing list