Project: chromium Issues People Development process History Sign in
New issue
Advanced search Search tips
Issue 639760 Contradictions between ESSL and GLSL for invariant qualifier
Starred by 2 users Project Member Reported by qiankun....@intel.com, Aug 22 2016 Back to list
Status: Fixed
Owner:
Closed: Nov 18
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug

Blocked on:
issue 659326

Blocking:
issue 480736
issue 429053



Sign in to add a comment
ESSL 1.00:
Invariant qualifier is allowed on varying inputs in the fragment shader

ESSL 3.00:
Inputs cannot be declared invariant.

GLSL 4.50:
Only variables output from a shader can be candidates for invariance.

The contradiction makes conformance/glsl/bugs/invariant-does-not-leak-across-shaders.html and conformance/glsl/misc/shaders-with-invariance.html failed on Intel Mesa with Core profile, since ESSL 1.00 shaders are translated to GLSL 4.50 shaders. If I run chrome with egl context: --use-gl=egl, these two tests passed.
 
Comment 1 by kbr@chromium.org, Aug 23 2016
Blocking: 295792
Labels: -Pri-3 Pri-1
Status: Available
In order to handle this there are at least a couple of possibilities.

1) Translate ESSL 1.00 shaders into an earlier version of GLSL (#version 120?) which has the same invariance matching rules as ESSL 1.00.

2) Have ANGLE and/or Chromium enforce the invariance matching rules between ESSL 1.00 vertex and fragment shaders, but when compiling ESSL 1.00 shaders to GLSL 4.50 shaders, erase the "invariant" qualifier for fragment shader inputs.

Would either of these approaches work?

I think this is a significant problem for the shipment of WebGL 2.0 so I'm upgrading it to P1 and blocking the implementation bug on it.
Blocking: 480736
Owner: qiankun....@intel.com
Status: Assigned
For GLSL less than 4.3, it says "For variables leaving one shader and coming into another shader, the invarian keywork has to be used in both shaders, or a link error will result". 

It is inconsistent with ESSL 3.00 and makes deqp/data/gles3/qualification_order.html fail on invariant_interp_storage_precision tests. 

Ken, I intend to implement option 2 your mentioned to handle contradictions between ESSL 1.00 and GLSL 4.50, ESSL 3.00 and versions less than 4.30.
Project Member Comment 4 by bugdroid1@chromium.org, Oct 25
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a

commit d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a
Author: Qiankun Miao <qiankun.miao@intel.com>
Date: Mon Aug 29 02:05:27 2016

Remove invariant qualifier for input in fragment shader

ESSL and GLSL are not consistent on invariant matching in vertex shader
and fragment shader. See the following rules:
ESSL 1.00 - input and output must match
ESSL 3.00 - only output, inputs cannot be declared as invariant.

GLSL 1.10.59 - does not exist
GLSL 1.20.8  - input and output must match
GLSL 1.30.10 - input and output must match
GLSL 1.40.8  - input and output must match
GLSL 1.50.11 - input and output must match
GLSL 3.30.6  - input and output must match
GLSL 4.00.9  - input and output must match
GLSL 4.10.6  - input and output must match
GLSL 4.20.11 - input can omit invariant
GLSL 4.30.8  - input can omit invariant
GLSL 4.40.9  - input can omit invariant
GLSL 4.50.5  - input can omit invariant

Since GLSL 4.20, invariant qualifier description were changed to:
"
Only variables output from a shader (including those that are then input
to a subsequent shader) can be candidates for invariance. This includes
user-defined output variables and the built-in output variables. As only
outputs need be declared with invariant, an output from one shader stage
will still match an input of a subsequent stage without the input being
declared as invariant.
"
It's not very clear if input in fragment can be declared as invariant.
Mesa driver disallows use of input declared as invariant in fragment
shader, while other drivers may allow it.

In ESSL 3.00, inputs cannot be declared as invariant. ANGLE should
follow this rule for GLSL >= 4.20.

BUG=chromium:639760

Change-Id: I7f7a07401381ac970488b69752f6d50d4f19d31f
Reviewed-on: https://chromium-review.googlesource.com/400005
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>

[modify] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/Compiler.h
[modify] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/Compiler.cpp
[add] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/RemoveInvariantDeclaration.h
[add] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/RemoveInvariantDeclaration.cpp
[modify] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler.gypi
[modify] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/OutputGLSLBase.cpp

Project Member Comment 5 by bugdroid1@chromium.org, Oct 25
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a

commit d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a
Author: Qiankun Miao <qiankun.miao@intel.com>
Date: Mon Aug 29 02:05:27 2016

Remove invariant qualifier for input in fragment shader

ESSL and GLSL are not consistent on invariant matching in vertex shader
and fragment shader. See the following rules:
ESSL 1.00 - input and output must match
ESSL 3.00 - only output, inputs cannot be declared as invariant.

GLSL 1.10.59 - does not exist
GLSL 1.20.8  - input and output must match
GLSL 1.30.10 - input and output must match
GLSL 1.40.8  - input and output must match
GLSL 1.50.11 - input and output must match
GLSL 3.30.6  - input and output must match
GLSL 4.00.9  - input and output must match
GLSL 4.10.6  - input and output must match
GLSL 4.20.11 - input can omit invariant
GLSL 4.30.8  - input can omit invariant
GLSL 4.40.9  - input can omit invariant
GLSL 4.50.5  - input can omit invariant

Since GLSL 4.20, invariant qualifier description were changed to:
"
Only variables output from a shader (including those that are then input
to a subsequent shader) can be candidates for invariance. This includes
user-defined output variables and the built-in output variables. As only
outputs need be declared with invariant, an output from one shader stage
will still match an input of a subsequent stage without the input being
declared as invariant.
"
It's not very clear if input in fragment can be declared as invariant.
Mesa driver disallows use of input declared as invariant in fragment
shader, while other drivers may allow it.

In ESSL 3.00, inputs cannot be declared as invariant. ANGLE should
follow this rule for GLSL >= 4.20.

BUG=chromium:639760

Change-Id: I7f7a07401381ac970488b69752f6d50d4f19d31f
Reviewed-on: https://chromium-review.googlesource.com/400005
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>

[modify] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/Compiler.h
[modify] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/Compiler.cpp
[add] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/RemoveInvariantDeclaration.h
[add] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/RemoveInvariantDeclaration.cpp
[modify] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler.gypi
[modify] https://crrev.com/d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a/src/compiler/translator/OutputGLSLBase.cpp

Blockedon: 659326
Project Member Comment 7 by bugdroid1@chromium.org, Oct 25
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/657fd99aed465ab7f6d7aa62775217cd571f97c7

commit 657fd99aed465ab7f6d7aa62775217cd571f97c7
Author: geofflang <geofflang@chromium.org>
Date: Tue Oct 25 22:19:26 2016

Roll ANGLE 3b5ffe5..af7f301

https://chromium.googlesource.com/angle/angle.git/+log/3b5ffe5..af7f301

BUG=chromium:639760,None,655247

TBR=jmadill@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/2444383003
Cr-Commit-Position: refs/heads/master@{#427509}

[modify] https://crrev.com/657fd99aed465ab7f6d7aa62775217cd571f97c7/DEPS

Project Member Comment 8 by bugdroid1@chromium.org, Oct 29
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/705a9194438dd19a2f456235dda5a175cfce94d5

commit 705a9194438dd19a2f456235dda5a175cfce94d5
Author: Qiankun Miao <qiankun.miao@intel.com>
Date: Mon Aug 29 02:05:27 2016

Reland "Remove invariant qualifier for input in fragment shader"

This relands https://chromium-review.googlesource.com/#/c/400005/.

ESSL and GLSL are not consistent on invariant matching in vertex shader
and fragment shader. See the following rules:
ESSL 1.00 - input and output must match
ESSL 3.00 - only output, inputs cannot be declared as invariant.

GLSL 1.10.59 - does not exist
GLSL 1.20.8  - input and output must match
GLSL 1.30.10 - input and output must match
GLSL 1.40.8  - input and output must match
GLSL 1.50.11 - input and output must match
GLSL 3.30.6  - input and output must match
GLSL 4.00.9  - input and output must match
GLSL 4.10.6  - input and output must match
GLSL 4.20.11 - input can omit invariant
GLSL 4.30.8  - input can omit invariant
GLSL 4.40.9  - input can omit invariant
GLSL 4.50.5  - input can omit invariant

Since GLSL 4.20, invariant qualifier description were changed to:
"
Only variables output from a shader (including those that are then input
to a subsequent shader) can be candidates for invariance. This includes
user-defined output variables and the built-in output variables. As only
outputs need be declared with invariant, an output from one shader stage
will still match an input of a subsequent stage without the input being
declared as invariant.
"
It's not very clear if input in fragment can be declared as invariant.
Mesa driver disallows use of input declared as invariant in fragment
shader, while other drivers may allow it. This CL removes invariant
declaration for input in fragment shader except AMD driver in Linux.
AMD's driver obviously contradicts the spec by forcing invariance to
match between vertex and fragment shaders.

BUG=chromium:639760, chromium:659326
TEST=conformance/glsl/misc/shaders-with-invariance.html and
conformance/glsl/bugs/invariant-does-not-leak-across-shaders.html

Change-Id: I0aa9be14f0cee7a11a249c91fba27c570c52ca1b
Reviewed-on: https://chromium-review.googlesource.com/404228
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>

[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/OutputESSL.cpp
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/include/GLSLANG/ShaderLang.h
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/OutputGLSL.cpp
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/Compiler.cpp
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/TranslatorESSL.cpp
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/OutputGLSLBase.cpp
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/libANGLE/renderer/gl/ShaderGL.cpp
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/OutputGLSL.h
[add] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/RemoveInvariantDeclaration.h
[add] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/RemoveInvariantDeclaration.cpp
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/OutputESSL.h
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/TranslatorGLSL.cpp
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler.gypi
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/libANGLE/renderer/gl/renderergl_utils.cpp
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/OutputGLSLBase.h
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/libANGLE/renderer/gl/WorkaroundsGL.h
[modify] https://crrev.com/705a9194438dd19a2f456235dda5a175cfce94d5/src/compiler/translator/Compiler.h

Project Member Comment 9 by bugdroid1@chromium.org, Oct 30
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/988aa562e76cacc7b6b39d9f7b33c25f5b7824f8

commit 988aa562e76cacc7b6b39d9f7b33c25f5b7824f8
Author: qiankun.miao <qiankun.miao@intel.com>
Date: Sun Oct 30 09:14:46 2016

Roll ANGLE af7f301..705a919

https://chromium.googlesource.com/angle/angle.git/+log/af7f301..705a919

BUG=chromium:659892,  540829 , 655247, chromium:639760, chromium:659326, chromium:659326,  658555 

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/2457243003
Cr-Commit-Position: refs/heads/master@{#428622}

[modify] https://crrev.com/988aa562e76cacc7b6b39d9f7b33c25f5b7824f8/DEPS

Project Member Comment 10 by bugdroid1@chromium.org, Oct 30
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fdc6ab7c454d400dfc3d68ace3e4bcd192e3e5d5

commit fdc6ab7c454d400dfc3d68ace3e4bcd192e3e5d5
Author: qiankun.miao <qiankun.miao@intel.com>
Date: Sun Oct 30 13:51:07 2016

Remove invariant for input in fragment shader

This CL enables a ANGLE workaround which removes invariant declaration
for GLSL >= 4.20 on all platforms except AMD Linux because AMD's driver
obviously contradicts the spec by forcing invariance to match
between vertex and fragment shaders.

BUG= 639760 ,  659326 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2456823002
Cr-Commit-Position: refs/heads/master@{#428625}

[modify] https://crrev.com/fdc6ab7c454d400dfc3d68ace3e4bcd192e3e5d5/gpu/command_buffer/service/gles2_cmd_decoder.cc
[modify] https://crrev.com/fdc6ab7c454d400dfc3d68ace3e4bcd192e3e5d5/gpu/config/gpu_driver_bug_list_json.cc
[modify] https://crrev.com/fdc6ab7c454d400dfc3d68ace3e4bcd192e3e5d5/gpu/config/gpu_driver_bug_workaround_type.h

Qiankun, can we close this bug?
We cannot close it currently. We still need to handle translation from ESSL 3.0 to GLSL < 4.2 for Mac OSX. I can take a look at it after I finish glCopyTextureExtension work.
I think the only workable workaround on GLSL < 4.2 for macOS is to erase the "invariant" qualifier when translating shaders. The same will have to be done for the "centroid" qualifier. This is not a large task, but is urgent. It will need to be documented in a list of errata for WebGL 2.0 on the WebGL wiki.

Summary: Contradictions between ESSL and GLSL for invariant qualifier (was: Contradictions between ESSL and GLSL for invariant qualifiler)
Owner: zmo@chromium.org
Let me take this since Qiankun is busy with CopyTextureCHROMIUM upgrade
Blocking: -295792 429053
Project Member Comment 18 by bugdroid1@chromium.org, Nov 9
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/211a037098c47829e10690dad696a6d047df5c8c

commit 211a037098c47829e10690dad696a6d047df5c8c
Author: zmo <zmo@chromium.org>
Date: Wed Nov 09 04:12:14 2016

Roll ANGLE e5c53e3..b7bf742

https://chromium.googlesource.com/angle/angle.git/+log/e5c53e3..b7bf742

BUG=chromium:639760,chromium:641129,chromium:662706
TEST=bots
TBR=jmadill@chromium.org
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/2486113002
Cr-Commit-Position: refs/heads/master@{#430854}

[modify] https://crrev.com/211a037098c47829e10690dad696a6d047df5c8c/DEPS

Project Member Comment 19 by bugdroid1@chromium.org, Nov 10
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/89dd8f37017f55dca821a8b9cf33f4fb09532d70

commit 89dd8f37017f55dca821a8b9cf33f4fb09532d70
Author: Qiankun Miao <qiankun.miao@intel.com>
Date: Wed Nov 09 12:59:30 2016

Remove invariant declaration in vertex shader for translation from ESSL 3.00 to GLSL <= 4.1

This is a follow-up patch of
https://chromium-review.googlesource.com/408569. This CL removes
invariant declaration in ESSL 3.00 vertex shader, such like:
"
out vec4 foo;
invariant foo;
"

This CL also adds the workarounds in libANGLE.

BUG=chromium:639760
TEST=webgl2_conformance

Change-Id: I568ab51a9a2f5da10d1aff0b63aae8805097e081
Reviewed-on: https://chromium-review.googlesource.com/409157
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>

[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/OutputESSL.cpp
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/include/GLSLANG/ShaderLang.h
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/OutputGLSL.cpp
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/Compiler.cpp
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/TranslatorESSL.cpp
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/OutputGLSLBase.cpp
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/libANGLE/renderer/gl/ShaderGL.cpp
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/OutputGLSL.h
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/RemoveInvariantDeclaration.cpp
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/OutputESSL.h
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/TranslatorGLSL.cpp
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/OutputGLSLBase.h
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/libANGLE/renderer/gl/renderergl_utils.cpp
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/libANGLE/renderer/gl/WorkaroundsGL.h
[modify] https://crrev.com/89dd8f37017f55dca821a8b9cf33f4fb09532d70/src/compiler/translator/Compiler.h

Project Member Comment 20 by bugdroid1@chromium.org, Nov 10
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5699a63b525009090805a4122ca7ee2e91acae85

commit 5699a63b525009090805a4122ca7ee2e91acae85
Author: zmo <zmo@chromium.org>
Date: Thu Nov 10 19:34:22 2016

Roll ANGLE b7bf742..4b97d50

https://chromium.googlesource.com/angle/angle.git/+log/b7bf742..4b97d50

BUG=chromium:639760
TEST=bots
TBR=jmadill@chromium.org
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/2488313002
Cr-Commit-Position: refs/heads/master@{#431317}

[modify] https://crrev.com/5699a63b525009090805a4122ca7ee2e91acae85/DEPS

Status: Fixed
https://codereview.chromium.org/2494923002/ landed
Status: Assigned
I see WebglConformance_conformance2_glsl3_valid_invariant failing on Linux Release (AMD R7 240) bot. I think for a complete solution, you should also remove "#pragma STDGL invariant(all)" on GLSL <= 4.1.
Added expectation for that failure:
https://codereview.chromium.org/2507513002
Project Member Comment 24 by bugdroid1@chromium.org, Nov 15
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b86938891ce73c4d38afb9207fab2976d01cfcfa

commit b86938891ce73c4d38afb9207fab2976d01cfcfa
Author: kainino <kainino@chromium.org>
Date: Tue Nov 15 18:35:50 2016

conformance2/glsl3/valid-invariant.html fails on Linux AMD

BUG= 639760 
R=geofflang@chromium.org
R=zmo@chromium.org
NOTRY=true
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel

Review-Url: https://codereview.chromium.org/2507513002
Cr-Commit-Position: refs/heads/master@{#432220}

[modify] https://crrev.com/b86938891ce73c4d38afb9207fab2976d01cfcfa/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py

Yuly, since you see the problem and know what it is do you think you could help us with a fix in ANGLE? Mo, Kai and I are swamped trying to write and pass the last texture-related WebGL 2.0 conformance tests before Thursday.

"#pragma STDGL invariant(all)" has been flattened. You reminds me I didn't handle builtin variables which have invariant qualifier added by this pragma. I uploaded a CL to fix this issue as well as AMD driver bug: https://chromium-review.googlesource.com/#/c/411917/. The gl version on AMD gpu.fyi bot is 4.4 which requires invariant qualifier to match between shaders. This isn't consistent with GLSL 4.4 spec. See the discussions in https://bugs.chromium.org/p/chromium/issues/detail?id=659326#c4. 
Ah, sorry, I didn't remember the code correctly, indeed the pragma is always flattened.  Something like https://chromium-review.googlesource.com/#/c/411917/ is the way to go, indeed.
PS. Since #22-#27 are actually about AMD bug, maybe we should track this in a separate bug or reduce the priority.
Project Member Comment 29 by bugdroid1@chromium.org, Nov 17
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/41f9f6732fe71e88f8f15d6d0df528c0a24cc1a6

commit 41f9f6732fe71e88f8f15d6d0df528c0a24cc1a6
Author: Qiankun Miao <qiankun.miao@intel.com>
Date: Wed Nov 16 09:04:36 2016

Remove invariant qualifier for ESSL 3.0 on AMD driver

AMD driver in Linux requires invariant qualifier to match between
shaders even for GLSL >= 4.2. This conflicts with ESSL 3.0 which
disallows invariant qualifier in fragment shader. Remove invariant
qualifier in vertex shader to workaround AMD driver bug.

BUG=chromium:639760
TEST=webgl2_conformance

Change-Id: Id5adf7e7032105486df90a1f200471ea81ee5c36
Reviewed-on: https://chromium-review.googlesource.com/411917
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>

[modify] https://crrev.com/41f9f6732fe71e88f8f15d6d0df528c0a24cc1a6/src/compiler/translator/Compiler.cpp
[modify] https://crrev.com/41f9f6732fe71e88f8f15d6d0df528c0a24cc1a6/src/compiler/translator/TranslatorGLSL.cpp
[modify] https://crrev.com/41f9f6732fe71e88f8f15d6d0df528c0a24cc1a6/src/libANGLE/renderer/gl/renderergl_utils.cpp
[modify] https://crrev.com/41f9f6732fe71e88f8f15d6d0df528c0a24cc1a6/include/GLSLANG/ShaderLang.h

Project Member Comment 30 by bugdroid1@chromium.org, Nov 18
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e67718d152e7390d6dcbc33209367becd8aa6ed6

commit e67718d152e7390d6dcbc33209367becd8aa6ed6
Author: zmo <zmo@chromium.org>
Date: Fri Nov 18 05:57:41 2016

Roll ANGLE 555009c..41f9f67

https://chromium.googlesource.com/angle/angle.git/+log/555009c..41f9f67

BUG=chromium:639760

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/2508233003
Cr-Commit-Position: refs/heads/master@{#433127}

[modify] https://crrev.com/e67718d152e7390d6dcbc33209367becd8aa6ed6/DEPS
[modify] https://crrev.com/e67718d152e7390d6dcbc33209367becd8aa6ed6/content/test/gpu/gpu_tests/webgl2_conformance_expectations.py
[modify] https://crrev.com/e67718d152e7390d6dcbc33209367becd8aa6ed6/gpu/config/gpu_driver_bug_list_json.cc

Status: Fixed
Sign in to add a comment