thanpv-lifortevn / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Spit out Core Language GLSL #933

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In an effort to switch from compatibility profile to core profile, and we need 
to spit of version 150 shaders.

A few things:

1) output "#version 150"
2) output "in" in place of "attribute"
3) output "in" in place of "varying" in fragment shaders
   output "out" in place of "varying" in vertex shaders
   (question: varyings can be read from and write to in bot vertex/fragment shaders.  Do we need to detect such cases and use "inout"?)
4) switch glFragColor/glFragData to webglFragColor/webglFragData and declare 
them as out if they are used.

Anything else?

Original issue reported on code.google.com by zmo@chromium.org on 2 Mar 2015 at 10:38

GoogleCodeExporter commented 9 years ago

Original comment by z...@google.com on 2 Mar 2015 at 10:39

GoogleCodeExporter commented 9 years ago
One more thing:

5) texture*D function maps to just texture.

Original comment by z...@google.com on 3 Mar 2015 at 1:25

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Zhenyao Mo <zmo@chromium.org>
Commit : 05b6b7fcdfe5de1b3b63ad268d100822f0c1a819

Code-Review  0 : Brandon Jones, Geoff Lang, Kenneth Russell, Olli Etuaho, 
Zhenyao Mo
Code-Review  +2: Jamie Madill
Verified     0 : Brandon Jones, Geoff Lang, Jamie Madill, Kenneth Russell, Olli 
Etuaho
Verified     +1: Zhenyao Mo
Commit Queue   : Chumped
Change-Id      : Iad70e1aebf82349d3fc5f4116c1d6bc4448193fd
Reviewed-at    : https://chromium-review.googlesource.com/255282

Add an SH_GLSL_CORE_OUTPUT profile.

So we could generate shaders for Apple using core GL profile.

By switching to core profile, we still pass most WebGL conformance tests 1.0.2 
on Linux, but not all, so apparently more work is needed.

However, I think it's OK to check this CL in because this output profile will 
be only used behind a chromium switch.

BUG=angleproject:933
TEST=webgl conformance tests

include/GLSLANG/ShaderLang.h
src/compiler/translator/CodeGen.cpp
src/compiler/translator/EmulatePrecision.cpp
src/compiler/translator/OutputESSL.cpp
src/compiler/translator/OutputGLSL.cpp
src/compiler/translator/OutputGLSL.h
src/compiler/translator/OutputGLSLBase.cpp
src/compiler/translator/OutputGLSLBase.h
src/compiler/translator/TranslatorESSL.cpp
src/compiler/translator/TranslatorESSL.h
src/compiler/translator/TranslatorGLSL.cpp
src/compiler/translator/TranslatorGLSL.h
src/compiler/translator/VersionGLSL.cpp
src/compiler/translator/VersionGLSL.h

Original comment by bugdro...@chromium.org on 3 Mar 2015 at 7:40

GoogleCodeExporter commented 9 years ago
Close it for now unless we realize more fuzzing needs to be done.

Original comment by z...@google.com on 3 Mar 2015 at 7:42

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Zhenyao Mo <zmo@chromium.org>
Commit : 019304886ad8b985d67202edec431407bb1b5c53

Code-Review  0 : Zhenyao Mo
Code-Review  +2: Jamie Madill
Verified     0 : Jamie Madill
Verified     +1: Zhenyao Mo
Commit Queue   : Chumped
Change-Id      : I548f1f6ae29760bf4251e5dadeac8a27a4027ceb
Reviewed-at    : https://chromium-review.googlesource.com/255585

Fix tests due to added output arg to Translator.

BUG=angleproject:933
TEST=angle_unittests

tests/compiler_tests/CollectVariables_test.cpp
tests/compiler_tests/DebugShaderPrecision_test.cpp

Original comment by bugdro...@chromium.org on 3 Mar 2015 at 8:49