Closed Bug 1178871 Opened 4 years ago Closed 4 years ago

WebGL conformance test conformance/glsl/misc/struct-nesting-of-variable-names fails on OS X.

Categories

(Core :: Canvas: WebGL, defect)

41 Branch
x86_64
macOS
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: jujjyl, Assigned: jerry)

Details

(Whiteboard: [gfx-noted])

Attachments

(3 files)

STR: Visit https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/struct-nesting-of-variable-names.html?webglVersion=1 on an OS X computer.

Observed: The test fails on the following hardware configurations:

MACBOOK_AIR_OSX
---------------

MacBook Air (13-inch, Mid 2011)
OS X Lion 10.7.5
1.7GHz Intel Core i5
4GB 1333 MHz DDR3
1440x900 pixels display
Intel HD Graphics 3000 384MB
	- Vendor: Intel (0x8086)
	- Device ID: 0x0116
	- Revision ID: 0x0009
Firefox Nightly 41.0a1 (2015-06-29)

MACBOOK_PRO_OSX
---------------

MacBook Pro (Retina, 15-inch, Early 2013)
OS X Yosemite v10.10.2
2.7GHz Intel Core i7-3740QM
16 GB 1600MHz DDR3
2880x1800 pixels display resolution
Integrated Graphics: Intel HD Graphics 4000 1024MB
	- Vendor: Intel (0x8086)
	- Device ID: 0x0166
	- Revision ID: 0x0009
	- gMux Version: 3.2.19 [3.2.8]
Discrete Graphics: NVIDIA GeForce GT 650M
	- Vendor: NVIDIA (0x10de)
	- Device ID: 0x0fd5
	- Revision ID: 0x00a2
	- ROM Revision: 3688
	- gMux Version: 3.2.19 [3.2.8]
Firefox Nightly 41.0a1 (2015-06-29)

MACMINI
-------

Mac Mini (Late 2012)
OS X 10.9.4
2.3GHz Intel Core i7
4 GB 1600 MHz DDR3
1280x720 pixels display resolution
Intel HD Graphics 4000, 1024 MB
	- Vendor: Intel (0x8086)
	- Device ID: 0x0166
	- Revision ID: 0x0009
Firefox Nightly 41.0a1 (2015-06-29)

MACPRO
------

Mac Pro (Late 2013)
OS X Yosemite 10.10.3
3.5GHz 6-Core Intel Xeon E5
32GB 1866MHz DDR3 ECC
1920x1080 pixels display
AMD FirePro D500 3072MB
	- Vendor: ATI (0x1002)
	- Device ID: 0x679e
	- Revision ID: 0x0000
	- ROM Revision: 113-C3861J-687
	- gMux Version: 4.0.11 [3.2.8]
	- EFI Driver Version: 01.00.687
Firefox Nightly 41.0a1 (2015-06-29)
The failure did not occur on any of the following: SPARK, GIADA, MACBOOK_AIR_WIN, MACBOOK_PRO_WIN, NEXUS-4, NEXUS-5, NEXUS-10, SURFACE, WINDBOX, HASWELL, HPOMEN (see https://bugzilla.mozilla.org/show_bug.cgi?id=1178601 for hardware configuration details of these systems), so this failure looks like OS X -specific.
Whiteboard: [gfx-noted]
This failure also occurs in Safari but not on Chrome.

This is because the shaders in the tests are throwing syntax errors in the GL drivers on OSX. Chrome appears to take an intermediate step to translate the shader so that it compiles on the driver being used.

Do we have such facilities to do source translation like that?
I thought we already use the same shader compiler as Chrome, but perhaps we don't use the same flags.
Flags: needinfo?(howareyou322)
Assign Jerry to check.
Assignee: nobody → hshih
Flags: needinfo?(howareyou322)
Status: NEW → ASSIGNED
Comment on attachment 8755783 [details] [diff] [review]
work around that Mac drivers for shader struct scopes. v1

Review of attachment 8755783 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/canvas/WebGLShaderValidator.cpp
@@ +84,5 @@
>              options |= SH_UNROLL_FOR_LOOP_WITH_SAMPLER_ARRAY_INDEX;
>          }
> +
> +        // Work around that Mac drivers handle struct scopes incorrectly.
> +        options |= SH_REGENERATE_STRUCT_NAMES;

Please check:
https://hg.mozilla.org/mozilla-central/annotate/46fe2115d46a5bb40523b8466341d8f9a26e1bdf/gfx/angle/include/GLSLANG/ShaderLang.h#l197
Looks good to me! Verified.
Attachment #8755783 - Flags: review?(jgilbert) → review+
Attachment #8755923 - Flags: review?(jgilbert) → review+
Comment on attachment 8756200 [details] [diff] [review]
turn on WebGL conformance test |conformance/glsl/misc/shader-struct-scope|. v1

Just a trivial change. r=me.
Turn on "shader-struct-scope.html" test for mac platform.
We expect this "shader-struct-scope.html" failed before, but there is no error with attachment 8755783 [details] [diff] [review] now.
Attachment #8756200 - Flags: review+
You need to log in before you can comment on or make changes to this bug.