diff options
author | Kenneth Graunke <[email protected]> | 2013-11-07 14:39:23 -0800 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2013-11-07 15:52:02 -0800 |
commit | 1bd623316913fdefa3749809420db27291ef9f0e (patch) | |
tree | ef2acc232a68851ddcf3000e90b5cc390b1cd332 /src/glsl/builtin_functions.cpp | |
parent | c9ac891fa4908ffd4be08dfe64ff9541806f0c3d (diff) |
glsl: Enable dFdx, dFdy, and fwidth by default in GLSL ES 3.00.
Previously, we only exposed them in desktop GL or with:
#extension GL_OES_standard_derivatives : enable
GLSL ES 3.00 includes these without an extension, so we need to expose
them by default.
Note that the above #extension line results in an error or desktop GL,
so we don't need to worry about this.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/glsl/builtin_functions.cpp')
-rw-r--r-- | src/glsl/builtin_functions.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index 3fa0cb5ad4c..8cb75e5ad6e 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/builtin_functions.cpp @@ -293,7 +293,8 @@ static bool fs_oes_derivatives(const _mesa_glsl_parse_state *state) { return state->target == fragment_shader && - (!state->es_shader || state->OES_standard_derivatives_enable); + (state->is_version(110, 300) || + state->OES_standard_derivatives_enable); } static bool |