Any clues on this shader compilation error? - D3D shader compilation failed with default flags

796 views
Skip to first unread message

Lindsay Kay

unread,
May 28, 2013, 9:36:28 AM5/28/13
to webgl-d...@googlegroups.com
Hi,

can anyone give me a clue as to what this error is about and how to pursue it?

See the attached screen grab - this is a SceneJS shader compilation failure in Chrome on some windows machines (sorry, I need to chase up the exact versions of things), and to me it looks like something to do with WebGL trying to optimise code paths.

Interesting that it's indicating a GLSL syntax error, as if optimisation here involves rewriting the GLSL.

error X3000: syntax error: unexpected token: '{'
Warning D3D shader compilation failed with default flags. retrying with flow control.
...

Thanks in advance!
WebGL-Capture.PNG

Lindsay Kay

unread,
May 28, 2013, 11:57:22 AM5/28/13
to webgl-d...@googlegroups.com
Offending platform is: 
Windows 7, Chrome: Version 27.0.1453.94 m, FF: 21.0, GPU: Intel(R) HD Graphics 3000, Video BIOS: 2104.0

Kenneth Russell

unread,
May 28, 2013, 12:02:12 PM5/28/13
to webgl-d...@googlegroups.com
Chrome and Firefox use ANGLE ( https://code.google.com/p/angleproject/
) to translate WebGL's OpenGL ES calls to Direct3D, so there is
definitely a shader translation phase involved (from GLSL ES to HLSL).

Could you please file a bug at http://crbug.com/ with a self-contained
test case, and post the bug ID here?

Thanks,

-Ken
> --
> You received this message because you are subscribed to the Google Groups
> "WebGL Dev List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to webgl-dev-lis...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Jan Scheurer

unread,
May 28, 2013, 12:02:59 PM5/28/13
to webgl-d...@googlegroups.com
Hey,
you can try debugging the HLSL source coming out from ANGLE.
See this blog post for more information about that.

Be sure to use the correct chrome flag, it seems to have changed or mistyped by the blog post author:
--enable-privileged-webgl-extensions



2013/5/28 Lindsay Kay <lindsays...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
dvlpn 3d stuff since ever

Lindsay Kay

unread,
Jun 6, 2013, 5:35:07 PM6/6/13
to webgl-d...@googlegroups.com, lj1...@googlemail.com
Fixed now, thanks for the tips! 

Using Chrome's --use-gl=desktop flag, I was able to isolate the problem to ANGLE generated HLSL.

Then I narrowed it down to a conditional variable declaration that was defined outside the main function:

vec3  ambient= SCENEJS_uAmbient ? SCENEJS_uAmbientColor : vec3(0.0, 0.0, 0.0);
void main(void) {
//...
}

Moving that declaration inside the main fixed it. Just looks like ANGLE needs to catch and report more specifically, I'll raise a ticket.

Sweet, go ahead and check out the demos now if you're on Windows :)  http://scene.org

David St-Hilaire

unread,
May 22, 2019, 7:12:10 PM5/22/19
to WebGL Dev List
I'm also getting similar "unreadable" error messages coming out of 'gl.getProgramInfoLog'. In my case it happens when I add a sampler2D element in my light struct (inside my fragment shader). I still have no idea why it's now failing, it was working well before. Is there a way to get a more readable error message?

Jan Scheurer

unread,
May 23, 2019, 2:35:46 AM5/23/19
to webgl-d...@googlegroups.com
Hey guys, seem like a bug in the ANGLE shader translator, you can verify this by forcing chrome to use OpenGL as its rendering backend via a command line switch(https://github.com/mrdoob/three.js/wiki/How-to-use-OpenGL-or-ANGLE-rendering-on-Windows), further you can use the WEBGL_debug_shaders extension to get the translated HLSL source https://developer.mozilla.org/en-US/docs/Web/API/WEBGL_debug_shaders

Either way please make sure to file a bug at the angle project: https://github.com/google/angle

PS: Note that forcing OpenGL does not bypass the ANGLE entirely and might still result in an error, but an OpenGL one now.

Regards

--
You received this message because you are subscribed to the Google Groups "WebGL Dev List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webgl-dev-lis...@googlegroups.com.


--
making pixels dance

Jamie Madill

unread,
May 27, 2019, 9:22:11 AM5/27/19
to webgl-d...@googlegroups.com
FYI for ANGLE bug reports please file them at http://anglebug.com/new . The github is a read-only mirror.

David St-Hilaire

unread,
May 27, 2019, 9:35:08 AM5/27/19
to webgl-d...@googlegroups.com
ok, I have reported the bug here:

It seems that it has been received properly. I hope to get a fix soon, because I can't work on my project on my windows pc anymore (but it still works on my linux laptop).

Thanks for the help!


For more options, visit https://groups.google.com/d/optout.


--
David
Reply all
Reply to author
Forward
0 new messages