summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2014-02-28 13:02:29 -0500
committerZhigang Gong <zhigang.gong@gmail.com>2014-03-13 21:52:34 +0800
commitf78901e86322ad05353daa9d8d065e1b86eb4276 (patch)
treeec11305c45b3bddaccd1dde317cbbe6726dd5bcf
parentbc04fd75b37b7e553289e97692ba279480874294 (diff)
glamor: Move shader precision stuff from build time to shader compile time.
Ported from Eric's glamor xserver tree. Signed-off-by: Eric Anholt <eric@anholt.net> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/glamor_priv.h7
1 files 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