mirror of
https://github.com/brl/mutter.git
synced 2024-11-25 09:30:45 -05:00
gles2: Use GL_ES instead of __VERSION__ for setting precision
Mesa has started getting picky about specifying the precision for floating types in the fragment shader. We already have a default precision specifier in all the fragment shaders but apparently this wasn't working because it is only used when the __VERSION__ define is 100 and Mesa is reporting 110. Regardless of whether Mesa is doing the right thing or not I think it makes sense to use GL_ES instead of __VERSION__ because we will also need the precision specifier if we start requesting GLSL 3.0. The GLES specification explictly states that GL_ES will only be defined for GLES and this is similar to what the internal meta shaders do in Mesa. http://cgit.freedesktop.org/mesa/mesa/commit/?id=cabd45773b58d6aa482 Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 37f5205739cfb0745ea74dedaec117081ba0088b)
This commit is contained in:
parent
7bab449700
commit
cf44ad2493
@ -53,7 +53,7 @@
|
||||
"attribute vec3 cogl_normal_in;\n"
|
||||
|
||||
#define _COGL_FRAGMENT_SHADER_BOILERPLATE \
|
||||
"#if __VERSION__ == 100\n" \
|
||||
"#ifdef GL_ES\n" \
|
||||
"precision highp float;\n" \
|
||||
"#endif\n" \
|
||||
_COGL_COMMON_SHADER_BOILERPLATE \
|
||||
|
Loading…
Reference in New Issue
Block a user