|
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>
|
|
e2adce1b
|
2015-06-19T23:06:32
|
|
Workaround for some STLs not parsing floats with a suffix
BUG=angleproject:1046
BUG=angleproject:891
Change-Id: I01c3f024142e573385a5f40d721171ad752ffd19
Reviewed-on: https://chromium-review.googlesource.com/278210
Reviewed-by: Brandon Jones <bajones@chromium.org>
Tested-by: Corentin Wallez <cwallez@chromium.org>
|
|
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>
|
|
214c2d8e
|
2015-04-27T14:49:13
|
|
Separate invariance from qualifiers
ESSL3 makes it possible to combine invariant with several more different
qualifiers. To avoid combinatorial explosion of the qualifier enum, track
invariance with a separate boolean.
TEST=WebGL conformance tests, angle_unittests
BUG=angleproject:987
Change-Id: I0c6629e5ca2ded06db9ac9e5bab2fb6480299a5a
Reviewed-on: https://chromium-review.googlesource.com/267662
Reviewed-by: Olli Etuaho <oetuaho@nvidia.com>
Tested-by: Olli Etuaho <oetuaho@nvidia.com>
|
|
2c43325d
|
2014-12-03T12:36:54
|
|
Fix double delete with invariant varyings.
The compiler would leave some TString variables lying around
after the pool gets released, leading to a potential crash.
BUG=angle:846
Change-Id: I484ed9b14bba9bf653f6ed4001ae79f87791b0dd
Reviewed-on: https://chromium-review.googlesource.com/232780
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
|
|
70a0b2a1
|
2014-10-21T11:48:39
|
|
Fix varying interpolation parsing.
This was broken sometime in the CollectVariables refactor.
BUG=angle:803
Change-Id: Iaa09449f02290c4547f87c1560465dc8998d957c
Reviewed-on: https://chromium-review.googlesource.com/224104
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
|
|
94ac7b78
|
2014-10-15T18:22:08
|
|
Invariant related processing.
* Fix a bug in PreProcessor for STDGL pragma.
* Record all invariant settings and set them in ShaderVariable.
* Write #pragma STDGL invariant(all) in GL
BUG=angle:776
TEST=https://www.khronos.org/registry/webgl/sdk/tests/conformance/glsl/misc/shaders-with-invariance.html
Change-Id: Ie28b75480deed79f0c9f26e3b98f1778d1290182
Reviewed-on: https://chromium-review.googlesource.com/223610
Tested-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
|
|
54ad4f81
|
2014-09-03T09:40:46
|
|
Use the CollectVariables path on the HLSL translator.
This approach consolidates our two methods, and lets us reuse the
same code for both methods of variable collection.
BUG=angle:466
Change-Id: Ie92f76ff0b6d0d0dbfd211a234d0ab86290fa798
Reviewed-on: https://chromium-review.googlesource.com/213504
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
a6f267f9
|
2014-08-27T11:44:15
|
|
Fix row-major layout tracking in interface blocks.
Some block field types, such as nested structs, were bugged. This
only affects our "CollectVariables" path, not our current HLSL
UBO path.
BUG=angle:466
Change-Id: I2b8daf58aa7ec1ad06a80d38f57e76087eacccdc
Reviewed-on: https://chromium-review.googlesource.com/213503
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
42bcf32e
|
2014-08-25T16:20:46
|
|
Refactor ShaderVariables to store fields in the base.
Instead of only storing structure information in Varyings, Uniforms
and Interface Block Fields, store it in the base class. Also only
store base variable information for struct fields, instead of fully
typed information. This works because stuff like interpolation type,
invariance, and other properties are for the entire variable, not
individual fields.
Also add new fields for interface block instance name, varying
invariance and structure name for all struct types.
BUG=angle:466
Change-Id: If03fc071e6becb7aad6dea5093989bba7daee69e
Reviewed-on: https://chromium-review.googlesource.com/213501
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
1c28e1f0
|
2014-08-04T11:37:54
|
|
Fix shaders with invariant keyword.
We would trigger assertion failures in Debug mode, and fail to
parse and translate correctly in Release.
BUG=angle:711
Change-Id: Ibb7f33b288376617598578f48c7bbdbdec044279
Reviewed-on: https://chromium-review.googlesource.com/210822
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
13cfd276
|
2014-07-17T14:16:28
|
|
Move shader variables header to include folder.
This allows the API to query for clear type introspection into the
parsed GL types from the translator. The returned types are not
expanded and have properly nested fields.
This patch uses the types from ShaderVars.h to return GL type
information. The app must include this header to get access to
the types structs.
BUG=angle:466
Change-Id: I28ad0d6f11a964804dd234ef0d00651f665d1ae3
Reviewed-on: https://chromium-review.googlesource.com/208751
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
d5512cd4
|
2014-07-10T17:50:08
|
|
Collect shader outputs and interface block information.
This paves the way for returning ES3-specific info from the shader
translator with the new query methods.
BUG=angle:466
Change-Id: Ib13cdb604854cdf11e9dc00dd94f18eadc946561
Reviewed-on: https://chromium-review.googlesource.com/206770
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
77f74853
|
2014-07-08T15:02:34
|
|
Add a GetVariableInfo helper method.
This method replaces the similar logic in storing uniforms,
varyings, and interface blocks when collecting variable info.
We can also re-use this method for both GLSL and HLSL programs.
BUG=angle:466
Change-Id: Ie6c13abe0f09f38b2f9b36e117caae4833eaccbf
Reviewed-on: https://chromium-review.googlesource.com/206566
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
a718c1e0
|
2014-07-02T15:31:22
|
|
Use shader variable types for variable collection.
Retire the old TVariableInfoList structure, and use the new
objects which we will expose more directly through the API.
BUG=angle:466
Change-Id: I999a97369bfb67cf73cd659c4fe885b41429d304
Reviewed-on: https://chromium-review.googlesource.com/205839
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
aa72d782
|
2014-07-02T15:31:19
|
|
Remove duplicate SH and GL functions.
In several places we were using variable query methods that
were duplicated between the old SH enums and the corresponding
GL enums. We can use the common GL enum versions now.
BUG=angle:466
Change-Id: Ib8797fe6bc75828e05aed37b1f5fbd4b9ba03d22
Reviewed-on: https://chromium-review.googlesource.com/205594
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <capn@chromium.org>
|
|
f2575989
|
2014-06-25T16:04:54
|
|
Use the sh namespace for shader variables.
Since these types originate from the translator, use an appropriate
namespace. Also rename some of the gl helper functions to be more
specific to their functionality.
BUG=angle:466
Change-Id: Idc29987b2053b3c40748dd46b581f3dbd8a6fd61
Reviewed-on: https://chromium-review.googlesource.com/204680
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
|
|
033dae67
|
2014-06-18T12:56:28
|
|
Move OutputHLSL utility methods to other files.
OutputHLSL was become a large, unweildy file. Some were also useful
to other classes, even on the GL back-end, but were inacessible.
Refactoring patch only.
BUG=angle:466
Change-Id: Id216147122ca105c6ccdf0ba0c5f6c5038726965
Reviewed-on: https://chromium-review.googlesource.com/203459
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>
|
|
17732823
|
2013-08-29T13:46:49
|
|
Moved the compiler source files into directories based on their project and added a compiler.gypi to generate the compiler projects.
|