[Mesa-stable] [PATCH] glsl: Enable dFdx, dFdy, and fwidth by default in GLSL ES 3.00.
Kenneth Graunke
kenneth at whitecape.org
Thu Nov 7 23:39:23 CET 2013
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.
Cc: Aras Pranckevičius <aras at unity3d.com>
Cc: mesa-stable at lists.freedesktop.org
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/glsl/builtin_functions.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp
index 3fa0cb5..8cb75e5 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
--
1.8.3.2
More information about the mesa-stable
mailing list