Summary: | Webgl conformance shader-with-non-reserved-words crash when mesa is compiled without --enable-debug | ||
---|---|---|---|
Product: | Mesa | Reporter: | Pavel Ondračka <pavel.ondracka> |
Component: | glsl-compiler | Assignee: | Kenneth Graunke <kenneth> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | gquigs+bugs, idr, kenneth, lemody |
Version: | git | ||
Hardware: | Other | ||
OS: | All | ||
URL: | http://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shader-with-non-reserved-words.html | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 67224 |
Description
Pavel Ondračka
2013-04-30 13:02:36 UTC
I don't know if it's the same error, but I currently get: *** Error compiling VERTEX_SHADER '[object WebGLShader]':0:5(1): error: syntax error, unexpected IDENTIFIER FAIL shader with: 'layout' failed to compile PASS getError was expected value: NO_ERROR : should be no GL errors for this shader: struct layout { vec4 layout; }; struct Foo { layout layout; }; attribute vec4 position; void main() { Foo f; f.layout.layout = position; gl_Position = f.layout.layout; } There are similar errors for some other things that are reserved words in GLSL versions other than OpenGL ES 2.0. For me only the keywords of ARB_texture_cube_map_array_enable extension seem to cause the issues. I've sent patch to mesa-dev list that fixes this test for me. Tapani fixed the crash with: commit 8c211dd742669bc03b44186e41e5aa40081d6bcc Author: Tapani Pälli <tapani.palli@intel.com> Date: Fri Jul 26 10:21:56 2013 +0300 glsl: disable ARB_texture_cube_map_array_enable keywords for glsl es Patch fixes a crash with Webgl 'shader-with-non-reserved-words' conformance test by ignoring desktop extension keywords on GLSL ES. v2: fix reserved and allowed desktop glsl versions (Chris) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087 Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Chris Forbes <chrisf@ijw.co.nz> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> The test still failed, however, due to the issue with "layout" Ian pointed out. That should be fixed with: http://lists.freedesktop.org/archives/mesa-dev/2013-July/042338.html The test should now pass as of: commit c178ec0d7e8cc7007cb34e4f56f14261a057c200 Author: Kenneth Graunke <kenneth@whitecape.org> Date: Fri Jul 26 12:31:06 2013 -0700 glsl: Classify "layout" like other identifiers. When "layout" isn't being lexed as LAYOUT_TOK, we should treat it like an ordinary identifier. This means we need to classify it to determine whether we should return IDENTIFIER, TYPE_IDENTIFIER, or NEW_IDENTIFIER. Fixes the WebGL conformance test "shader-with-non-reserved-words." Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=64087 Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Matt Turner <mattst88@gmail.com> Cc: mesa-stable@lists.freedesktop.org |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.