CTS test case "dEQP-GLES2.functional.shaders.keywords.reserved_keywords.double_vertex" checks if GLSL compiler can detect the keyword error within follow vertex shader code: " precision mediump float; attribute highp vec4 dEQP_Position; void main() { float double = 1.0; gl_Position = dEQP_Position; } " Taking a keyword as a variable's name should be forbidden, but MESA doesn't report any error
That is indeed a bug, GLSL ES 1.0.17 specifies that "double" is a keyword reserved for future use. The fix is to change glsl_lexer.ll to be double TYPE_WITH_ALT(130, 100, 130, 300, yyextra->ARB_gpu_shader_fp64_enable, glsl_type::double_type) instead of 130, 300, 130, 300. Want to send a patch or should I?
(In reply to Kenneth Graunke from comment #1) > That is indeed a bug, GLSL ES 1.0.17 specifies that "double" is a keyword > reserved for future use. The fix is to change glsl_lexer.ll to be > > double TYPE_WITH_ALT(130, 100, 130, 300, > yyextra->ARB_gpu_shader_fp64_enable, glsl_type::double_type) > > instead of 130, 300, 130, 300. Want to send a patch or should I? Thanks, I've verified it and I'll send a patch later
Mesa passes the GLES3 variant of this test. Also, the test is listed in the following dEQP source file: android/cts/master/src/gles2-failures.txt Are we sure that this test should pass on GLES2?
(In reply to Mark Janes from comment #3) > Mesa passes the GLES3 variant of this test. Also, the test is listed in the > following dEQP source file: > > android/cts/master/src/gles2-failures.txt > > Are we sure that this test should pass on GLES2? Yes. That just means the test isn't required as part of the Android conformance process (i.e. on the must-pass list). The spec is pretty clear.
patch has been posted here: https://patchwork.freedesktop.org/patch/227593/ please review it
Fixed by: commit 67f7a16b598513d25319e482359a4c4c6fc1271d Author: zhaowei yuan <zhaowei.yuan@samsung.com> Date: Tue Jun 5 05:33:59 2018 +0800 glsl: Take 'double' as reserved after GLSL ES 1.0 GLSL ES 1.0.17 specifies that "double" is a keyword reserved Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106823 Signed-off-by: zhaowei yuan <zhaowei.yuan@samsung.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> 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.