Bug 96649 - webgl1.0.4 all/deqp/data/gles2/shaders/scoping.html cannot hide struct type correctly in shader
Summary: webgl1.0.4 all/deqp/data/gles2/shaders/scoping.html cannot hide struct type c...
Status: RESOLVED NOTABUG
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: 11.2
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-23 09:53 UTC by xinghua
Modified: 2016-11-01 00:14 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description xinghua 2016-06-23 09:53:52 UTC
Steps to reproduce:
1. Launch Chrome browser on Linux with GEN graphics, and open https://www.khronos.org/registry/webgl/sdk/tests/deqp/data/gles2/shaders/scoping.html?webglVersion=1&quiet=0
2. Three cases will fail,
scoping.valid.local_int_variable_hides_struct_type
scoping.valid.local_struct_variable_hides_struct_type
scoping.valid.function_parameter_hides_struct_type
Comment 1 xinghua 2016-06-23 09:56:02 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 '('
Comment 2 Corentin Wallez 2016-07-12 11:49:21 UTC
See 95184, this bug has been fixed in Mesa 12.0. Should we mark it a duplicate?
Comment 3 Matt Turner 2016-11-01 00:14:32 UTC
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.