Bug 83934 - Structures must have same name to be considered same type.
Summary: Structures must have same name to be considered same type.
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: 10.2
Hardware: Other All
: medium normal
Assignee: Tapani Pälli
QA Contact: Intel 3D Bugs Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-16 15:54 UTC by kalyank
Modified: 2014-09-26 05:32 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Fix (1.36 KB, text/plain)
2014-09-16 15:54 UTC, kalyank
Details
fix (2.45 KB, patch)
2014-09-22 11:41 UTC, Tapani Pälli
Details | Splinter Review

Description kalyank 2014-09-16 15:54:47 UTC
Created attachment 106375 [details]
Fix

According to GLSL(4.2) and GLSL-ES (1.0, 3.0) spec, Structures must
have the same name to be considered same type. 

From GLSL 4.20 specification: (Sec 4.2)
"Structures must have the same name, sequence of type
 names, and type definitions, and field names to be
 considered the same type. "

 GLSL-ES is also same(Ver 1.00 Sec 4.2.4, Ver 3.00 Sec 4.2.5).

We currently ignore the name while checking if two records are same.


The following WebGL conformance tests fail when running Chromium Web Browser with Wayland(https://github.com/01org/ozone-wayland)

Test case:
https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shaders-with-uniform-structs.html

Attached is patch which fixes this.
Comment 1 kalyank 2014-09-16 16:02:15 UTC
Note:
This fixes "Structures must have the same name to be considered the same type." test case from https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shaders-with-uniform-structs.html
Comment 2 Tapani Pälli 2014-09-19 10:45:23 UTC
The patch will need some additional changes as it will break usecases with unnamed types (which are assigned a name automatically by Mesa), will see what would fix this.
Comment 3 Tapani Pälli 2014-09-22 11:41:33 UTC
Created attachment 106670 [details] [review]
fix

Modified version of the patch that takes care of the 'anonymous structures' issue mentioned. Will do some testing to verify that this is the right thing todo.
Comment 4 Tapani Pälli 2014-09-26 05:32:51 UTC
fixed in master


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.