diff options
author | Zhenyao Mo <zmo@chromium.org> | 2014-02-11 12:35:01 -0800 |
---|---|---|
committer | Zhenyao Mo <zmo@chromium.org> | 2014-02-12 23:21:53 +0000 |
commit | 4a667fe96e55df4713532e3830dd215ac7696f53 (patch) | |
tree | 01db4223e133e17c37beba3b072cb6eef96315d1 /include | |
parent | 32d508e2a78737add73bc9f057424d8b9faa7e5d (diff) | |
download | angle-4a667fe96e55df4713532e3830dd215ac7696f53.tar.gz |
Add an option to initialize varyings without static use in vertex shaders
ANGLEBUG=554
TEST=webgl conformance test on mac: shaders-with-varyings.html
r=kbr@chromium.org,nicolascapens@chromium.org
cc=alokp@chromium.org,shannonwoods@chromium.org
Change-Id: I2e692d43fb15f1cf3ade3e398020d1fedb2b32f0
Reviewed-on: https://chromium-review.googlesource.com/185922
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
Conflicts:
src/common/version.h
src/compiler/translator/Compiler.cpp
Change-Id: If7db13ef345bd6199d4ea0d7786f0de20885f2f3
Reviewed-on: https://chromium-review.googlesource.com/186144
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/GLSLANG/ShaderLang.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/include/GLSLANG/ShaderLang.h b/include/GLSLANG/ShaderLang.h index 1ff84dce..50a3c45d 100644 --- a/include/GLSLANG/ShaderLang.h +++ b/include/GLSLANG/ShaderLang.h @@ -212,8 +212,8 @@ typedef enum { // This flag limits the depth of the call stack. SH_LIMIT_CALL_STACK_DEPTH = 0x4000, - // This flag initializes gl_Position to vec4(0.0, 0.0, 0.0, 1.0) at - // the beginning of the vertex shader, and has no effect in the + // This flag initializes gl_Position to vec4(0,0,0,0) at the + // beginning of the vertex shader's main(), and has no effect in the // fragment shader. It is intended as a workaround for drivers which // incorrectly fail to link programs if gl_Position is not written. SH_INIT_GL_POSITION = 0x8000, @@ -224,6 +224,12 @@ typedef enum { // This is to work around a MacOSX driver bug that |b| is executed // independent of |a|'s value. SH_UNFOLD_SHORT_CIRCUIT = 0x10000, + + // This flag initializes varyings without static use in vertex shader + // at the beginning of main(), and has no effects in the fragment shader. + // It is intended as a workaround for drivers which incorrectly optimize + // out such varyings and cause a link failure. + SH_INIT_VARYINGS_WITHOUT_STATIC_USE = 0x20000, } ShCompileOptions; // Defines alternate strategies for implementing array index clamping. |