|
a5527071
|
2017-03-22T16:46:30
|
|
Add support for EXT_YUV_target
Add new sampler type "__samplerExternal2DY2YEXT"
to sample a YUV texture image and output color value
without any color conversion,
new additional type to specify color space standard formula and
built-in functions for yuv to rgb transformation.
Change-Id: I1780650fe84cd75191c1ca1e4118e89d585bfd92
Reviewed-on: https://chromium-review.googlesource.com/454697
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
817232ef
|
2017-02-22T18:36:10
|
|
Validate invariance of built-in variables when linking
According to ESSL 1.00.17 paragraph 4.6.4
BUG=angleproject:1876
Change-Id: I61e142c31dce11eec28fe240a9bc9ce2c632daf6
Reviewed-on: https://chromium-review.googlesource.com/446870
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
dfa75e87
|
2017-01-23T09:43:06
|
|
Add support for 4-parameter functions to BuiltInFunctionEmulator
New entry points are needed to support built-ins with more parameters.
Also, now that ops that are not function calls don't use the
TIntermAggregate class any more, it's easier to exclude nodes that are
not candidates for built-in emulation using a simple blacklist rather
than to use a whitelist.
Also includes function name style cleanup in BuiltInFunctionEmulator.
This will make it possible to add necessary emulation for built-ins
from ESSL 3.10.
BUG=angleproject:1730
TEST=angle_unittests
Change-Id: If267fc68f5cb9b2ee6703cbcbbe4d157da44a7e0
Reviewed-on: https://chromium-review.googlesource.com/431297
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
01d0ad08
|
2017-01-22T14:51:23
|
|
Add symbol table function to get TFunction for a built-in op
Built-in function parameter qualifiers are stored in the symbol table.
Some AST traversers need the qualifier information for ops to
determine whether a node is being written to. Add an utility function
that maps a TIntermAggregate node to a symbol table entry, so that the
traversers can get to this information in a convenient way.
This will be necessary for adding more built-ins that have out
parameters from ESSL 3.10.
BUG=angleproject:1730
TEST=angle_unittests
Change-Id: I4bc622d70b2326a04cc858ff1258c22320c590dc
Reviewed-on: https://chromium-review.googlesource.com/431109
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
16c745a3
|
2017-01-16T17:02:27
|
|
Split TIntermFunctionPrototype from TIntermAggregate
Function prototypes now have their own class TIntermFunctionPrototype.
It's only used for prototypes, not function parameter lists.
TIntermAggregate is still used for parameter lists and function calls.
BUGS=angleproject:1490
TEST=angle_unittests
Change-Id: I6e246ad00a29c2335bd2ab7f61cf73fe463b74bb
Reviewed-on: https://chromium-review.googlesource.com/427944
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
09b04a2f
|
2016-12-15T13:30:26
|
|
Add shader translator support for OVR_multiview
The OVR_multiview and OVR_multiview2 extensions add gl_ViewID_OVR to
shaders. gl_ViewID_OVR can be translated either as is in GLSL output
or as a uniform by setting the SH_TRANSLATE_VIEWID_OVR_AS_UNIFORM
compiler flag.
If WebGL output is selected, the shaders will be validated according
to proposed rules in the WEBGL_multiview spec.
BUG=angleproject:1669
TEST=angle_unittests
Change-Id: I19ea3a6c8b4edb78be03f1a50a96bfef018870d0
Reviewed-on: https://chromium-review.googlesource.com/422848
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
77ba408a
|
2016-12-16T12:01:18
|
|
Unify Diagnostics interface
Use the same kind of interface for reporting preprocessor errors as
for reporting regular compiler errors, and make global errors like
having too many uniforms also go through Diagnostics. Also don't
create std::string objects unnecessarily.
Includes cleanups of some dead code related to reporting errors.
BUG=angleproject:1670
TEST=angle_unittests
Change-Id: I3ee794d32ddeec1826bdf1b76b558f35259f82c0
Reviewed-on: https://chromium-review.googlesource.com/421527
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
d7b1ab58
|
2016-12-12T14:42:19
|
|
Fix up translator style.
Using git cl format.
BUG=angleproject:650
Change-Id: I7d3f98d2b0dcfb0a8de6c35327db74e55c28d761
Reviewed-on: https://chromium-review.googlesource.com/419059
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
28cb0368
|
2016-11-22T15:42:37
|
|
Check for misconfiguration of shader built-ins
Fail compiler initialization if the built-in resources are invalid.
This avoids creating zero-sized arrays out of built-ins into the
symbol table, which could later lead to asserts when these built-ins
were indexed by constants.
BUG=chromium:667468
TEST=angle_unittests
Change-Id: I9553c7c91ea355abb35b9cc6088ee14b40b0922b
Reviewed-on: https://chromium-review.googlesource.com/413037
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
29ab9ff8
|
2015-08-06T16:58:30
|
|
translator: fix a typo in comment
Change-Id: Ibfd39bc478c4e9ddf40138ccf6bd37f247f83632
Reviewed-on: https://chromium-review.googlesource.com/413036
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
1b896c62
|
2016-11-16T13:10:44
|
|
translator: remove code related to for-loop unrolling
For loop unrolling is not used and causes the translator fuzzer to find
a hang when unrolling tons of nested loops (duh).
Also remove MMap.h which was unused.
This is essentially a revert of https://codereview.appspot.com/4331048
BUG=chromium:665255
Change-Id: Id6940f7e306d4ed53bc992f751e9ffe733190f17
Reviewed-on: https://chromium-review.googlesource.com/412023
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
41f9f673
|
2016-11-16T17:04:36
|
|
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>
|
|
d7490967
|
2016-11-09T15:49:51
|
|
Fix linkage.html failures on Mac.
The failure is due to when we initialize variables to 0, we re-create
the struct TType, and it contains a different unique id from the
original struct TType, thus leading to a different hashed name.
BUG=chromium:641129
TEST=webgl_conformance,webgl2_conformance
Change-Id: I267b97fa496f55ea59dacee93af8f6a90f3e66cb
Reviewed-on: https://chromium-review.googlesource.com/409602
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
89dd8f37
|
2016-11-09T12:59:30
|
|
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>
|
|
b7bf7426
|
2016-11-08T14:44:05
|
|
Don't ouput "invarant" and "centroid" in GLSL 4.1 or older.
BUG=chromium:639760,chromium:641129
TEST=webgl2_conformance
Change-Id: I5fe87246eaea78888529d7b45b79399e6065daa9
Reviewed-on: https://chromium-review.googlesource.com/408569
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
|
|
acb4b81a
|
2016-11-07T13:50:29
|
|
translator: Put ShaderLang APIs in "sh" namespace.
Working with glslang in Vulkan means we are static linking libANGLE
with functions that have the same name as our translator APIs. We
can fix this by scoping our APIs. We don't need to scope the types
of the file, since they don't conflict.
This will require a follow-up patch to remove the unscoped APIs
once we switch over Chromium.
We also scope TCompiler and some related classes to avoid multiply
defined link errors with glslang.
BUG=angleproject:1576
Change-Id: I729b19467d2ff7d374a82044b16dbebdf2dc8f16
Reviewed-on: https://chromium-review.googlesource.com/408337
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b990b55e
|
2016-10-27T12:29:17
|
|
Clean up temporary variable usage in ScalarizeVecAndMatConstructorArgs
Use common helper functions instead of manually creating temporary
variable nodes. Also clean up the interface provided by the traverser.
BUG=angleproject:1597
Test=WebGL conformance tests
Change-Id: Ifd8d3815ff9e75e1a2040d65db9d4b3d6a9a9273
Reviewed-on: https://chromium-review.googlesource.com/403950
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
1df16022
|
2016-10-27T08:16:56
|
|
TranslatorGLSL: collect variables when flattening pramga invariant all
BUG=chromium:659472
Change-Id: Icfeada9f09fff5d28eb3f4fafb2c94d57598af1f
Reviewed-on: https://chromium-review.googlesource.com/403849
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
705a9194
|
2016-08-29T10:05:27
|
|
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>
|
|
c5fa0ad5
|
2016-10-25T21:36:54
|
|
Revert "Remove invariant qualifier for input in fragment shader"
This reverts commit d842a6b2014447db0676c8a3f5a5e9ae4ce67d9a.
Because of WebglConformance_conformance_glsl_bugs_invariant_does_not_leak_across_shaders failure
BUG=chromium:659326
Change-Id: I0602e24f3d34ccf852cda865f673c5c7634f82a6
Reviewed-on: https://chromium-review.googlesource.com/403230
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
|
|
d842a6b2
|
2016-08-29T10:05:27
|
|
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>
|
|
2cc85b3b
|
2016-08-05T16:22:53
|
|
Add support for images in the compiler
The patch adds support for GLSL ES 3.1 image types.
Internal format layout qualifiers for images are added.
Support for the readonly and writeonly qualifiers are added. The other
memory qualifiers are omitted as to make the patch simpler.
Tests are added which check for correct and incorrect usage of images,
internal format layout and memory qualifiers.
BUG=angleproject:1442
TEST=angle_unittests
TEST=angle_end2end_tests
Change-Id: Ie4d3acb2a195de11b405ad54110a04c4c1de0b7e
Reviewed-on: https://chromium-review.googlesource.com/378855
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
b2792db1
|
2016-10-07T11:21:09
|
|
translator: Reject invalid combination of compile flags
ADD_AND_TRUE_TO_LOOP_CONDITION breaks loop unrolling because LoopInfo
expects the loop condition to have been validated to be "symbol < constant"
and stayed that way.
BUG=chromium:653454
BUG=chromium:653694
Change-Id: I2057fde3a308623bd2dd7571ee878dd42b1fdac3
Reviewed-on: https://chromium-review.googlesource.com/395306
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
336b1470
|
2016-10-05T16:37:55
|
|
Split TIntermFunctionDefinition from TIntermAggregate
This makes the code easier to understand. Function definition nodes
always have just two children, the parameters node and the function
body node, so there was no proper reason why they should be aggregate
nodes.
As a part of this change, intermediate output is modified to print
symbol table ids of functions so that debugging function id related
functionality will be easier in the future.
After this patch, TIntermAggregate is still used for function
prototypes, function parameter lists, function calls, variable and
invariant declarations and the comma (sequence) operator.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: Ib88b4ca5d21abd5f126836ca5900d0baecabd19e
Reviewed-on: https://chromium-review.googlesource.com/394707
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
7835b525
|
2016-10-08T11:20:17
|
|
Reland "Add workaround for unused std140 and shared uniform blocks on MacOS"
On some Mac drivers with shader version 4.1, they will
treat unused std140 and shared uniform blocks' members as inactive. However,
WebGL2.0 based on OpenGL ES3.0.4 requires all members of a named uniform block
declared with a shared or std140 layout qualifier to be considered active.
The uniform block itself is also considered active.
This workaround is to reference all members of unused std140 and shared uniform blocks
at the beginning of the vertex/fragment shader's main().
BUG=chromium:618464
TEST=UniformBufferTest.ActiveUniformBlockNumber
Change-Id: I18da4e2b61b0170068bf5ea38ce54667b0737780
Reviewed-on: https://chromium-review.googlesource.com/395648
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
bd674557
|
2016-10-06T13:28:42
|
|
Separate function info from TIntermAggregate
This change will make it easier to split types of TIntermAggregate
nodes representing functions and function calls into different node
classes.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I730aa7858fe31fda86218fc685980c6ad486f5e0
Reviewed-on: https://chromium-review.googlesource.com/394706
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
6d40bbdd
|
2016-09-30T13:49:38
|
|
Split TIntermBlock from TIntermAggregate
The new TIntermBlock node class replaces TIntermAggregate nodes with
the EOpSequence op. It represents the root node of the tree which is
a list of declarations and function definitions, and any code blocks
that can be denoted by curly braces. These include function and loop
bodies, and if-else branches.
This change enables a bunch of more compile-time type checking, and
makes the AST code easier to understand and less error-prone.
The PostProcess step that used to be done to ensure that the root node
is TIntermAggregate is removed in favor of making sure that the root
node is a TIntermBlock in the glslang.y parsing code.
Intermediate output formatting is improved to print the EOpNull error
in a clearer way.
After this patch, TIntermAggregate is still used for function
definitions, function prototypes, function parameter lists, function
calls, variable and invariant declarations and the comma (sequence)
operator.
BUG=angleproject:1490
TEST=angle_unittests, angle_end2end_tests
Change-Id: I04044affff979a11577bc1fe75d747e538b799c8
Reviewed-on: https://chromium-review.googlesource.com/393726
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
d569619d
|
2016-10-06T11:09:24
|
|
translator: Fail compilation if precision emu unsupported.
The fuzzer uncovered a case where we were trying to emulate precision
on HLSL 3.0, causing an ASSERT crash.
BUG=chromium:653276
Change-Id: I2e666a1ff4f605541e25f04264146063559cb835
Reviewed-on: https://chromium-review.googlesource.com/394237
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
c9e6026c
|
2016-09-30T17:15:07
|
|
Revert "Add workaround for unused std140 and shared uniform blocks on MacOS"
This reverts commit 9aa83fe302578d226f195fff5fb3f0e2fb723a4c.
The new test UniformBufferTest.ActiveUniformNumberAndName/ES3_OPENGL is failing on multiple platforms. Examples:
https://build.chromium.org/p/chromium.gpu.fyi/builders/Mac%2010.10%20Release%20%28ATI%29/builds/12285
https://build.chromium.org/p/chromium.gpu.fyi/builders/Linux%20Release%20(ATI)
Change-Id: I78b1a4d58e9a291e40ad304eb32f990e0518f7ee
Reviewed-on: https://chromium-review.googlesource.com/391049
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
9aa83fe3
|
2016-09-29T08:42:42
|
|
Add workaround for unused std140 and shared uniform blocks on MacOS
On some Mac drivers with shader version 4.1, they will
treat unused std140 and shared uniform blocks' members as inactive. However,
WebGL2.0 based on OpenGL ES3.0.4 requires all members of a named uniform block
declared with a shared or std140 layout qualifier to be considered active.
The uniform block itself is also considered active.
This workaround is to reference all members of unused std140 and shared uniform blocks
at the beginning of the vertex/fragment shader's main().
BUG=chromium:618464
TEST=UniformBufferTest.ActiveUniformBlockNumber
Change-Id: I1d2c5e3e8da04786ac6a37fd26f7bb9c14cd76ed
Reviewed-on: https://chromium-review.googlesource.com/387169
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
8b28a8b0
|
2016-09-15T19:47:56
|
|
translator/Compiler.cpp: fixup includes
A stray iostream got introduced in
28b6528ca2119d6715bb5e9eafa5a2dc8c968361
BUG=angleproject:1522
Change-Id: Ib0b14b47d4786309ec2d39acb5531f3772b91f20
Reviewed-on: https://chromium-review.googlesource.com/386256
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
28b6528c
|
2016-06-16T07:24:50
|
|
Add a fuzzer for the shader translator.
BUG=angleproject:1522
Change-Id: Idbe8194ba478366e99c7460d403d03fe27dd89d0
Reviewed-on: https://chromium-review.googlesource.com/353153
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
09cfac60
|
2016-09-06T17:25:16
|
|
Work around For and While loop bugs on Intel Mac OSX
Condition calculation in for and while loops has bug on Intel Mac. Work
around it by converting "CONDITION" to "CONDITION && true".
This CL also adds previous SH_EMULATE_ABS_INT_FUNCTION workaround to
the ANGLE GL back-end on OSX
BUG=chromium:644669
TEST=deqp/functional/gles3/shaderloop_for/while.html
Change-Id: I910f662b054f259fcb601b9938841b3a2d066840
Reviewed-on: https://chromium-review.googlesource.com/381678
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Qiankun Miao <qiankun.miao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
7ebb97fc
|
2016-09-08T18:01:50
|
|
Use 64-bits compile options
BUG=chromium:645071
Change-Id: I31825123bf4cb45fb37a93f538e8936487beb5ff
Reviewed-on: https://chromium-review.googlesource.com/382712
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
966456de
|
2016-09-12T11:42:44
|
|
Remove SH_TIMING_RESTRICTIONS compiler flag
The timing restrictions code is not in use and not updated for ESSL3,
so it is better to remove it to make refactoring the AST easier.
It can also be argued that perfect prevention of shader timing attacks
is not feasible due to factors that are not under control of ANGLE,
such as fixed function color compression in GPUs. Such color
compression may make the use of texture bandwidth and thus performance
dependent on the content of a texture regardless of whether a
compressed format is chosen through the API.
SH_DEPENDENCY_GRAPH flag that could only be active together with the
timing restrictions flag is also removed, along with all the code that
was supporting it. The newer CallDAG code is used for different
purposes and is kept.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I2cd10e18df366e8e43f7c3af1ca12d2a4bfb2007
Reviewed-on: https://chromium-review.googlesource.com/384511
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
f119a263
|
2016-08-19T15:54:22
|
|
Clean up unary and aggregate math folding
Prefer asserts instead of adding internal errors to the compiler log
when types of arguments are not as expected or the folding function
runs into an operation it can't handle. Neither of these cases should
be possible, the checks for correct argument types are solid at this
point.
In the future, when new built-in functions are added, constant folding
support for them should be added as well.
foldUnaryWithDifferentReturnType and foldUnaryWithSameReturnType are
renamed to foldUnaryNonComponentWise and foldUnaryComponentWise
respectively. These names better reflect what these functions are
doing.
The info sink member is removed from TIntermediate, since TDiagnostics
is now passed into the functions that may generate warnings instead.
BUG=angleproject:1490
TEST=angle_unittests
Change-Id: I6a08abbe29cf23f3a318032fdc46dd3dbaf4410e
Reviewed-on: https://chromium-review.googlesource.com/377959
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
4a9cd800
|
2016-09-01T16:51:51
|
|
Refactor type_specifier_nonarray parsing to reduce code repetition
When type_specifier_nonarray gets parsed the scope gets saved into
TType and the code becomes repetitive. Setting of the scope is moved
to type_specifier_no_prec as it occurs less times.
BUG=angleproject:911
TEST=angle_unittests
TEST=angle_end2end_tests
Change-Id: I6da5fe7bc2d60ba2996221af71b719b818f5e9b1
Reviewed-on: https://chromium-review.googlesource.com/380535
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
c2c5fc48
|
2016-08-31T15:24:22
|
|
Remove CSS Shader related code
CSS shader has been removed from spec and chrome code base. Remove the
code in ANGLE.
BUG=chromium:233383
Change-Id: I93a35437f540e51ce7af9d49f21ca60d7c0b156a
Reviewed-on: https://chromium-review.googlesource.com/378739
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
|
|
f69682be
|
2016-08-16T14:50:42
|
|
Add unittests to verify invariant doesn't leak
This is a followup CL of
https://chromium-review.googlesource.com/366720. Unittests is added to
check invariant status does not leak across shaders.
This CL also moves mInvariantVaryings and mGlobalInvariant from
TSymbolTable to TSymbolTableLevel. So at the end of a compilation, the
levels pop, and the settings will be cleared and will not affect the
next compilation.
Change-Id: I1199fade7a637276ab149ab9a599621b9977298b
Reviewed-on: https://chromium-review.googlesource.com/370844
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
bccc65d3
|
2016-07-19T16:48:43
|
|
Flatten "#pragma STDGL invariant(all)" into varying variables.
This is implemented as a compiler option which is enabled by default
when outputting to desktop GLSL version 130 and greater, which does
not support this #pragma in fragment shaders. As a workaround, and for
better compatibility on desktop OpenGL drivers, this pragma is also
flattened into the outputs of vertex shaders, and the inputs of ESSL
1.00 fragment shaders.
TEST=conformance/glsl/misc/shaders-with-invariance.html with --enable-unsafe-es3-apis
BUG=629622, angleproject:1293
Change-Id: Ib040230915e639971505ed496d26e804c9d64e68
Reviewed-on: https://chromium-review.googlesource.com/361792
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
|
|
583c4d2a
|
2016-08-05T17:58:40
|
|
Invariant qualifier should not leak across shaders
Change-Id: I2a35899bffd28767b8bc638f415857636d4ad8ef
Reviewed-on: https://chromium-review.googlesource.com/366720
Commit-Queue: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
4e94fea8
|
2016-08-09T14:31:37
|
|
Emulate gl_FragColor broadcasting behavior when GL_EXT_draw_buffers is
enabled.
BUG=angleproject:1467,635433
TEST=WebGL conformance, angle_unittests
Change-Id: I9eb4ce715732087a3786da886f42243716f2b9b2
Reviewed-on: https://chromium-review.googlesource.com/367532
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
802abe01
|
2016-08-04T17:48:32
|
|
Add compute shader compilation support in the glsl compiler
Support is added for compute shader compilation. There is a small
extension to the parser so that 'local_size_x = ', 'local_size_y = '
and 'local_size_z = ' are supported as layout qualifiers.
A few shader compilation tests are added and one which checks the AST
whether the layout qualifiers are properly parsed.
BUG=angleproject:1442
TEST=angle_unittests
TEST=angle_end2end_tests
Change-Id: I67283797d1cf13fa4ac47faa2a6e66d93a2db867
Reviewed-on: https://chromium-review.googlesource.com/362300
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
e93d24ef
|
2016-07-28T12:06:05
|
|
Add es3.1 shader constants
The patch adds all shader built-in constants.
BUG=angleproject:1442
TEST=angle_unittests
TEST=angle_end2end_tests
Change-Id: I81cae479d6506a8faa2dce023d5fcc2c1291d521
Reviewed-on: https://chromium-review.googlesource.com/364460
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
f178d0bd
|
2016-07-23T06:59:00
|
|
Fix output variable gl_FragData array size issue.
If the GL_EXT_draw_buffers extension isn't explicitly enabled in the shader,
then gl_FragData is an array of size 1, not of size max_draw_buffers.
BUG=angleproject:1441
TEST=webgl2_conformance with --use-gl=angle
Change-Id: I2ead1457462bf1f396fda1f47022df6b54612e17
Reviewed-on: https://chromium-review.googlesource.com/362781
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
|
|
f931268f
|
2016-07-22T12:51:31
|
|
Handle initializing of struct typed output variable correctly.
BUG=angleproject:1441
TEST=webgl2 conformance
Change-Id: Idb27036347e1e814ba4603969cc2065e425ac4aa
Reviewed-on: https://chromium-review.googlesource.com/362641
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
27776e33
|
2016-07-22T14:00:56
|
|
Fix member variable masking warning in standalone MSVS build
The patch for initializing output variables introduced a warning that
broke MSVS 2015 standalone build. The "shaderType" variable passed to
TCompiler::initializeOutputVariables was unnecessary and had the same
name as a member variable of TCompiler that stores the shader type.
TEST=MSVS 2015 build
Change-Id: I9e01f5eae77a88babde21d4864a02c8731a220de
Reviewed-on: https://chromium-review.googlesource.com/362550
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
72111915
|
2016-07-20T17:45:56
|
|
Initialize all output variables.
BUG=angleproject:1441
TEST=bots
Change-Id: Ia4cf415d8346c3234bf0f548a178ee3ea8cd35c4
Reviewed-on: https://chromium-review.googlesource.com/362110
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
|
|
1be913cf
|
2016-07-11T17:59:16
|
|
Add support for ES31 context creation
The dEQP test for context creation passes.
SH_WEBGL3_SPEC has been added, but it should be considered whether we
should keep it, remove it or rename it. It was added so that there is
a webgl mapping to es 310 shaders. Check Compiler.cpp. The bison file
has been modified so that some tokens from es3 can be also used in
es31 as well.
A separate macro ES3_1_ONLY is added so that some tokens are limited
only for es 310 shaders.
BUG=angleproject:1442
TEST=angle_unittests
Change-Id: I2e5ca227c96046c30dc796ab934f3fda9c533eba
Reviewed-on: https://chromium-review.googlesource.com/360300
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
8bad46d4
|
2016-07-01T19:52:52
|
|
The global invariant pragma must not leak across compilations.
BUG=chromium:625363
TEST=conformance/glsl/bugs/global-invariant-does-not-leak-across-shaders.html
Change-Id: I66389352b92211f4d7967772f68470c8e93405bd
Reviewed-on: https://chromium-review.googlesource.com/358515
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Kenneth Russell <kbr@chromium.org>
|
|
7e1200b4
|
2016-07-05T02:25:13
|
|
Revert "The global invariant pragma must not leak across compilations."
This reverts commit ae2e19188cf0a9b035a27143f585df10e72ffabd.
Change-Id: I017ba4ba9baa633793d7bdd9691c580ed7016cde
Reviewed-on: https://chromium-review.googlesource.com/358410
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
ae2e1918
|
2016-07-01T19:52:52
|
|
The global invariant pragma must not leak across compilations.
BUG=chromium:625363
TEST=conformance/glsl/bugs/global-invariant-does-not-leak-across-shaders.html
Change-Id: Ie8d38e44837fc87bb4c94e76e779ad41e8b79957
Reviewed-on: https://chromium-review.googlesource.com/358203
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Zhenyao Mo <zmo@chromium.org>
|
|
438dbcf1
|
2016-06-17T14:20:05
|
|
translator: Fix builtin function emulator use-after-free.
We were calling the global pool allocator in the builtin function
emulator, which would lead to us freeing TTypes that were still
referenced. Fix this by using the TCache which was designed for
such a purpose, and locking the allocator around the builtin
function emulator to try and prevent similar bugs from creeping
in.
Eventually we would like to get rid of the global allocator and
replace it with different pools in different contexts, which are
managed more safely.
BUG=620937
Change-Id: If501ff6ea4d9bf8a2b8f89f2c94a01386f79ee3a
Reviewed-on: https://chromium-review.googlesource.com/353671
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
|
|
b66a9097
|
2016-05-16T15:59:14
|
|
Add support for OES_EGL_image_external and OES_EGL_image_external_essl3.
BUG=angleproject:1372
Change-Id: I8489e7fd0ab409b0775041ad5e9fbf0aab53886d
Reviewed-on: https://chromium-review.googlesource.com/344734
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Geoff Lang <geofflang@chromium.org>
|
|
3d932d83
|
2016-04-12T11:10:30
|
|
Defer global initializers when necessary
Move global variable initializers that are not constant expressions to
a function that gets called at the start of main(). This is done
with an AST transformation. This needs to be done because global
variable initializers must be constant in native GL, but ANGLE is more
lenient with what can be put into ESSL 1.00 global initializers to
remain compatible with legacy WebGL content.
Non-constant global variable initializers also caused issues in HLSL
output, since in HLSL output some types of expressions get unfolded
into multiple statements. These include short-circuiting operators and
array initialization. To make sure that these cases are covered, any
initializers that can't be constant folded are deferred, even if they
have the const qualifier.
The old deferring mechanism in OutputHLSL is removed in favor of this
new AST transformation based approach.
BUG=angleproject:819
BUG=angleproject:1205
BUG=angleproject:1350
BUG=596616
TEST=WebGL conformance test
conformance/glsl/misc/global-variable-init.html
Change-Id: I039cc05d6b8c284baeefbdf7f10062cae4bc5716
Reviewed-on: https://chromium-review.googlesource.com/338291
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
19d1dc99
|
2016-03-08T17:18:46
|
|
Add option to limit the number of function parameters
Trying to compile user-defined functions that have thousands of
parameters introduces some instability in native compilers, so it is
better to reject shaders with large numbers of function parameters
in ANGLE.
The check is only enabled if the SH_LIMIT_EXPRESSION_COMPLEXITY flag
is turned on. The default limit for the number of parameters is 1024,
but it can also be configured.
BUG=angleproject:1338
TEST=angle_unittests
Change-Id: I5c9b7a4e97e67f36e77f969368336fa8fffba1c3
Reviewed-on: https://chromium-review.googlesource.com/331970
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
|
|
924b7de2
|
2016-01-21T13:54:28
|
|
Always write to gl_Position when compiling shaders with
SH_GLSL_COMPATIBILITY_OUTPUT.
BUG=angleproject:1277
Change-Id: Ib820a46151637e8c61e94b966b970de46ccca6b9
Reviewed-on: https://chromium-review.googlesource.com/323160
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Tested-by: Ian Ewell <ewell@google.com>
|
|
792a41d1
|
2015-12-15T12:39:16
|
|
Fix missing newline from "Missing main()" error message
Change-Id: Id28e20097fc2c66117c688425c73df731afecbe3
Reviewed-on: https://chromium-review.googlesource.com/318431
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
0469479f
|
2015-12-07T15:52:05
|
|
Compiler: remove dead code in limitExpressionComplexity
TGraphTraverser is a class that does nothing by itself so the for loop
was a noop statement and has been for at least two years (since
17732823f9c2, didn't check earlier).
BUG=angleproject:591
Change-Id: I1919059fcb8987c2f043a71fed6223e16bc014d8
Reviewed-on: https://chromium-review.googlesource.com/316600
Tryjob-Request: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
8a76dcc7
|
2015-12-10T20:25:12
|
|
Don't try to apply ForLoopUnroll to loops it can't handle
ForLoopUnroll should only mark loops that fit the limitations in ESSL
1.00 Appendix A.
BUG=angleproject:1253
TEST=angle_unittests, WebGL conformance tests
Change-Id: I00b0a7d29cd42efea9611d020aa1f873ac04773f
Reviewed-on: https://chromium-review.googlesource.com/317551
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
183d7e24
|
2015-11-20T15:59:09
|
|
Remove predefined precision qualifiers from ESSL3 samplers
New sampler types in ESSL3 should not have default precision qualifiers.
This is specified in ESSL 3.00.4 section 4.5.4.
BUG=angleproject:1222
TEST=angle_unittests
Change-Id: I9c8e7a5fbb4278db80de79bcaeebaf23e64242a0
Reviewed-on: https://chromium-review.googlesource.com/312048
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
e1a94c67
|
2015-11-16T17:35:25
|
|
Check that texture offset is constant and valid
Offset passed to textureOffset and similar functions must be constant.
See ESSL 3.00 spec section 8.8.
It must also be in the valid range between MIN_PROGRAM_TEXEL_OFFSET and
MAX_PROGRAM_TEXEL_OFFSET. Using values outside the valid range makes
the results of the texture lookup undefined, as specified in GLES 3.0.4
section 3.8.10. We generate a compiler error if an offset is outside the
valid range.
BUG=angleproject:1215
TEST=angle_unittests
Change-Id: Ida28361444d2f4050d516160f1491674c31868a1
Reviewed-on: https://chromium-review.googlesource.com/312223
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
5d91dda9
|
2015-06-18T15:47:46
|
|
Remove dynamic indexing of matrices and vectors in HLSL
Re-re-relanding after clang warning fix.
Re-re-landing with fix to setting qualifiers on generated nodes. The
previous version failed when a uniform was indexed, because it would
set the uniform qualifier on some of the generated nodes and that
interfered with the operation of UniformsHLSL.
Re-landing after fixing D3D9 specific issues.
HLSL doesn't support dynamic indexing of matrices and vectors, so replace
that with helper functions that unroll dynamic indexing into switch/case
and static indexing.
Both the indexed vector/matrix expression and the index may have side
effects, and these will be evaluated correctly. If necessary, index
expressions that have side effects will be written to a temporary
variable that will replace the index.
Besides dEQP tests, this change is tested by a WebGL 2 conformance test.
In the case that a dynamic index is out-of-range, the base ESSL 3.00 spec
allows undefined behavior. KHR_robust_buffer_access_behavior adds the
requirement that program termination should not occur and that
out-of-range reads must return either a value from the active program's
memory or zero, and out-of-range writes should only affect the active
program's memory or do nothing. This patch clamps out-of-range indices so
that either the first or last item of the matrix/vector is accessed.
The code is not transformed in case the it fits within the limited subset
of ESSL 1.00 given in Appendix A of the spec. If the code isn't within
the restricted subset, even ESSL 1.00 shaders may require this
workaround.
BUG=angleproject:1116
TEST=dEQP-GLES3.functional.shaders.indexing.* (all pass after change)
WebGL 2 conformance tests (glsl3/vector-dynamic-indexing.html)
Change-Id: I9f6d7c7ecda8ac4dc3c30b39e15a9a0b5381c5a8
Reviewed-on: https://chromium-review.googlesource.com/310010
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
a5f64de7
|
2015-10-30T12:31:00
|
|
Revert "Remove dynamic indexing of matrices and vectors in HLSL"
Failing build on Clang-win:
..\..\third_party\angle\src\compiler\translator\RemoveDynamicIndexing.cpp(128,43) : error: expected '(' for function-style cast or type construction
fieldType.setPrimarySize(unsigned char(indexedType.getRows()));
~~~~~~~~ ^
BUG=angleproject:1116
This reverts commit 7535b761dd4740c8e76b888d7c58c7cbeefd2083.
Change-Id: I7b502e3dcd45e17b7ed88fec18be702614d9ac65
Reviewed-on: https://chromium-review.googlesource.com/309772
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
7535b761
|
2015-06-18T15:47:46
|
|
Remove dynamic indexing of matrices and vectors in HLSL
Re-re-landing with fix to setting qualifiers on generated nodes. The
previous version failed when a uniform was indexed, because it would
set the uniform qualifier on some of the generated nodes and that
interfered with the operation of UniformsHLSL.
Re-landing after fixing D3D9 specific issues.
HLSL doesn't support dynamic indexing of matrices and vectors, so replace
that with helper functions that unroll dynamic indexing into switch/case
and static indexing.
Both the indexed vector/matrix expression and the index may have side
effects, and these will be evaluated correctly. If necessary, index
expressions that have side effects will be written to a temporary
variable that will replace the index.
Besides dEQP tests, this change is tested by a WebGL 2 conformance test.
In the case that a dynamic index is out-of-range, the base ESSL 3.00 spec
allows undefined behavior. KHR_robust_buffer_access_behavior adds the
requirement that program termination should not occur and that
out-of-range reads must return either a value from the active program's
memory or zero, and out-of-range writes should only affect the active
program's memory or do nothing. This patch clamps out-of-range indices so
that either the first or last item of the matrix/vector is accessed.
The code is not transformed in case the it fits within the limited subset
of ESSL 1.00 given in Appendix A of the spec. If the code isn't within
the restricted subset, even ESSL 1.00 shaders may require this
workaround.
BUG=angleproject:1116
TEST=dEQP-GLES3.functional.shaders.indexing.* (all pass after change)
WebGL 2 conformance tests (glsl3/vector-dynamic-indexing.html)
Change-Id: I16119f9092360fb72798f9550a6f4d3cfffdc92f
Reviewed-on: https://chromium-review.googlesource.com/308790
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
|
|
b066669d
|
2015-10-26T10:38:18
|
|
Revert "Remove dynamic indexing of matrices and vectors in HLSL"
This reverts commit 3766a40d6fda7e7190514ab7838a3f37169d863f.
This CL was causing crashes in UniformHLSL.cpp, where an internal
uniform "base" was attempted to be declared in HLSL. Was crashing
on an external WebGL 3D canvas page (http://www.taccgl.org/?dbg=t).
BUG=546686
Original commit message:
Re-landing after fixing D3D9 specific issues.
HLSL doesn't support dynamic indexing of matrices and vectors, so replace
that with helper functions that unroll dynamic indexing into switch/case
and static indexing.
Both the indexed vector/matrix expression and the index may have side
effects, and these will be evaluated correctly. If necessary, index
expressions that have side effects will be written to a temporary
variable that will replace the index.
Besides dEQP tests, this change is tested by a WebGL 2 conformance test.
In the case that a dynamic index is out-of-range, the base ESSL 3.00 spec
allows undefined behavior. KHR_robust_buffer_access_behavior adds the
requirement that program termination should not occur and that
out-of-range reads must return either a value from the active program's
memory or zero, and out-of-range writes should only affect the active
program's memory or do nothing. This patch clamps out-of-range indices so
that either the first or last item of the matrix/vector is accessed.
The code is not transformed in case the it fits within the limited subset
of ESSL 1.00 given in Appendix A of the spec. If the code isn't within
the restricted subset, even ESSL 1.00 shaders may require this
workaround.
BUG=angleproject:1116
TEST=dEQP-GLES3.functional.shaders.indexing.* (all pass after change)
WebGL 2 conformance tests (glsl3/vector-dynamic-indexing.html)
Change-Id: I1d4b2e3888e91af7d5eebf743d12778698b6b903
Reviewed-on: https://chromium-review.googlesource.com/308770
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
a6996685
|
2015-10-12T14:32:30
|
|
Automatically enable highp in fragment shaders on ESSL3
Most code using the translator already enables highp with the resources
flag when a shader spec that accepts ESSL3 is used, but for example the
shader_translator utility doesn't. This fix makes sure that highp is
always enabled when a fragment shader written in ESSL3 or newer is being
compiled. This will make shader_translator easier to use for testing
ESSL3 shaders.
BUG=541550
TEST=angle_unittests
Change-Id: Ia1911677c55f3c5d921829a8cbb808847ac8b636
Reviewed-on: https://chromium-review.googlesource.com/305190
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
d4b5054d
|
2015-09-28T12:19:26
|
|
compiler: Rewrite do-while loops as while loops
This works around a Mac driver shader compiler bug that makes many
do-while loops cause GPU-hangs when ran.
BUG=angleproject:891
Change-Id: I29828d6ea9e887ad0ed0c577f1deb41fb632a900
Reviewed-on: https://chromium-review.googlesource.com/302465
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
3766a40d
|
2015-06-18T15:47:46
|
|
Remove dynamic indexing of matrices and vectors in HLSL
Re-landing after fixing D3D9 specific issues.
HLSL doesn't support dynamic indexing of matrices and vectors, so replace
that with helper functions that unroll dynamic indexing into switch/case
and static indexing.
Both the indexed vector/matrix expression and the index may have side
effects, and these will be evaluated correctly. If necessary, index
expressions that have side effects will be written to a temporary
variable that will replace the index.
Besides dEQP tests, this change is tested by a WebGL 2 conformance test.
In the case that a dynamic index is out-of-range, the base ESSL 3.00 spec
allows undefined behavior. KHR_robust_buffer_access_behavior adds the
requirement that program termination should not occur and that
out-of-range reads must return either a value from the active program's
memory or zero, and out-of-range writes should only affect the active
program's memory or do nothing. This patch clamps out-of-range indices so
that either the first or last item of the matrix/vector is accessed.
The code is not transformed in case the it fits within the limited subset
of ESSL 1.00 given in Appendix A of the spec. If the code isn't within
the restricted subset, even ESSL 1.00 shaders may require this
workaround.
BUG=angleproject:1116
TEST=dEQP-GLES3.functional.shaders.indexing.* (all pass after change)
WebGL 2 conformance tests (glsl3/vector-dynamic-indexing.html)
Change-Id: I66a5e5a8d7f4267da0045f1cc2ba6b0dc7eb3f5d
Reviewed-on: https://chromium-review.googlesource.com/296671
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
3c192a78
|
2015-08-26T20:32:53
|
|
Revert "Remove dynamic indexing of matrices and vectors in HLSL"
Seems to be failing a WebGL/ES2 CTS test in D3D9:
conformance/ogles/GL/mat3/mat3_001_to_006
BUG=angleproject:1116
BUG=525188
This reverts commit 83f3411da456faac8570892e3dd7d76edf4095e5.
Change-Id: Ic186f51240dbdd96ccab3f5470329cdc9727c618
Reviewed-on: https://chromium-review.googlesource.com/295730
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
83f3411d
|
2015-06-18T15:47:46
|
|
Remove dynamic indexing of matrices and vectors in HLSL
HLSL doesn't support dynamic indexing of matrices and vectors, so replace
that with helper functions that unroll dynamic indexing into switch/case
and static indexing.
Both the indexed vector/matrix expression and the index may have side
effects, and these will be evaluated correctly. If necessary, index
expressions that have side effects will be written to a temporary
variable that will replace the index.
Besides dEQP tests, this change is tested by a WebGL 2 conformance test.
In the case that a dynamic index is out-of-range, the base ESSL 3.00 spec
allows undefined behavior. KHR_robust_buffer_access_behavior adds the
requirement that program termination should not occur and that
out-of-range reads must return either a value from the active program's
memory or zero, and out-of-range writes should only affect the active
program's memory or do nothing. This patch clamps out-of-range indices so
that either the first or last item of the matrix/vector is accessed.
The code is not transformed in case the it fits within the limited subset
of ESSL 1.00 given in Appendix A of the spec. If the code isn't within
the restricted subset, even ESSL 1.00 shaders may require this
workaround.
BUG=angleproject:1116
TEST=dEQP-GLES3.functional.shaders.indexing.* (all pass after change)
WebGL 2 conformance tests (glsl3/vector-dynamic-indexing.html)
Change-Id: I024722ef4ca1e14d5ad47fdc540397e18858bed6
Reviewed-on: https://chromium-review.googlesource.com/290515
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
4dfe8094
|
2015-08-21T17:44:35
|
|
Always collect variables when generating HLSL
HLSL output needs uniform information generated by the collectVariables()
step to be able to write uniform registers.
Tested manually by compiling a shader with a uniform with
shader_translator.
BUG=angleproject:1132
Change-Id: I91d19b5fa789b7b33cf76a654ffbbd17d279db01
Reviewed-on: https://chromium-review.googlesource.com/294962
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
a7b6db7f
|
2015-08-19T14:26:30
|
|
Only apply Appendix A limitations to ESSL 1.00 shaders
ESSL 1.00 specifies a set of minimum functionality, and ANGLE
automatically checks that WebGL shaders stay within this minimum
functionality. However, this should only apply to ESSL 1.00. ESSL 3.00
shaders compiled for WebGL 2.0 should not be subject to these
restrictions, since there is no similar spec for minimum functionality
for ESSL 3.00.
In case a non-WebGL based shader spec is used, the restrictions can be
toggled from outside by specifying the SH_VALIDATE_LOOP_INDEXING flag,
same as before this patch.
BUG=angleproject:1116
TEST=WebGL 2 conformance tests
Change-Id: Idaec0fb4c7c85cd72020d0b23112fddb1b020571
Reviewed-on: https://chromium-review.googlesource.com/293933
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
4d61f7ed
|
2015-08-12T10:56:50
|
|
Reland Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'
Additional warnings found with more testing and added C4267 warning disable only for angle_libpng
BUG=angleproject:1120
Change-Id: Ic403dcff5a8018056fa51a8c408e64207f3362eb
Reviewed-on: https://chromium-review.googlesource.com/293028
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
b195643c
|
2015-08-12T17:35:20
|
|
Revert "Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'"
Seems to have quite a few warnings in 64-bit on my machine.
BUG=angleproject:1120
This reverts commit c5cf9bc47d0ee028adbbf9e9f94ca567eec601dc.
Change-Id: I86768b900aeba52e7a2242d9ae8949f93f1a5ba9
Reviewed-on: https://chromium-review.googlesource.com/293280
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
c5cf9bc4
|
2015-08-06T10:46:48
|
|
Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'
BUG=angleproject:1120
Change-Id: I01ef10bea7f487c2b394d030c76628f38d2ea645
Reviewed-on: https://chromium-review.googlesource.com/292780
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b18609b9
|
2015-07-16T14:13:11
|
|
Implement ES 2,3 parts of EXT_blend_func_extended for shader translation
Exposes gl_SecondaryFragColor, glSecondaryFragData[] and
gl_MaxDualSourceDrawBuffers to GLES SL 1.0.
Relaxes rules for undefined output locations for GLES SL 3.0
and exposes gl_MaxDualSourceDrawBuffers.
If the output GL context is GL ES 2.0 or 3.0:
The emulation layer is expected to turn on EXT_blend_func_extended
if the output GL context supports it.
If the output GL context is GL:
The emulation layer is expected to turn on EXT_blend_func_extended
if the output GL context supports ARB_blend_func_extended or if GL
context is 3.2 or later.
If the source shader spec is GLES SL 2.0: The emulation layer is
expected to inspect the shader compilation output variables upon
linking. If output target is GL SL, the emulation layer should bind
color location 0, index 1 to "angle_SecondaryFragColor" if variable
"gl_SecondaryFragColorEXT" is used. Alternatively, emulation layer
should bind "angle_SecondaryFragData" to locations 0,1,2,3,..., all
color index 1, if "gl_SecondaryFragData" array is used.
(The caller can not bind the locations or specify output variables.)
If the source shader spec is GLES SL 3.0:
The emulation layer is expected to do location auto-resolve of the
the output variables that have undefined output locations that have
not been bound by the caller.
(The caller can not use gl_ built-ins, so nothing to do with those.)
BUG=angleproject:1085
TEST=angle_unittest
Change-Id: I5cafe205b0c29478b0dcd24aa89a7b0000f5d046
Reviewed-on: https://chromium-review.googlesource.com/287580
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com>
|
|
43613b03
|
2015-08-04T11:02:21
|
|
Make sure that the AST root is always a sequence node
This enables inserting helper functions as an AST transformation.
BUG=angleproject:1116
TEST=angle_unittests
Change-Id: I169d4d3a726d0e389cb3444fe9dfb4c6c5d80155
Reviewed-on: https://chromium-review.googlesource.com/290513
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
b081e78b
|
2015-07-20T05:40:04
|
|
Compiler: avoid an undefined behavior when using erase-remove
Using that idiom on an empty vector results in an undefined behavior
that I have seen cause a vector to get length -1 with clang 3.6 on
Linux.
BUG=
Change-Id: I3bb8d8884efa29a17672b458263067644dbf0fec
Reviewed-on: https://chromium-review.googlesource.com/286740
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
01971113
|
2015-07-10T14:54:00
|
|
Cache TTypes.
*re-land with build fix for Win/Release*
This change saves us ~70KiB per compiler with just ~3KiB of cache.
BUG=492725
Change-Id: I4382c55b2480f70b00c5d117fcb7e0c51d0dfbb4
Reviewed-on: https://chromium-review.googlesource.com/284735
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Dmitry Skiba <dskiba@google.com>
Reviewed-by: Alexis Hétu <sugoi@chromium.org>
|
|
53b76107
|
2015-07-10T18:52:58
|
|
Revert "Cache TTypes."
Unused variable warning in Release:
warning C4189: 'MaxEnumValue' : local variable is initialized but not referenced
I'll handle fixing this.
BUG=492725
This reverts commit b25d14e4b39ee273fad3bb585c3a3a929b3f794c.
Change-Id: I502fc5288d5d3c48ecd43f84acdf66b7e300ad22
Reviewed-on: https://chromium-review.googlesource.com/284863
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
b25d14e4
|
2015-06-23T17:43:14
|
|
Cache TTypes.
This change saves us ~70KiB per compiler with just ~3KiB of cache.
BUG=492725
Change-Id: I7b8053c032c9c68f646162baf61abf6db3afe52e
Reviewed-on: https://chromium-review.googlesource.com/284003
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
2f232370
|
2015-07-07T21:57:55
|
|
Revert "Cache TTypes."
Lots of compile errors.
BUG=492725
This reverts commit 5377720aae042c5bfae0e8a37032c90dc3ab78cf.
Change-Id: I64889b99b1f1f48d39b87ebb668f6a32a3abac45
Reviewed-on: https://chromium-review.googlesource.com/283945
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
5377720a
|
2015-06-23T17:43:14
|
|
Cache TTypes.
This change saves us ~70KiB per compiler with just ~3KiB of cache.
BUG=492725
Change-Id: I2ee748f7271b1afe0834083cbff6f0b84104aa53
Reviewed-on: https://chromium-review.googlesource.com/281411
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Dmitry Skiba <dskiba@google.com>
|
|
8273e006
|
2015-06-15T13:40:19
|
|
Add new GLSL target versions.
Test the emulated GLSL functions against multiple GL versions.
BUG=angleproject:1044
Change-Id: I1e12523301042f0d541ab2f4e73f02319d1584ef
Reviewed-on: https://chromium-review.googlesource.com/277702
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
5c407bb7
|
2015-06-01T12:20:39
|
|
Work around pow() issue in NVIDIA 331.x drivers
pow(x, y) when y is a certain kind of a constant vector can cause issues on
NVIDIA 331 series drivers. Add an option to replace pow(x, y) with
exp2(y * log2(x)) when y is a constant to work around this issue.
This is done with an AST traverser instead of BuiltInFunctionEmulator, since
there's no mechanism in BuiltInFunctionEmulator to apply the replacements
only to calls where the second parameter is constant.
TEST=WebGL conformance tests
BUG=chromium:477306
Change-Id: Ifb327d72659fca36868439f24705203014b3ce53
Reviewed-on: https://chromium-review.googlesource.com/274279
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
6e06b1f4
|
2015-05-14T10:01:17
|
|
Make TParseContext a class, with private data.
*re-land with build fix*
BUG=angleproject:995
Change-Id: I67d3ded8f6c705b54fb372857e07ce1a86b58475
Reviewed-on: https://chromium-review.googlesource.com/271162
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
749fe340
|
2015-05-13T21:07:55
|
|
Revert "Make TParseContext a class, with private data."
Causing build errors on Linux:
FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma/gomacc "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\angle\src\compiler\translator\translator_lib.ParseContext.obj.rsp /c ..\..\third_party\angle\src\compiler\translator\ParseContext.cpp /Foobj\third_party\angle\src\compiler\translator\translator_lib.ParseContext.obj /Fdobj\third_party\angle\src\translator_lib.cc.pdb
c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\validateglobalinitializer.h(11) : error C2220: warning treated as error - no 'object' file generated
c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\validateglobalinitializer.h(11) : warning C4099: 'TParseContext' : type name first seen using 'class' now seen using 'struct'
c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\parsecontext.h(28) : see declaration of 'TParseContext'
BUG=angleproject:995
This reverts commit 6c0c2987fba9dcf2a8d432534c9548092281bfa4.
Change-Id: I49a8b7df9bc8b7c4892bf3af5e2c7a6444fba890
Reviewed-on: https://chromium-review.googlesource.com/270767
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
6c0c2987
|
2015-05-13T13:50:04
|
|
Make TParseContext a class, with private data.
BUG=angleproject:995
Change-Id: Ie077e3a4f0fd5ef840aa35edeb41d15a98b7c0ff
Reviewed-on: https://chromium-review.googlesource.com/270628
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
ad0d0799
|
2015-04-08T14:25:06
|
|
Expand ShShaderOutput for different GLSL versions
BUG=angleproject:968
Change-Id: I2d4c0a8e9a91a940922da4501c22124da0c0399c
Reviewed-on: https://chromium-review.googlesource.com/264840
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
c6833115
|
2015-04-22T15:15:54
|
|
Prune empty declarations from the AST
Empty declarations in ESSL shaders currently result in errors on several
platforms. Prune empty declarations that are not struct or interface block
declarations from the AST.
TEST=WebGL conformance tests, angle_unittests, angle_end2end_tests
BUG=angleproject:980
Change-Id: I9e3abf8134e6dfed0253cc83f69ce0ee92b0e0e7
Reviewed-on: https://chromium-review.googlesource.com/266841
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a094a8a9
|
2015-04-07T11:53:06
|
|
Add a compiler option to prune unused function and prototypes
Also adds a simple unit test checking the pruning
BUG=angleproject:937
BUG=395048
Change-Id: I88440378f66178dcebebcd596f8f80235903f20e
Reviewed-on: https://chromium-review.googlesource.com/264568
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
78b3a8b9
|
2015-04-08T16:04:24
|
|
Revert "Add a compiler option to prune unused function and prototypes"
Compile error on Mac:
http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29051
This reverts commit e423d9ca6e1b340ae06d543419b8a515de5ac3f2.
Change-Id: Ie08d7f2bf86089a006f3177480aa7491a9405257
Reviewed-on: https://chromium-review.googlesource.com/264585
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
e423d9ca
|
2015-04-07T11:53:06
|
|
Add a compiler option to prune unused function and prototypes
Also adds a simple unit test checking the pruning
BUG=angleproject:937
BUG=395048
Change-Id: I49904c34d1a72949cdc579569967d99c736c7237
Reviewed-on: https://chromium-review.googlesource.com/264415
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
71d147f6
|
2015-02-11T11:15:24
|
|
Implemented a CallDAG to allow for more AST analysis
The CallDAG preprocesses the AST to construct a DAG of
functions that can be used for several analyses.
Use it to implement check for recursion and max call
depth. It will also be used to limit the usage of
[[flatten]] and [[unroll]].
BUG=angleproject:937
BUG=395048
Change-Id: I8578703f2d49513f315aecccbcff34914562e4ff
Reviewed-on: https://chromium-review.googlesource.com/263774
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
186160b2
|
2015-04-02T19:34:38
|
|
Revert "Implemented a CallDAG to allow for more AST analysis"
failures in angle_unittests and compilation failure on clang (see: https://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder%20%28dbg%29/builds/30016/steps/compile/logs/stdio) .
This reverts commit b34d1d12969496b1b0fb53934b8ce3200304f900.
Change-Id: Ia995fb2db0e891294f3461de01617cb13e5ae381
Reviewed-on: https://chromium-review.googlesource.com/263727
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
b34d1d12
|
2015-02-11T11:15:24
|
|
Implemented a CallDAG to allow for more AST analysis
The CallDAG preprocesses the AST to construct a DAG of
functions that can be used for several analysis.
Use it to implement check for recursion and max call
depth. It will also be used to limit the usage of
[[flatten]] and [[unroll]].
BUG=angleproject:937
BUG=395048
Change-Id: I643e0ed605ad095e4fd7da4977d842be5e6a12e0
Reviewed-on: https://chromium-review.googlesource.com/229352
Reviewed-by: Nicolas Capens <capn@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
8efc5ad5
|
2015-03-03T17:21:10
|
|
Initialize BuiltInFunctionEmulator outside Compiler
This moves GLSL output specific code from the Compiler class to the
GLSL/ESSL translators.
BUG=angleproject:865
Change-Id: I2d552e9cdb41f7d8ddfee7b0249a99d629a6d7d7
Reviewed-on: https://chromium-review.googlesource.com/255471
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a3a5cc6a
|
2015-02-13T13:12:22
|
|
Expose the IntermNode tree generated in the compiler for testing
This refactoring makes it possible for tests to access the IntermNode
tree produced by compilation by calling compileTree(). Removing
ParseContext usage from OutputHLSL has the additional benefit of better
separation between parsing and output.
BUG=angle:916
Change-Id: Ib40954832316328772a5c1dcbbe6b46b238e4e65
Reviewed-on: https://chromium-review.googlesource.com/249723
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
0fbd128c
|
2015-02-02T14:46:09
|
|
Extension behavior is now reset between each shader translation unit.
The extension behavior was being shared between translation units,
this was causing states to be cached between shader compilers. This
has been fixed now by adding a new ResetExtensionBehavior() function.
A unit test has also been added for testing extensions when compiling
shaders. A test has been included which tests that the internal state
of the extension behavior is being reset properly.
BUG=453543
Change-Id: Icb2a07019b5db972dc75cdbbdece4b7e9757c682
Reviewed-on: https://chromium-review.googlesource.com/245522
Tested-by: David Yen <dyen@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|