'dFdx' : no matching overloaded function found

2,278 views
Skip to first unread message

Marcin

unread,
Dec 25, 2010, 6:39:48 PM12/25/10
to angleproject
Beside many bug reports on OES_standard_derivatives being fixed and
enabled in Chromium. I can't get it to work and I keep getting
"'dFdx' : no matching overloaded function found" error. I tried to
enable this extension using

#extension GL_OES_standard_derivatives : enable

but without any luck.

Test project http://marcinignac.com/projects/cindermedusae/webgl/index.html

I'm using dFdx funtion on a float variable in line 144

varying float V;
void main() {
float dp = length(vec2(dFdx(V), dFdy(V)));
....
}

I'm using:
Chromium 10.0.623.0 (70173)
Mac OSX 10.6.5
NVIDIA GeForce 9600M GT

Kenneth Russell

unread,
Dec 27, 2010, 11:32:49 PM12/27/10
to marcin...@gmail.com, angleproject
OES_standard_derivatives hasn't been exposed via WebGL yet. WebGL
extensions need to be explicitly enabled, which is why these builtins
are still being rejected. Once the extension has been exposed via
WebGL, and if your application enables it, ANGLE's shader validator
will be capable of handling it.

-Ken

Marcin Ignac

unread,
Dec 28, 2010, 3:57:32 AM12/28/10
to Kenneth Russell, angleproject
Hi Ken,

What do you mean by "expose" and in whose jurisdiction is to do it?

Looks like it's enabled in Chromium already

http://www.google.com/codesearch/p?hl=en#OAMlx_jo-ck/src/third_party/angle/src/libGLESv2/Shader.cpp&q=angle%20OES_standard_derivatives&gs=cpp:::OES_standard_derivatives@chrome/trunk/src/third_party/angle/include/GLSLANG/ShaderLang.h%257Cdef&gsn=OES_standard_derivatives&d=4&l=49

and all the functions are being defined

http://www.google.com/codesearch/p?hl=en#yFOqulIej54/trunk/src/compiler/Initialize.cpp&q=dFdx%20package:http://angleproject%5C.googlecode%5C.com&sa=N&cd=1&ct=rc&l=393

>and if your application enables it,

Like this - in shader? Or do I have to do something special i my app?

#extension GL_OES_standard_derivatives : enable

Marcin

Kenneth Russell

unread,
Dec 28, 2010, 10:09:30 AM12/28/10
to Marcin Ignac, angleproject
On Tue, Dec 28, 2010 at 3:57 AM, Marcin Ignac <marcin...@gmail.com> wrote:
> Hi Ken,
>
> What do you mean by "expose" and in whose jurisdiction is to do it?

WebGL extensions are handled differently than OpenGL or OpenGL ES
extensions. First the extension needs to be specified in the WebGL
extension registry at
http://www.khronos.org/registry/webgl/doc/spec/extensions/ . (The
WebGL working group has already agreed upon several extensions to be
incorporated verbatim from OpenGL / OpenGL ES, and this is one of
them; if you check out the source code for the extension registry
you'll see the extension names that have already been decided to
incorporate.) Second, the WebGL implementation needs to support the
extension. Third, the developer needs to call e.g.
WebGLRenderingContext.getExtension("OES_standard_derivatives") and get
a non-null return value in order to use the extension.

It's a feature that can be enabled in ANGLE's shader validator. In
WebKit's WebGL implementation (for both Safari and Chromium), support
for this feature is disabled.

>>and if your application enables it,
>
> Like this - in shader? Or do I have to do something special i my app?
>
> #extension GL_OES_standard_derivatives : enable

See above. You would need to call
getExtension("OES_standard_derivatives") -- but WebKit's WebGL
implementation doesn't support this extension yet. Please feel free to
file a bug on bugs.webkit.org (email me the bug ID if or when you do).
This extension is already on our radar, but having user input
indicating that it is important would be helpful.

-Ken

> Marcin
>

Marcin Ignac

unread,
Dec 28, 2010, 11:21:40 AM12/28/10
to Kenneth Russell, angleproject
Ken, thanks for detailed explanation.

Here is the bug report:
https://bugs.webkit.org/show_bug.cgi?id=51678

m.

--
Marcin Ignac
http://marcinignac.com

Reply all
Reply to author
Forward
0 new messages