Summary: | webgl1.0.4 all/deqp/data/gles2/shaders/scoping.html cannot hide struct type correctly in shader | ||
---|---|---|---|
Product: | Mesa | Reporter: | xinghua <xinghua.cao> |
Component: | Drivers/DRI/i965 | Assignee: | Ian Romanick <idr> |
Status: | RESOLVED NOTABUG | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 11.2 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
xinghua
2016-06-23 09:53:52 UTC
I had printed the shader code, translated code by ANGLE, and error info when compile and link by mesa. a) scoping.valid.local_int_variable_hides_struct_type --original-shader-- #version 100 precision mediump float; bool isOk (int a, int b) { return (a == b); } varying float v_in0; uniform int ref_out0; int out0; struct S { int val; }; void main() { int in0 = int(v_in0 * 1.0025); int S = S(in0).val; out0 = S; bool RES = isOk(out0, ref_out0); gl_FragColor = vec4(RES, RES, RES, 1.0); } --translated-shader-- bool webgl_26daf0ef1d00ab6d(in int webgl_2420662cd003acfa, in int webgl_44a9acbe7629930d){ return (webgl_2420662cd003acfa == webgl_44a9acbe7629930d); } varying float webgl_c64db3cf02d35b2e; uniform int webgl_20b06c95b742317e; int webgl_50c85a6bbb49f119; struct webgl_bc2ee2bf060ca60{ int webgl_d29633f34eb1c59e; } ; void main(){ int webgl_e4819ca83edf6f18 = int((webgl_c64db3cf02d35b2e * 1.0025001)); int webgl_bc2ee2bf060ca60 = webgl_bc2ee2bf060ca60(webgl_e4819ca83edf6f18).webgl_d29633f34eb1c59e; (webgl_50c85a6bbb49f119 = webgl_bc2ee2bf060ca60); bool webgl_64928d1969e45ae2 = webgl_26daf0ef1d00ab6d(webgl_50c85a6bbb49f119, webgl_20b06c95b742317e); (gl_FragColor = vec4(webgl_64928d1969e45ae2, webgl_64928d1969e45ae2, webgl_64928d1969e45ae2, 1.0)); } --info-log-- 0:13(48): error: syntax error, unexpected ')', expecting '(' b) local_struct_variable_hides_struct_type --original-shader-- #version 100 precision mediump float; bool isOk (int a, int b) { return (a == b); } varying float v_in0; uniform int ref_out0; int out0; struct S { int val; }; void main() { int in0 = int(v_in0 * 1.0025); S S = S(in0); out0 = S.val; bool RES = isOk(out0, ref_out0); gl_FragColor = vec4(RES, RES, RES, 1.0); } --translated-shader-- bool webgl_26daf0ef1d00ab6d(in int webgl_2420662cd003acfa, in int webgl_44a9acbe7629930d){ return (webgl_2420662cd003acfa == webgl_44a9acbe7629930d); } varying float webgl_c64db3cf02d35b2e; uniform int webgl_20b06c95b742317e; int webgl_50c85a6bbb49f119; struct webgl_bc2ee2bf060ca60{ int webgl_d29633f34eb1c59e; } ; void main(){ int webgl_e4819ca83edf6f18 = int((webgl_c64db3cf02d35b2e * 1.0025001)); webgl_bc2ee2bf060ca60 webgl_bc2ee2bf060ca60 = webgl_bc2ee2bf060ca60(webgl_e4819ca83edf6f18); (webgl_50c85a6bbb49f119 = webgl_bc2ee2bf060ca60.webgl_d29633f34eb1c59e); bool webgl_64928d1969e45ae2 = webgl_26daf0ef1d00ab6d(webgl_50c85a6bbb49f119, webgl_20b06c95b742317e); (gl_FragColor = vec4(webgl_64928d1969e45ae2, webgl_64928d1969e45ae2, webgl_64928d1969e45ae2, 1.0)); } --info-log-- 0:13(48): error: syntax error, unexpected DOT_TOK, expecting '(' c) scoping.valid.function_parameter_hides_struct_type --original-shader-- #version 100 precision mediump float; bool isOk (int a, int b) { return (a == b); } varying float v_in0; uniform int ref_out0; int out0; struct S { int x; }; int func (int S) { return S; } void main() { int in0 = int(v_in0 * 1.0025); out0 = func(in0); bool RES = isOk(out0, ref_out0); gl_FragColor = vec4(RES, RES, RES, 1.0); } --translated-shader-- bool webgl_26daf0ef1d00ab6d(in int webgl_2420662cd003acfa, in int webgl_44a9acbe7629930d){ return (webgl_2420662cd003acfa == webgl_44a9acbe7629930d); } varying float webgl_c64db3cf02d35b2e; uniform int webgl_20b06c95b742317e; int webgl_50c85a6bbb49f119; struct webgl_bc2ee2bf060ca60{ int webgl_4fc82888d13de398; } ; int webgl_8e5fc8b7c9b6652c(in int webgl_bc2ee2bf060ca60){ return webgl_bc2ee2bf060ca60; } void main(){ int webgl_e4819ca83edf6f18 = int((webgl_c64db3cf02d35b2e * 1.0025001)); (webgl_50c85a6bbb49f119 = webgl_8e5fc8b7c9b6652c(webgl_e4819ca83edf6f18)); bool webgl_64928d1969e45ae2 = webgl_26daf0ef1d00ab6d(webgl_50c85a6bbb49f119, webgl_20b06c95b742317e); (gl_FragColor = vec4(webgl_64928d1969e45ae2, webgl_64928d1969e45ae2, webgl_64928d1969e45ae2, 1.0)); } --info-log-- 0:11(29): error: syntax error, unexpected ';', expecting '(' See 95184, this bug has been fixed in Mesa 12.0. Should we mark it a duplicate? All of these tests are now skipped with a message like WARNING scoping.valid.function_parameter_hides_struct_type_vertex: Skipping test due to tcuSkipList: scoping.valid.function_parameter_hides_struct_type_vertex WARNING scoping.valid.function_parameter_hides_struct_type_fragment: Skipping test due to tcuSkipList: scoping.valid.function_parameter_hides_struct_type_fragment I do not know what that means. Closing as NOTABUG. |
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.