|
8e89866d
|
2015-12-11T12:24:21
|
|
Remove redundant index integer check from ValidateLimitations
Non-integer indices are already rejected in the parser, so the
ValidateLimitations pass doesn't need to check for them.
ESSL 1.00 spec is not actually terribly clear about whether the
parser should do this check, but the language grammar in the spec only
has indexing with "integer_expression" so it seems like ANGLE's
interpretation of only allowing indexing with integers is correct.
ESSL 3.00 makes this restriction explicitly clear in section 5.7.
BUG=angleproject:1254
TEST=angle_unittests
Change-Id: I02b2a6f4d9fa7801a98df63ed21bc990e1585eb8
Reviewed-on: https://chromium-review.googlesource.com/317741
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
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>
|
|
d561057f
|
2015-12-10T19:42:09
|
|
Fix ValidateLimitations for folded non-constant expressions
ANGLE recently gained the ability to constant fold some expressions that
are not constant expressions. ValidateLimitations should continue to
recognize all cases where an expression is not a constant expression.
BUG=angleproject:851
TEST=angle_unittests
Change-Id: I8ad0552a59213cdd6af9a220ffd672be9752271d
Reviewed-on: https://chromium-review.googlesource.com/317281
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
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>
|
|
0980e29d
|
2015-11-20T14:57:34
|
|
Don't accept default precision for uint
Default precision can only be specified for float, int and sampler types.
Default precision for int also applies to uint and uvec declarations.
BUG=angleproject:1221
TEST=angle_unittests
Change-Id: I31fdcde80da16e2ea8771838f7c1a6ab4e478194
Reviewed-on: https://chromium-review.googlesource.com/313314
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@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>
|
|
3e960463
|
2015-11-12T15:58:39
|
|
Detect when gl_FragData is indexed with != 0 in WebGL 2.0
WebGL 2.0 explicitly specifies it to be an error when gl_FragData is
indexed with anything else than constant zero in spec section
'GLSL ES 1.00 Fragment Shader Output'.
This doesn't apply to WebGL 1.0 or GLES.
dEQP-GLES2.functional.shaders.fragdata* test that dynamic indexing of
gl_FragData is allowed.
TEST=angle_unittests
BUG=angleproject:1210
Change-Id: Ib401242e7867f5e7943456b059dd8e24dc404098
Reviewed-on: https://chromium-review.googlesource.com/312045
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
bd163f6a
|
2015-11-13T12:15:38
|
|
Fix parsing structure definitions in place of constructors
The shader parser used to accept structure definitions in place of
constructors, which is invalid GLSL. This patch fixes that.
BUG=angleproject:939
TEST=angle_unittests
Change-Id: Ibcf502160e91c19e693e9427b548a399d83e2a71
Reviewed-on: https://chromium-review.googlesource.com/312032
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
40d9edf1
|
2015-11-12T17:30:34
|
|
Fix structure comparison constant folding
objectSize() will return the size of all data in the structure, and
simply iterating over the data will work for determining whether two
structures are equal. The earlier complex and broken approach where the
structure was traversed recursively is not needed.
BUG=angleproject:1211
TEST=angle_unittests
Change-Id: I0e5c5ccbb767d44ef6acb0f1f25f27dfc42866e1
Reviewed-on: https://chromium-review.googlesource.com/312490
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
36b0514a
|
2015-11-12T13:10:42
|
|
Fix ESSL3 indexing corner cases
Indexing interface blocks or fragment outputs with a non-constant
expression is not valid even if ANGLE has been able to constant fold
the expression.
BUG=angleproject:1210
TEST=angle_unittests
Change-Id: I2ccb67871b682976a31b8de306053b9b28c06437
Reviewed-on: https://chromium-review.googlesource.com/312044
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
|
|
15c2ac30
|
2015-11-09T15:51:43
|
|
Fix constructor parsing issues
After this patch, ANGLE no longer accepts constructors where any of
multiple parameters is sampler or void.
Also, structure array constructors with just one parameter are now
accepted.
Error message for a constructor with no parameters is also more
informative than before.
BUG=angleproject:1193
TEST=angle_unittests
Change-Id: I6b897973448cf500096f612b3b95dcc23aebc716
Reviewed-on: https://chromium-review.googlesource.com/311590
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
1d122789
|
2015-11-06T15:35:17
|
|
Fix constructor constant folding
The previous solution for constant folding constructors was significantly
overengineered and partially incorrect. Switch to a much simpler
constructor folding function that does not use an AST traverser, but
simply iterates over the constant folded parameters of the constructor
and doesn't do any unnecessary checks. It also reuses some code for
constant folding other built-in functions.
This fixes issues with initializing constant matrices with only a single
parameter. Instead of copying the first component of the constructor
parameter all over the matrix, passing a vec4 or matrix argument now
assigns the values correctly.
BUG=angleproject:1193
TEST=angle_unittests, WebGL conformance tests
Change-Id: I50b10721ea30cb15843fba892c1b1a211f1d72e5
Reviewed-on: https://chromium-review.googlesource.com/311191
Tryjob-Request: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
7c3848e5
|
2015-11-04T13:19:17
|
|
Allow constant folding some non-constant expressions
This requires removing the assumption that constant folding implies
constness in the constant expression sense from various places in the
code.
This particularly benefits ternary operators, which can now be simplified
if just the condition is a compile-time constant.
In the future, the groundwork that is laid here could be used to implement
more aggressive constant folding of user-defined functions for example.
TEST=angle_unittests
BUG=angleproject:851
Change-Id: I0eede806570d56746c3dad1e01aa89a91d66013d
Reviewed-on: https://chromium-review.googlesource.com/310750
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
b1edc4f5
|
2015-11-02T17:20:03
|
|
Accept const array initialization in shader parsing
Array constructors are not folded, unlike all other constant expressions.
Change initializer parsing path so that it accepts constant initializers
whether they are folded or not.
Some parts need to be adapted to work with expressions that are qualified
as constant but that are not necessarily folded:
1. Identifier parsing
2. Indexing parsing
3. Field selection parsing
4. HLSL output for variable declarations
5. Determining unary operator result type
6. Determining binary operator result type
7. Determining built-in function call result type
8. Determining ternary operator result type
Corner cases that are not supported yet:
1. Using array constructors inside case labels
2. Using array constructors inside array size expressions
3. Detecting when a negative constant expression containing an array
constructor is used to index an array
In these cases being able to constant fold the expression is essential to
validating that the code is correct, so they require a more sophisticated
solution. For now we keep the old code that rejects the shader if ANGLE
hasn't been able to constant fold the case label or array size. In case of
indexing an array with a negative constant expression containing an array
constructor, ANGLE will simply treat it as a non-constant expression.
BUG=541551
BUG=angleproject:1094
TEST=dEQP-GLES3.functional.shaders.constant_expressions.* (all pass),
angle_unittests
Change-Id: I0cbc47afd1651a4dece3d68acf7ec72a01fdf047
Reviewed-on: https://chromium-review.googlesource.com/310231
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
f541f529
|
2015-10-13T12:21:01
|
|
Fix parsing integers larger than 0x7FFFFFFF
Parsing should accept all values between 0 and 0xFFFFFFFF as specified in
ESSL 3.00 section 4.1.3.
When a signed literal is parsed, it's interpreted as if it specifies the
bit pattern of a two's complement integer. For example, parsing
"0xFFFFFFFF" results in -1. Decimal literals behave the same way, so for
example parsing "3000000000" results in -1294967296.
This change affects parsing of literals in ESSL 1.00 as well. In ESSL
3.00, an out-of-range integer literal now generates a compiler error.
Unit tests are added based on examples in the ESSL 3.00 spec and one
example in GLSL 4.5 spec that ESSL should match.
BUG=541550
TEST=angle_unittests
Change-Id: I82f8ef5cfa2881019a3f80d77ff99707d61c000d
Reviewed-on: https://chromium-review.googlesource.com/305420
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Corentin Wallez <cwallez@google.com>
|
|
b3fbd867
|
2015-09-30T17:55:02
|
|
Fix setting const qualifier on indexing expression
Resubmitting now that separate fix for updating mangled names of types
has been merged. A unit test is added to make sure that the same
regression doesn't happen again.
Previously, constness of indexing expressions did not take the index
expression into account. Now constness correctly takes into account both
the base expression and the index expression.
Setting the type of expressions that index arrays is also simplified.
BUG=angleproject:1170
TEST=angle_unittests
Change-Id: Ie9b6aaee8185b945c03657b13d9513cc55cd2a9f
Reviewed-on: https://chromium-review.googlesource.com/303601
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
e623bd46
|
2015-10-02T19:14:15
|
|
Revert "Fix setting const qualifier on indexing expression"
Failing to compile shaders which are used in some layout_tests,
see http://crbug.com/538692 for logs and bad shaders.
We should diagnose if the shaders are faulty or if there's a
bug in this CL and take appropriate action, but first priority
is to get the tests running again.
BUG=538692
BUG=angleproject:1170
This reverts commit 16a79cd169420cdf0254964b1bac9dd9964a8119.
Change-Id: Iea14c58d87041bcf5ba645b7076ba0936dea6b9d
Reviewed-on: https://chromium-review.googlesource.com/303794
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
16a79cd1
|
2015-09-30T17:55:02
|
|
Fix setting const qualifier on indexing expression
Previously, constness of indexing expressions did not take the index
expression into account. Now constness correctly takes into account both
the base expression and the index expression.
Setting the type of expressions that index arrays is also simplified.
BUG=angleproject:1170
TEST=angle_unittests
Change-Id: Ie2d122020cc252655ab0eea96886b9f85931b80a
Reviewed-on: https://chromium-review.googlesource.com/303350
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
5f0246ca
|
2015-07-22T10:30:35
|
|
Implement gl_FragDepth for GLES SL 3.0
Makes it an error to access gl_FragDepthEXT in #version 300 es shader.
TODO:
Lacks the feature to make "#extension GL_EXT_frag_depth : require" an
error for #version 300 es.
Reland of: https://chromium-review.googlesource.com/#/c/287570
BUG=angleproject:1102
TEST=angle_unittest
Change-Id: I064d918d65f37539cb1e14f12173ca5591a4ea3f
Reviewed-on: https://chromium-review.googlesource.com/301711
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
0304d2fe
|
2015-09-07T16:28:19
|
|
Don't split the file into two chunks in shader_translator
Splitting the file into two strings in shader_translator complicated
testing line/file numbering related functionality with it, since each
chunk passed to ShCompile has its own file number and line numbering.
These are exposed to the preprocessor in __FILE__ and __LINE__ predefined
macros.
Just supply the file to ShCompile in a single string. Also, since the
original motivation for splitting the string seems to have been to
exercise ShCompile with multiple strings, add a new unit test that
ensures that ShCompile handles multiple strings as expected.
BUG=angleproject:989
TEST=angle_unittests
Change-Id: I31d24925ec85ca3411e537df25a985f09737403e
Reviewed-on: https://chromium-review.googlesource.com/297251
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
a0a9e12d
|
2015-09-02T15:54:30
|
|
translator: Add sh::OutputVariable type.
This replaces the dual-use of sh::Attribute, which can be a bit
confusing to people expecting a literal output variable.
Currently not used in Chromium, so should be safe to land.
BUG=angleproject:1146
Change-Id: I436f2bc9dc4ddc3709369cb2baa344c6b13a21a2
Reviewed-on: https://chromium-review.googlesource.com/296683
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
477b243b
|
2015-08-31T10:41:16
|
|
Change the FLATTEN heuristic to "ifs with a loop with a gradient"
This heuristic makes more sense than the previous "ifs with a
discontinuous loop" as the reason we need to flatten is that we need
gradients to be in branchless code.
Change the UnrollFlatten test accordingly.
Tested with:
- the WebGL CTS
- dev.miaumiau.cat/rayTracer "Skull Demo"
- THe turbulenz engine GPU particle demo
- Lots of ShaderToy Samples (inc. Volcanic, Metropolis and Hierarchical
Voronoi)
- Google Maps Earth mode
- Lots of Chrome experiments
- madebyevan.com/webgl-water
BUG=524297
Change-Id: Iaa727036fffcfde3952716a1ef33b6ee0546b69d
Reviewed-on: https://chromium-review.googlesource.com/296442
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
2a592150
|
2015-08-31T10:10:33
|
|
Fix Chromium compilation error in VariablePack_test.cpp
BUG=
Change-Id: I59c9716774df4615da6dd412795639e055f45034
Reviewed-on: https://chromium-review.googlesource.com/295732
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
a9bee1b8
|
2015-08-27T16:10:53
|
|
Add row-sharing packing tests for VariablePacker_test.cpp
Recent test failures leads to suspicion that our variable packing algorithm is
buggy - turns out to be an underlying driver bug.
With the added test cases, such suspicion shouldn't even arise.
BUG=angleproject:1142
TEST=angle_unittests
Change-Id: I1fb3c5c7798d9ad17668a3d633286e031da79cab
Reviewed-on: https://chromium-review.googlesource.com/295901
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Zhenyao Mo <zmo@chromium.org>
|
|
11865105
|
2015-08-27T17:55:17
|
|
angle_unittests add forgotten VariablePacker test.
Also add a warning on top of the UnrollFlatten test that it works only
when HLSL is enabled.
BUG=angleproject:1140
Change-Id: Ide961bbed70dc9ed2a604f13273e4209b1dec29b
Reviewed-on: https://chromium-review.googlesource.com/295125
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
76037953
|
2015-08-20T13:18:44
|
|
Fix compilation on Mac, adding a newline in IntermNode_test.cpp
BUG=
Change-Id: Ie935486bf44bacb89660419c0dabd0ff38838c90
Reviewed-on: https://chromium-review.googlesource.com/294800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
d0d59aa4
|
2015-08-18T13:49:45
|
|
Add deep copying support for typed AST nodes
Removing dynamic indexing of vectors and matrices will require copying
the indexed nodes in case they are written. Any type of l-value node that
doesn't have side effects may need to be copied. Add a copying function
for all typed node classes so that this copying can be performed.
Private copy constructors are used to implement the deepCopy function in
order to make maintenance easier. With copy constructors, each subclass
only needs to take care of copying its own members, and not the base
class members, which reduces the possibility of errors. Copy constructors
are disabled for all node classes that don't support deep copying by
inheriting TIntermNode from angle::NonCopyable.
Assignment operator is disabled for all node classes through inheriting
angle::NonCopyable. This applies also to classes that now get the private
copy constructor.
Explicit copy constructor and assignment operator declarations are added
to some classes which show up in node member variables to make code
clearer.
BUG=angleproject:1116
TEST=angle_unittests
Change-Id: Ia757b69397837f8309f0e7511c0cd24ca2c7a721
Reviewed-on: https://chromium-review.googlesource.com/293931
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
217fe6ec
|
2015-08-05T13:25:08
|
|
Detect when built-in modf requires an l-value in AST traversal
This fixes an omission that out parameter tracking had inherited from
EmulatePrecision. Accurate tracking of when values are written is
required for converting dynamic indexing of vectors and matrices to
function calls.
A new test covering this is added to angle_unittests.
TEST=angle_unittests
BUG=angleproject:1116
Change-Id: I05c5fd60355117d0053b84110748ae221375a790
Reviewed-on: https://chromium-review.googlesource.com/290562
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
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>
|
|
149e6e69
|
2015-08-07T16:18:18
|
|
Fixed compiler warning C4458 'declaration of variable hides class member'.
BUG=angleproject:1119
Change-Id: Ibc7cfdea72abe402cbfa1c10e0ada7576fa1cfa2
Reviewed-on: https://chromium-review.googlesource.com/292052
Tested-by: Cooper Partin <coopp@microsoft.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
8afe1e1b
|
2015-08-05T18:00:01
|
|
Track that indices of l-values are not required to be l-values
In an expression like a[ind]++, a[ind] is required to be an l-value but
ind is not. Reset the l-value required flags before traversing the index
of an indexing operation, so that this is accurately tracked. After the
index has been traversed, the previous state of the l-value required
flags is restored.
New tests are added to angle_unittests cover this functionality.
TEST=angle_unittests
BUG=angleproject:1116
Change-Id: I8929ec01e85e672c83ef7d385e455b7df8682f4b
Reviewed-on: https://chromium-review.googlesource.com/290561
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
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>
|
|
cc36b983
|
2015-07-10T14:14:18
|
|
Implement ESSL 3.00 shader input/output variable type rules
ESSL 3.00 allows a wider variety of types of input/output variables
than ESSL 1.00, but there are still specific restrictions on structs,
matrices and arrays.
Some of the checks need to be implemented twice: once for array syntax
where the brackets are after the type, and another time for array syntax
where the brackets are after the variable name.
This requires fixes to constant folding unit tests which were previously
incorrectly using matrix outputs in fragment shaders.
New unit tests are added for several of the rules introduced, but some
cases are also covered by dEQP.
TEST=angle_unittests, dEQP-GLES.functional.shaders.linkage.varying.rules.*
BUG=angleproject:1061
Change-Id: I655b054cfe56d376db775b96a2bb41b3ac5740b0
Reviewed-on: https://chromium-review.googlesource.com/285482
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
13e7c7e6
|
2015-07-30T14:17:29
|
|
Revert "Names of built-in functions cannot be redeclared as functions"
Causing failures in the WebGL1 test: conformance/glsl/misc/shader-with-non-reserved-words.html
This reverts commit b5f88853ea80ea112368bb15999b363db0e4c648.
Change-Id: I2105c8040057665abda00435e8c0ff8a83af3645
Reviewed-on: https://chromium-review.googlesource.com/289192
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
b5f88853
|
2015-07-23T17:37:39
|
|
Names of built-in functions cannot be redeclared as functions
With ESSL 3.00, names of built-in functions cannot be redeclared as
functions and therefore overloading or redefining builtin functions
is an error.
This is fixed by inserting unmangled built-ins into the symbol table
and then checking if the new function declaration matches any of the
built-in in symbol table.
BUG=angleproject:1066
TEST=angle_unittests(new: ParseESSLFunctionsTest), dEQP Tests
dEQP-GLES3.functional.shaders.functions.invalid.overload_builtin_function*
(2 tests started passing with this change)
Change-Id: I0e027e588664e604f29c130028178315c3e21631
Reviewed-on: https://chromium-review.googlesource.com/287801
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
1747603e
|
2015-07-29T09:54:40
|
|
Remove compiler_tests.gypi and preprocessor_tests.gypi.
These files were a relic of a previous structure, we can safely
remove them now that chrome uses angle_unittests.gypi.
BUG=None
TEST=compiles standalone and with chromium
Change-Id: If9a09122f664b740099b4270f5acc5627fc5ac35
Reviewed-on: https://chromium-review.googlesource.com/289343
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
e2bfe2cd
|
2015-07-23T21:25:45
|
|
Revert "Implement gl_FragDepth for GLES SL 3.0"
assertion failures in WebGL2 CTS.
This reverts commit 544809610a131fe7040f2212789c62e212bbaf24.
Change-Id: I2e0c7045c5b6ef9031a6e6c5916504fe68f51077
Reviewed-on: https://chromium-review.googlesource.com/287910
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
54480961
|
2015-07-22T10:30:35
|
|
Implement gl_FragDepth for GLES SL 3.0
Makes it an error to access gl_FragDepthEXT in #version 300 es shader.
TODO:
Lacks the feature to make "#extension GL_EXT_frag_depth : require" an
error for #version 300 es.
BUG=angleproject:1102
TEST=angle_unittest
Change-Id: Ic313a0e1ed6369550d53885290f300fab1aaf304
Reviewed-on: https://chromium-review.googlesource.com/287570
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
0932df61
|
2015-07-21T14:35:11
|
|
Expose GL built-in output variables in ShGetOutputVariables
Expose GL built-in output variables in ShGetOutputVariables.
Currently gl_FragColor, gl_FragData and gl_FragDepthEXT are exposed.
The output variable names in the returned array are the input shader names,
not the output shader names.
This is needed in future features in which the emulation layer (command
buffer/libANGLE) needs to know which output variables caller used.
Example of such a feature is EXT_blend_func_extended, where
gl_SecondaryFragColorEXT and gl_SecondaryFragDataEXT cause the need
to bind the emulated output variables to their respective color
indices.
BUG=angleproject:1085
TEST=angle_unittests
Change-Id: I7ca3e0fe6bdd3e3c66113518aa771cbb013fc014
Reviewed-on: https://chromium-review.googlesource.com/287230
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com>
|
|
01c796ac
|
2015-07-21T18:53:58
|
|
Revert "Emulate the pack/unpack functions for unorms."
Causing MSAN failures on Linux.
This reverts commit 1915652ee82109d7756dc8349562c3c11ea39b77.
Change-Id: Ib23bec16eab22288930be0b41186e54cd8d1f921
Reviewed-on: https://chromium-review.googlesource.com/287127
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
8518e7f6
|
2015-07-16T14:54:08
|
|
Make all fragment shader out variables require location layout qualifier
Make all fragment shader out variables require location layout
qualifier. Previously, the last variable did not need a location layout
qualifier if the previous variables had those.
TEST=angle_unittests
BUG=angleproject:1070
Change-Id: Ifb66ee52b811409f5278eaad330d6cd9b8ea059f
Reviewed-on: https://chromium-review.googlesource.com/287100
Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
6d276c8e
|
2015-07-20T19:00:38
|
|
Revert "Make all fragment shader out variables require location layout qualifier"
Causes a warning on Windows:
compiler\translator\ValidateOutputs.cpp(37): warning C4804: '>' : unsafe use of type 'bool' in operation
BUG=angleproject:1070
This reverts commit 140941d066c11238ba4f2f15647fb2d65ae56faf.
Change-Id: Ieed42cdda22f17c6e15c38ee1c059184869e6919
Reviewed-on: https://chromium-review.googlesource.com/286820
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
140941d0
|
2015-07-16T14:54:08
|
|
Make all fragment shader out variables require location layout qualifier
Make all fragment shader out variables require location layout
qualifier. Previously, the last variable did not need a location layout
qualifier if the previous variables had those.
TEST=angle_unittests
BUG=angleproject:1070
Change-Id: I3763b8ca38b1e14ee8456a54592c01e0fd89692c
Reviewed-on: https://chromium-review.googlesource.com/286101
Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
1915652e
|
2015-06-18T09:40:14
|
|
Emulate the pack/unpack functions for unorms.
BUG=angleproject:1044
Change-Id: I0e7bee366398159ae6b87a820f36cb51c05cb064
Reviewed-on: https://chromium-review.googlesource.com/280362
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
c1ac41bb
|
2015-07-10T13:53:46
|
|
Apply array restriction on qualified types only on ESSL1.00
Add a test that checks that uniforms with an array type are allowed in
ESSL3.00.
TEST=angle_unittests
BUG=angleproject:1061
Change-Id: I6c9e8eeb3e8a6b81522c87039b93bcc0008ae317
Reviewed-on: https://chromium-review.googlesource.com/285481
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
abb0c381
|
2015-07-13T12:01:12
|
|
Check that layout qualifiers may only appear in declarations
In the shading language grammar, layout qualifiers may appear in loop
conditions and function declarations, but this is not valid ESSL 3.00
according to section 4.3.8.
TEST=angle_unittests, dEQP-GLES3.functional.shaders.*layout*
BUG=angleproject:1064
Change-Id: I73f805247bf6678b953f2e1d45a23391e9eacb96
Reviewed-on: https://chromium-review.googlesource.com/285040
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
07e57df7
|
2015-06-16T16:55:52
|
|
Added non square matrix construction
Added new construction operations for
non square matrices, along with the
required changes to the related
translation functions.
Change-Id: I04ae7d4b2d1bb363b35d088cea45c0e7c4bc8a13
Reviewed-on: https://chromium-review.googlesource.com/277729
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
b5841ef2
|
2015-07-08T17:25:22
|
|
Disallow texture lookup functions in global initializers
Do this by simply disallowing all function calls in global initializers
- all built-in math ops are handled as other ops, not function calls.
This change was tested extensively with popular WebGL content, with no
regressions found.
TEST=angle_unittests
BUG=angleproject:988
Change-Id: Id1107fa294ae4012d5dd3949539d0b7b4cd21943
Reviewed-on: https://chromium-review.googlesource.com/283703
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
846fe05f
|
2015-07-07T17:41:21
|
|
Disable using globals as l-values in global initializers
It should not be possible to use globals as l-values in global initializers.
This change was tested extensively with popular WebGL content, with no
regressions found.
TEST=angle_unittests
BUG=angleproject:988
Change-Id: I21ab731eb1d92aeae25795856ccae280792ad1f0
Reviewed-on: https://chromium-review.googlesource.com/283910
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
ce39f6ff
|
2015-07-06T15:25:19
|
|
Disallow user-defined function calls in global variable init
Generate an error message when an user-defined function call is found in
a global variable initializer.
Even before this patch, the call graph already marked functions that were
only called from the global scope as unused.
This change was tested extensively with popular WebGL content, with no
regressions found.
TEST=angle_unittests
BUG=angleproject:988
Change-Id: Iec1b16d2af386f1e5c383f86926d80cef553b694
Reviewed-on: https://chromium-review.googlesource.com/283291
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
7fa3355f
|
2015-06-10T15:15:18
|
|
Add constant folding support for matrix built-ins
This change adds constant folding support for following matrix
built-ins:
- matrixCompMult, outerProduct, transpose, determinant and
inverse.
BUG=angleproject:913
TEST=angle_unittests(new: MatrixUtilsTest, ConstantFoldingTest.*Matrix*),
dEQP Tests:
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.matrix.*
(All 54 tests started passing with this change)
Change-Id: I7b9bf04b9a2cbff72c48216cab04df58c5f008d6
Reviewed-on: https://chromium-review.googlesource.com/276574
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
7a1d9266
|
2015-06-11T20:04:32
|
|
Refactoring: use compileTestShader in PackUnpackTest
TEST=angle_unittests
Change-Id: I49f17444bf0fe6568ec4d3445421c27a562adf1b
Reviewed-on: https://chromium-review.googlesource.com/277040
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
34482831
|
2015-06-10T15:16:07
|
|
Add missing newlines to BuiltInFunctionEmulatorGLSL.cpp and Pack_Unpack_test.cpp.
BUG=angleproject:947
Change-Id: I8cbcd99e8c2cb7c461b0c624596631a4dec6dcc8
Reviewed-on: https://chromium-review.googlesource.com/276668
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
03f3caec
|
2015-03-16T02:01:21
|
|
Emulate Missing pack_unpack functions from OpenGL 4.1
BUG=angleproject:947
TEST=angle_unittests, angle_end2end_tests
Change-Id: Id1afd7630d9720b6701225b7abf1ce4a3bf528b6
Reviewed-on: https://chromium-review.googlesource.com/260232
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
a4aa4e30
|
2015-06-04T15:54:30
|
|
Record precision of constant variables when needed
Add a traverser that checks precision qualifiers of folded constants and
hoists them to separate precision qualified variables if needed.
Fixes sdk/tests/conformance/glsl/bugs/constant-precision-qualifier.html
TEST=WebGL conformance tests, angle_unittests
BUG=angleproject:817
Change-Id: I1639595e0e49470736be93274f0af07ee732e1fe
Reviewed-on: https://chromium-review.googlesource.com/275095
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
7adfb184
|
2015-06-09T15:49:41
|
|
Refactor common compiler test functionality into helper functions
Refactor translating a ESSL shader string into a target language so that
compiler initialization and cleanup code can be reused between test classes.
BUG=angleproject:817
TEST=angle_unittests
Change-Id: Idb229dceb9e17b13ed6ad2a68ab55ed5c968780e
Reviewed-on: https://chromium-review.googlesource.com/275814
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
3d0d9a48
|
2015-06-01T12:16:36
|
|
Clean up TIntermTraverser usage
Remove default parameters from TIntermTraverser.
Also clean up a few dead function declarations in traversers.
TEST=angle_unittests, angle_end2end_tests
BUG=angleproject:1037
Change-Id: I8d126c6c2d5b53e8b14e23e3d102f204a59323b3
Reviewed-on: https://chromium-review.googlesource.com/275184
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
1155ddd2
|
2015-06-05T18:04:36
|
|
Revert "Revert "Add constant folding support for geometric built-ins""
Revert of revert as the issue is with the failing test itself.
This reverts commit b3da45c12d3eecdd319c0feb4d2b933e144f816a.
Change-Id: Ie2003c78527f87cad7f8ead0d87fee75ce032379
Reviewed-on: https://chromium-review.googlesource.com/275487
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
cc54e5d9
|
2015-06-05T16:00:02
|
|
Add a simple unit test for built-in emulation on Mac
This will replace a similar buggy test that will be removed from Chromium.
BUG=angleproject:913
TEST=angle_unittests
Change-Id: If782004e764316ca003effbea883640ecdb30dda
Reviewed-on: https://chromium-review.googlesource.com/275397
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
b3da45c1
|
2015-06-04T19:38:22
|
|
Revert "Add constant folding support for geometric built-ins"
This is failing gpu_unittests on Mac:
ShaderTranslatorTest.BuiltInFunctionEmulation:
../../gpu/command_buffer/service/shader_translator_unittest.cc:314: Failure
Value of: strstr(translated_source.c_str(), "webgl_dot_emu") != NULL
Actual: false
Expected: true
Reverting until we can fix the overly-narrow test.
BUG=angleproject:913
This reverts commit b50788d11dec046415565af1cc7da334e2979577.
Change-Id: I5bd9df83704e771e419339745eceaa43a20bd1e6
Reviewed-on: https://chromium-review.googlesource.com/275320
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
b50788d1
|
2015-05-25T19:20:26
|
|
Add constant folding support for geometric built-ins
* re-land after mac compilation fix (unsupported c++11 initializer) *
This change adds constant folding support for following geometric
built-ins:
- length, distance, dot, cross, normalize, faceforward,
reflect and refract.
BUG=angleproject:913
TEST=angle_unittests, dEQP Tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.geometric.*
(56 tests started passing with this change)
Change-Id: I236fc0c1af47a63f359564500c711e6bedf1c808
Reviewed-on: https://chromium-review.googlesource.com/274789
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
8f76bcc4
|
2015-06-02T13:54:20
|
|
Add unit test for RemovePow
Add two versions of the test - one with a single pow(), and another with
a nested pow().
TEST=angle_unittests
BUG=477306
Change-Id: Idb38e57a4b2522b7794996d6ea0f0456b349abf7
Reviewed-on: https://chromium-review.googlesource.com/274736
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
2f4823bf
|
2015-06-03T12:39:22
|
|
Revert "Add constant folding support for geometric built-ins"
Breaks Mac build because of C++11 init syntax:
FAILED: /b/build/goma/gomacc ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/third_party/angle/src/tests/compiler_tests/angle_unittests.ConstantFolding_test.o.d -DV8_DEPRECATION_WARNINGS -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DCHROMIUM_BUILD -DCR_CLANG_REVISION=238013-3 -DCOMPONENT_BUILD -DTOOLKIT_VIEWS=1 -DUSE_LIBJPEG_TURBO=1 -DENABLE_ONE_CLICK_SIGNIN -DENABLE_PRE_SYNC_BACKUP -DENABLE_REMOTING=1 -DENABLE_WEBRTC=1 -DENABLE_MEDIA_ROUTER=1 -DUSE_PROPRIETARY_CODECS -DENABLE_PEPPER_CDMS -DENABLE_CONFIGURATION_POLICY -DENABLE_NOTIFICATIONS -DENABLE_HIDPI=1 -DSYSTEM_NATIVELY_SIGNALS_MEMORY_PRESSURE -DDONT_EMBED_BUILD_METADATA -DDCHECK_ALWAYS_ON=1 -DENABLE_TASK_MANAGER=1 -DENABLE_EXTENSIONS=1 -DENABLE_PLUGIN_INSTALLATION=1 -DENABLE_PLUGINS=1 -DENABLE_SESSION_SERVICE=1 -DENABLE_THEMES=1 -DENABLE_AUTOFILL_DIALOG=1 -DENABLE_BACKGROUND=1 -DENABLE_GOOGLE_NOW=1 -DCLD_VERSION=2 -DENABLE_PRINTING=1 -DENABLE_BASIC_PRINTING=1 -DENABLE_PRINT_PREVIEW=1 -DENABLE_SPELLCHECK=1 -DENABLE_CAPTIVE_PORTAL_DETECTION=1 -DENABLE_APP_LIST=1 -DENABLE_SETTINGS_APP=1 -DENABLE_SUPERVISED_USERS=1 -DENABLE_SERVICE_DISCOVERY=1 -DENABLE_WIFI_BOOTSTRAPPING=1 -DV8_USE_EXTERNAL_STARTUP_DATA -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DSAFE_BROWSING_SERVICE -DGTEST_HAS_POSIX_RE=0 -DGTEST_LANG_CXX11=0 -DGL_APICALL= -DGL_GLEXT_PROTOTYPES= -DEGLAPI= '-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ "d3dcompiler_47.dll", "d3dcompiler_46.dll", "d3dcompiler_43.dll" }' -DANGLE_TRANSLATOR_STATIC -DUSE_LIBPCI=1 -DUSE_OPENSSL=1 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DWTF_USE_DYNAMIC_ANNOTATIONS=1 -Igen -I../.. -I../../third_party/angle/include -I../../third_party/angle/src -I../../third_party/angle/src/compiler/preprocessor -I../../third_party/angle/src/tests -Igen/angle -I../../testing/gmock/include -I../../testing/gtest/include -isysroot /Applications/Xcode5.1.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -O0 -gdwarf-2 -fvisibility=hidden -Werror -Wnewline-eof -mmacosx-version-min=10.6 -arch x86_64 -Wall -Wendif-labels -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wno-selector-type-mismatch -Wpartial-availability -Wheader-hygiene -Wno-char-subscripts -Wno-unneeded-internal-declaration -Wno-covered-switch-default -Wstring-conversion -Wno-c++11-narrowing -Wno-deprecated-register -Wno-inconsistent-missing-override -std=c++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fno-threadsafe-statics -Xclang -load -Xclang /b/build/slave/GPU_Mac_Builder__dbg_/build/src/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib -Xclang -add-plugin -Xclang find-bad-constructs -Xclang -plugin-arg-find-bad-constructs -Xclang check-templates -fcolor-diagnostics -fno-strict-aliasing -fstack-protector-all -Wno-undefined-bool-conversion -Wno-tautological-undefined-compare -c ../../third_party/angle/src/tests/compiler_tests/ConstantFolding_test.cpp -o obj/third_party/angle/src/tests/compiler_tests/angle_unittests.ConstantFolding_test.o
../../third_party/angle/src/tests/compiler_tests/ConstantFolding_test.cpp:210:43: error: no matching constructor for initialization of 'std::vector<float>'
ASSERT_FALSE(constantVectorFoundInAST(std::vector<float>{1.0f, 1.0f, 1.0f}));
^ ~~~~~~~~~~~~~~~~~~
BUG=angleproject:913
This reverts commit 2decb4b1557a57a5a74e3ab98d8b25f9fc0f8557.
Change-Id: Iaf3c61a0c0ed591c17f50f2e3eafe2debf588c95
Reviewed-on: https://chromium-review.googlesource.com/274917
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
2decb4b1
|
2015-05-25T19:20:26
|
|
Add constant folding support for geometric built-ins
This change adds constant folding support for following geometric
built-ins:
- length, distance, dot, cross, normalize, faceforward,
reflect and refract.
BUG=angleproject:913
TEST=angle_unittests, dEQP Tests
dEQP-GLES3.functional.shaders.constant_expressions.builtin_functions.geometric.*
(56 tests started passing with this change)
Change-Id: I973689554bb8c30ee3ebdf71f1b8a051ceb5e0cf
Reviewed-on: https://chromium-review.googlesource.com/273097
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
c378cd8a
|
2015-05-25T15:21:44
|
|
Check that #version 300 es directive is on the first line
ESSL3.00 and 3.10 specs don't allow even newlines before the version
directive.
BUG=angleproject:1009
TEST=WebGL 2 conformance tests, angle_unittests
Change-Id: Id7967829077e35e03572c724e0eafffbed0c975b
Reviewed-on: https://chromium-review.googlesource.com/272719
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
14e95b38
|
2015-05-07T10:10:41
|
|
translator: Reject shaders that use both FragColor+FragData.
*re-land with fix for unused var in release*
We checked this at link time in the D3D back-end, but this
restriction applies to all shaders.
TEST=dEQP-GLES2.functional.shaders.fragdata.*
BUG=angleproject:995
BUG=478572
Change-Id: I63258f4de47e658812822f31601cc235f48c0826
Reviewed-on: https://chromium-review.googlesource.com/271470
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
531e3d22
|
2015-05-15T11:01:27
|
|
Revert "translator: Reject shaders that use both FragColor+FragData."
The change introduced a warning in Windows release build.
This reverts commit b8e3a568bbd16fca1099a1b54cd82a981cd88a8e.
Change-Id: I77bbc35876043c9a164aa2665965f5189ee90052
Reviewed-on: https://chromium-review.googlesource.com/271430
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
b8e3a568
|
2015-05-07T10:10:41
|
|
translator: Reject shaders that use both FragColor+FragData.
We checked this at link time in the D3D back-end, but this
restriction applies to all shaders.
TEST=dEQP-GLES2.functional.shaders.fragdata.*
BUG=angleproject:995
BUG=478572
Change-Id: I99111cc6aa05b9352693f9c3b5bc70d56c9842d4
Reviewed-on: https://chromium-review.googlesource.com/269846
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
b0c645e2
|
2015-05-12T14:25:36
|
|
Validate global initializer qualifiers
Allow only constants, other globals, temporaries, and uniforms to be used
in global variable initialization for now. The spec limits global
variable initialization further to only constant expressions, but fully
implementing this has a too large compatibility cost for ESSL 1.00, so
implement it only partially. In the case of ESSL 3.00 we can use stricter
validation, since there's no legacy to worry about.
Resubmitting the change, since the previous version neglected to remove
incorrect GLSL tests.
TEST=angle_unittests, WebGL conformance tests, angle_end2end_tests
BUG=angleproject:988
Change-Id: I1bb3b8dc305689a90eadfe8cc7705e5ac3829e03
Reviewed-on: https://chromium-review.googlesource.com/270651
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
b6a52bb4
|
2015-05-13T12:41:24
|
|
Revert "Validate global initializer qualifiers"
Seems to be failing angle_end2end_tests:
GLSLTest.GlobalStaticAndVarying_0
GLSLTest.GlobalStaticAndVarying_1
GLSLTest_ES3.GlobalStaticAndInstanceID_0
http://build.chromium.org/p/chromium.gpu.fyi/builders/Win7%20Release%20%28NVIDIA%29/builds/15598
BUG=angleproject:988
This reverts commit 6caa5e815f7e3c11e4452ed5e60446b9943db183.
Change-Id: I394b571c9b4ee739721018c5287a45df49e1471c
Reviewed-on: https://chromium-review.googlesource.com/270589
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
6caa5e81
|
2015-05-12T14:25:36
|
|
Validate global initializer qualifiers
Allow only constants, other globals, temporaries, and uniforms to be used
in global variable initialization for now. The spec limits global
variable initialization further to only constant expressions, but fully
implementing this has a too large compatibility cost for ESSL 1.00, so
implement it only partially. In the case of ESSL 3.00 we can use stricter
validation, since there's no legacy to worry about.
TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:988
Change-Id: I6a66f6a31130b44717dd2bef3082a0fc395a60b6
Reviewed-on: https://chromium-review.googlesource.com/270430
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
37ad4744
|
2015-04-27T13:18:50
|
|
Add support for parsing ESSL3 invariant qualifiers
The parser recognizes ESSL3 invariant variable declaration syntax and
marks the variables as invariant.
In ESSL3, invariant out variables can be linked to non-invariant
in variables, so linking checks should now be different depending on
shading language version. A shading language version dependent varying
matching check is added to the translator API to facilitate this.
Tested by deqp/data/gles3/shaders/qualification_order.html after patching
Chrome to use the new linking check API.
A previous revision of this change that broke API compatibility was
reverted since it broke Chromium FYI bots. This revision keeps deprecated
API functionality around for now so that changes can be rolled
step-by-step to Chromium without breakage.
TEST=WebGL 2 conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: Iecb64e3afd23e267ba999bc17f44390affcdfc13
Reviewed-on: https://chromium-review.googlesource.com/269940
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
9e64edce
|
2015-05-07T14:08:06
|
|
Revert "Add support for parsing ESSL3 invariant qualifiers"
Build breaks in GPU FYI bots.
BUG=angleproject:987
This reverts commit 4008879357159c7850cf105f2ae842bc68dd3c18.
Change-Id: Ia88ad302c403c65516c050eb7741316b5097bcfb
Reviewed-on: https://chromium-review.googlesource.com/269847
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
40088793
|
2015-04-27T13:18:50
|
|
Add support for parsing ESSL3 invariant qualifiers
The parser recognizes ESSL3 invariant variable declaration syntax and
marks the variables as invariant.
In ESSL3, invariant out variables can be linked to non-invariant
in variables, so linking checks should now be different depending on
shading language version. The varying matching check in the translator
API is changed to be shading language version dependent to facilitate
this.
Tested by deqp/data/gles3/shaders/qualification_order.html after patching
Chrome to use the new linking check API.
TEST=WebGL 2 conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: I3982feff7380c4dfc647940ee03a020692dd0c59
Reviewed-on: https://chromium-review.googlesource.com/267663
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
b11e2483
|
2015-05-04T14:21:22
|
|
translator: Fix validation sometimes modifying builtins.
When validating some shaders with out-of-bounds array indexes,
we would write the sanitized index into the global symbol table.
We would then overwrite a wrong value for the builtin. This
fixes the WebGL test extensions/webgl-draw-buffers-max-draw-buffers.
Also mark const on as many uses ConstantUnion as we can.
BUG=angleproject:993
Change-Id: I110efaf1b7b0158b08b704277e3bc2472437902c
Reviewed-on: https://chromium-review.googlesource.com/268962
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
6ba6eadc
|
2015-05-04T14:21:21
|
|
Rename ConstantUnion to TConstantUnion.
This clarified that we're using the Pool allocator/deallocator for
this type.
BUG=angleproject:993
Change-Id: If8c95f6054d07291e7014be0d4e35766ba2e943b
Reviewed-on: https://chromium-review.googlesource.com/269131
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
55def583
|
2015-05-04T11:24:57
|
|
translator: Fix variable collection for gl_DepthRange.
*re-land with Linux fixes, and fix for locations*
This built-in uniform wasn't being collected in VariableInfo.cpp.
Also remove the existing workaround for D3D gl_DepthRange
collection.
BUG=angleproject:991
BUG=478570
Change-Id: Iba84651bfc58f82fd4ce039421874f561f83c348
Reviewed-on: https://chromium-review.googlesource.com/268840
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
26e1a466
|
2015-05-01T19:19:19
|
|
Revert "translator: Fix variable collection for gl_DepthRange."
Build errors on Linux:
error: comparison of integers of different signs: 'const int' and 'const unsigned int'
BUG=angleproject:991
BUG=478570
This reverts commit f1ae954b660cb058c40665b623f4d689b65180d4.
Change-Id: I217aba1b32dc0e70d6153337a1f0ccef0483a0e1
Reviewed-on: https://chromium-review.googlesource.com/268792
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
f1ae954b
|
2015-05-01T13:33:57
|
|
translator: Fix variable collection for gl_DepthRange.
This built-in uniform wasn't being collected in VariableInfo.cpp.
Also remove the existing workaround for D3D gl_DepthRange
collection.
BUG=angleproject:991
BUG=478570
Change-Id: Ie254132e37c307323ba9e6e1705d138eea67b520
Reviewed-on: https://chromium-review.googlesource.com/268524
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
a1884f2b
|
2015-04-29T10:15:16
|
|
Fixes for the tagging of discontinuous loops
The first fix was for all loops being considered discontinuous in
OutputHLSL because of a typo that produced a tautology.
The error was not detected by the unit tests because as an optimization we
do not generate Lod0 calls when they are not needed for the callee
function (which was correctly detected by the analysis in this case).
Fixed the unit tests by adding a call to a builtin gradient operation.
The second fix was for discard not being taken into account in the
analyses of the AST, which caused a WebGL test regression after the first
fix for conformance/glsl/bugs/conditional-discard-in-loop
BUG=angleproject:982
Change-Id: I1315eac1ad36f726be52d7fda5facf3104341b1f
Reviewed-on: https://chromium-review.googlesource.com/267814
Tested-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
96e67388
|
2015-04-23T14:27:02
|
|
Fix array.length() to return a signed integer
array.length() should return a signed integer as specified in ESSL 3.00
section 4.1.9, not unsigned. Fix this and add a simple unit test - the
dEQP tests included in WebGL conformance are built in a way that they
don't catch the issue.
TEST=angle_unittests
BUG=angleproject:972
Change-Id: I1389f51751a6a25c1681f57ac3d2d52f31ecc8fb
Reviewed-on: https://chromium-review.googlesource.com/266991
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
08c9cd97
|
2015-04-22T11:39:20
|
|
Remove last uses of the enumerate_files script.
BUG=angleproject:981
Change-Id: Ib91d4b515e129241814706351b69a74e8295a250
Reviewed-on: https://chromium-review.googlesource.com/266874
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Geoff Lang <geofflang@chromium.org>
|
|
a2d53039
|
2015-04-15T14:14:44
|
|
Disallow ternary operator on arrays and structs
ESSL specs only allow a limited number of operators on arrays and
structs. The spec section on the ternary operator contradicts this to an
extent, saying that the second and third operands can be "any type" or
"any type other than an array", but we interpret the spec so that the
operator restrictions on structures and arrays override this.
BUG=angleproject:976
TEST=angle_unittests
Change-Id: Icd90d5450dcb94bb23b1683d4cb9e579e82de4ad
Reviewed-on: https://chromium-review.googlesource.com/265644
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
5290174b
|
2015-04-15T13:42:45
|
|
Refactor ternary operator parsing
Refactor ternary operator parsing so that validation is done in
ParseContext and Intermediate's role is simply to create the node added
to the tree.
Remove partially bugged checks for null nodes as a part of this - in
error cases the parser doesn't typically add null nodes to the tree, but
rather always has a fallback to add a dummy node if parsing fails as a
method of recovery. When parsing ternary operators it should be
guaranteed that none of the parameter nodes is null.
Includes a better explanation of why ternary operators are not always
folded when only the condition is constant, and a test to make sure this
doesn't regress.
BUG=angleproject:952
TEST=WebGL conformance tests, angle_unittests
Change-Id: Icbcb721b5ab36cf314a16e79f9814aef1f355fa0
Reviewed-on: https://chromium-review.googlesource.com/265643
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
376f1b5d
|
2015-04-13T13:23:41
|
|
Add support for implicit array size
ESSL3 introduces implicit array size that is determined automatically
according to the initializer. Implicit sizes are resolved when parsing
constructors and when initializers are evaluated, so ANGLE's AST will not
contain implicit sizes.
Declarations where there are two differently sized arrays with the same
implicitly sized type, for example:
float[] a = float[](0.0), b = float[](0.0, 1.0);
will be transformed into declarations where the two arrays don't share
the array size like this:
float a[1] = float[1](0.0), float b[2] = float[2](0.0, 1.0);
so they are not a problem.
Unlike sized arrays, implicitly sized arrays don't have a size limit
enforced by the parser.
Include a test that verifies that non-initialization of an implicitly
sized array defined using ESSL3 type syntax is caught by the parser.
Additionally tested with WebGL 2 test
sdk/tests/deqp/data/gles3/shaders/arrays.html
TEST=WebGL 2 conformance tests, angle_unittests
BUG=angleproject:941
Change-Id: Ib55b7601848102a103af9db284a80f09abaeb021
Reviewed-on: https://chromium-review.googlesource.com/265653
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
33e98913
|
2015-04-10T17:03:06
|
|
Add tests for disallowing arrays of arrays
TEST=angle_unittests
BUG=angleproject:941
Change-Id: Ie45a8a581bf2931ecccfc41b26db49a257fcaf1d
Reviewed-on: https://chromium-review.googlesource.com/265201
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
fa33d580
|
2015-04-09T14:33:12
|
|
Improve handling of declarator lists with empty declarations
The code previously failed to check for correctness of layout qualifiers
in case a declarator followed an empty declaration, like so:
layout(packed) uniform float, a;
Fix this by running all necessary declaration checks also for declarators
which follow an empty declaration.
structQualifierErrorCheck is merged into singleDeclarationErrorCheck.
TEST=angle_unittests, WebGL conformance tests
BUG=angleproject:969
Change-Id: Idcb0673e3bcf64087744ff0d260f51a7546f024a
Reviewed-on: https://chromium-review.googlesource.com/264812
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
43ce600c
|
2015-04-09T14:50:40
|
|
Fix a bunch of mistakes in MalformedShaderTest
A number of mistakes had slipped in to this test that made the
compilation of some shaders always fail regardless of the semantic checks
applied by the parser.
TEST=angle_unittests
BUG=angleproject:941
Change-Id: I9906792e2c7fe3805288255b855afb46840a77a7
Reviewed-on: https://chromium-review.googlesource.com/264811
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
1239ee94
|
2015-03-19T14:38:02
|
|
Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]
These attributes are now used exactly in the loops and ifs
that require them, limiting the number of failed compilations
due to excessive unrolling and flattening.
Also output Lod0 functions only when needed.
Adds unit tests for LOOP, FLATTEN and Lod0 generation.
The patch was tested against the WebGL CTS 1.0.4 for which all the
failures existed prior to this patch and seem to be unrelated to this
change. It also works correctly on the following sites that had trouble
with [[loop]] and [[unroll]]:
* dev.miaumiau.cat/rayTracer "Skull Demo"
* The turbulenz engine particle demo
* Lots of ShaderToy samples (including "Volcanic" and "Metropolis")
* Google Maps Earth mode
* Lots of Chrome Experiments
* Lagoa
* madebyevan.com/webgl-water
* SketchFab
* Unit Tests
BUG=angleproject:937
BUG=395048
Change-Id: I856de9025f10b79781929ec212dbffc2064a940e
Reviewed-on: https://chromium-review.googlesource.com/264791
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
3739d235
|
2015-04-08T12:23:44
|
|
Make checking for array non-constness depend on input version
First, remove duplicate check for const qualifier on arrays. Only keep
the check inside arrayQualifierErrorCheck().
Second, ESSL3 will introduce array initializers and by extension constant
arrays, so it should allow const qualifier on arrays. These checks are
somewhat superfluous in ESSL1 as well, since the parser already checks
for missing initializers, but it's useful to keep the informative error
messages around.
Add a few tests to make sure that when the ESSL3 implementation
progresses, it still checks for missing initializers on constant arrays.
TEST=angle_unittests
BUG=angleproject:941
Change-Id: Id871c872c5b92e2a5bf81c00080ac23004916a75
Reviewed-on: https://chromium-review.googlesource.com/264671
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
938f0029
|
2015-04-08T19:35:40
|
|
Revert "Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]"
Caused linking failures on mac because the unit test asks for TranslatorHLSL which is not compiled.
This reverts commit 3342e01f2a29343ea95961f0194f9d4f422cb840.
Change-Id: I02b2f54ca5b90611f11b7a549e75bf2e8310639d
Reviewed-on: https://chromium-review.googlesource.com/264790
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
3342e01f
|
2015-03-19T14:38:02
|
|
Use the AST analyses to narrow the usage of [[loop]] and [[unroll]]
These attributes are now used exactly in the loops and ifs
that require them, limiting the number of failed compilations
due to excessive unrolling and flattening.
Also output Lod0 functions only when needed.
Adds unit tests for LOOP, FLATTEN and Lod0 generation.
The patch was tested against the WebGL CTS 1.0.4 for which all the
failures existed prior to this patch and seem to be unrelated to this
change. It also works correctly on the following sites that had trouble
with [[loop]] and [[unroll]]:
* dev.miaumiau.cat/rayTracer "Skull Demo"
* The turbulenz engine particle demo
* Lots of ShaderToy samples (including "Volcanic" and "Metropolis")
* Google Maps Earth mode
* Lots of Chrome Experiments
* Lagoa
* madebyevan.com/webgl-water
* SketchFab
* Unit Tests
BUG=angleproject:937
BUG=395048
Change-Id: If7baddae1cdae0b3a414aa49e5a4c4babedbfe50
Reviewed-on: https://chromium-review.googlesource.com/261263
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
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>
|
|
93a90fd0
|
2015-04-07T18:14:07
|
|
Remove half-baked non-sized array support
ANGLE used to accept shaders with non-sized arrays in initializer lists.
Fix this. Proper support for implicitly sized arrays will be implemented
later for ESSL3.
TEST=angle_unittests
BUG=angleproject:941
Change-Id: I53c5ccf0f7ef09ad30e142f8350812959fc4846c
Reviewed-on: https://chromium-review.googlesource.com/264360
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|
|
5e5c826c
|
2015-03-26T14:04:54
|
|
Fix float-int conversion return type precision tracking
Float-int conversion functions are defined to always return highp values.
BUG=angleproject:865
TEST=angle_unittests
Change-Id: Idf243b483f7b5edfcb54de2755af11e17c3756d3
Reviewed-on: https://chromium-review.googlesource.com/262413
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
ecbfc5c6
|
2015-03-23T15:15:59
|
|
Fix formatting in compiler tests
Remove extraneous semicolons and fix indentation in a couple of places.
TEST=angle_unittests
Change-Id: Iaa51eb50990c0435f41dfd346ec161216cd8d372
Reviewed-on: https://chromium-review.googlesource.com/261823
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
ff699005
|
2015-03-23T14:38:42
|
|
Disallow operations on structs containing samplers
ESSL 1.00 spec section 5.9 says that equality operators don't operate on
structs containing sampler types. Section 5.7 also suggests this. ESSL
3.00 doesn't have a similar restriction.
ESSL 1.00 spec section 4.1.7 says that structs containing samplers can't
be used as l-values. This is interpreted to apply also in the case of
ESSL 3.00, which similarly disallows samplers as l-values, but doesn't
explicitly mention structs.
BUG=angleproject:954
TEST=angle_unittests, WebGL conformance tests
Change-Id: I73f74962a192e8d9449990ffa5f3d8c851491601
Reviewed-on: https://chromium-review.googlesource.com/261822
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>
|