Summary: | Webgl conformance shader-with-non-reserved-words crash. | ||
---|---|---|---|
Product: | Mesa | Reporter: | Pavel Ondračka <pavel.ondracka> |
Component: | glsl-compiler | Assignee: | Ian Romanick <idr> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | kenneth |
Version: | git | ||
Hardware: | All | ||
OS: | All | ||
URL: | https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shader-with-non-reserved-words.html | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Pavel Ondračka
2012-11-27 19:19:28 UTC
Actually this one is also reproducible with swrast, reassigning. (glsl-compiler component is my best guess) This fails on current master and at least 8.0.4 (from my distro). It looks like all of the failing cases have a structure that has a field with teh same name as the structure. Even simple cases of this fail on Mesa's GLSL compiler: struct S { vec4 S; }; attribute vec4 p; void main() { S s; s.S = p; gl_Position = s.S; } Based on the error message, I think the structure name gets removed from the symbol table when the field name gets removed. The error occurs at the declaration of s: 0:19(4): error: syntax error, unexpected NEW_IDENTIFIER, expecting ',' or ';' I'll post a couple tests to the piglit mailing list shortly. A patch that should fix this bug has been posted to the Mesa mailing list: http://lists.freedesktop.org/archives/mesa-dev/2012-December/031222.html Fixed in master by: commit ed3f237e09a42bdb55afb58d1536affad9000d76 Author: Ian Romanick <ian.d.romanick@intel.com> Date: Thu Dec 6 14:57:01 2012 -0800 glsl: Don't add structure fields to the symbol table I erroneously added this back in January 2011 in commit 88421589. Looking at the commit message, I have no idea why I added it. It only added non-array structure fields to the symbol table, so array structure fields are treated correctly. Fixes piglit tests structure-and-field-have-same-name.vert and structure-and-field-have-same-name-nested.vert. It should also fix WebGL conformance tests shader-with-non-reserved-words. NOTE: This is a candidate for the stable release branches. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=57622 Reviewed-by: Kenneth Graunke <kenneth@whitecape.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.