Adreno 3xx: GLSL varying arrays should not be reversed |
|||||
Issue description
Chrome Version: 57.0.2987.132
OS: Android 5.0+ (persists in most recent update, not present in 4.4.4)
Device: Nexus 7, Adreno 320
Android 4.4.4: OpenGL ES 3.0 V@53.0 AU@ (CL@)
Android 5.0: ?
This test fails:
https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/bugs/varying-arrays-should-not-be-reversed.html
in Chrome but NOT in Firefox.
Prior discussion here:
https://github.com/KhronosGroup/WebGL/pull/2358
Initially it seems likely that there is a driver bug workaround difference between 4.4.4 and 5.0, but this doesn't appear to be the case. There is no difference in the generated shader in Chrome between 4.4.4 and 5.0, but there is a difference between Chrome and Firefox:
varying highp float webgl_fb198836d046c6c3[3];
uniform highp vec3 webgl_75c5f78948595750;
attribute highp vec3 webgl_74509a83309904df;
void main(){
+ (gl_Position = vec4(0.0, 0.0, 0.0, 0.0)); // these lines only appear in Chrome
+ (webgl_fb198836d046c6c3[2] = 0.0);
+ (webgl_fb198836d046c6c3[1] = 0.0);
+ (webgl_fb198836d046c6c3[0] = 0.0);
(gl_Position = vec4(webgl_74509a83309904df, 1.0));
(webgl_fb198836d046c6c3[0] = webgl_75c5f78948595750.x);
(webgl_fb198836d046c6c3[1] = webgl_75c5f78948595750.y);
(webgl_fb198836d046c6c3[2] = webgl_75c5f78948595750.z);
}
The detail of the result is that instead of mapping x,y,z to 0,1,2 in the array, they instead map to 2,1,0. So there could be a regression in 5.0+ related to this fact. If we can modify the shader translator to reverse the order of SH_INIT_OUTPUT_VARIABLES, perhaps it would workaround the issue.
,
Apr 7 2017
,
Apr 11 2017
,
Apr 13 2017
Verified that reversing the order of the variable initialization works around the issue. Filed b/37288228 with Qualcomm.
,
Apr 13 2017
Working around this issue.
,
Apr 17 2017
Worked around in ANGLE shader translator here: https://chromium-review.googlesource.com/c/475979 which will probably appear in the next ANGLE roll. The Qualcomm bug report is now closed as WontFix because apparently the Nexus 7 no longer receives driver updates. Newer devices with Adreno 3xx (which are quite rare) might have the bug fixed already.
,
Apr 19 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4257abd6971db0275528a5db276806a24738bfda commit 4257abd6971db0275528a5db276806a24738bfda Author: cwallez <cwallez@chromium.org> Date: Wed Apr 19 01:30:05 2017 Roll ANGLE a9042d3..b36e539 https://chromium.googlesource.com/angle/angle.git/+log/a9042d3..b36e539 BUG= chromium:709317 TBR=geofflang@chromium.org TEST=bots CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2825823002 Cr-Commit-Position: refs/heads/master@{#465458} [modify] https://crrev.com/4257abd6971db0275528a5db276806a24738bfda/DEPS |
|||||
►
Sign in to add a comment |
|||||
Comment 1 by kainino@chromium.org
, Apr 7 2017