src/compiler.gypi


Log

Author Commit Date CI Message
Olli Etuaho 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>
Geoff Lang 91dbc188 2015-06-17T16:19:29 Enable needed extensions in generated GLSL shaders and call them when possible. reland: use the defined preprocessor function. BUG=angleproject:1044 Change-Id: I6171708a2d55ec085ba2c598a1a863779842da6c Reviewed-on: https://chromium-review.googlesource.com/311270 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang e7fcf1e3 2015-11-05T21:23:53 Revert "Enable needed extensions in generated GLSL shaders and call them when possible." This reverts commit 233b334213c1a4853e81f71ba90aa223b2a68dce. Change-Id: Id99024b736324ad030ce63c5d0baae32b6d7f54b Reviewed-on: https://chromium-review.googlesource.com/311181 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 233b3342 2015-06-17T16:19:29 Enable needed extensions in generated GLSL shaders and call them when possible. BUG=angleproject:1044 Change-Id: Ife94d2258fb912974aa97484a0e30f289dd96734 Reviewed-on: https://chromium-review.googlesource.com/278324 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 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>
Jamie Madill 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>
Olli Etuaho 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>
Jamie Madill 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>
Corentin Wallez 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>
Geoff Lang ee48376c 2015-09-15T13:12:07 Update to the latest versions of the GL and EGL headers. Add GLES 3.1 and 3.2 headers. Remove GLES 3.0 extension headers and entry point files. Re-land fixes double define from different style defines in libGLESv2.gypi and other projects. Re-land fixes missing defines in angle_util project in gn. Change-Id: I1952413cd4390e6f5450df809f8f5867bf6f49e2 Reviewed-on: https://chromium-review.googlesource.com/299771 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 0393310f 2015-09-15T16:59:59 Revert "Update to the latest versions of the GL and EGL headers." Issues with GN build. This reverts commit 8284436798dd184afe61cbb586185cb68e503d6f. Change-Id: I99d186019135bbbe250e95c9567854108d31c556 Reviewed-on: https://chromium-review.googlesource.com/299870 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 82844367 2015-09-11T13:52:12 Update to the latest versions of the GL and EGL headers. Add GLES 3.1 and 3.2 headers. Remove GLES 3.0 extension headers and entry point files. Re-land fixes double define from different style defines in libGLESv2.gypi and other projects. Change-Id: I6204dc767bd83b7aa7e4d6e2fa338b2ce7f304d8 Reviewed-on: https://chromium-review.googlesource.com/299401 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang e12150fe 2015-09-11T20:06:27 Revert "Update to the latest versions of the GL and EGL headers." Linux compile failures to do gyp defines. This reverts commit 8bbeabc1795473f7b3141219be3970fea3b95a71. Change-Id: Icb31dd817414b3a9ab36e88cedab9c725af26b6b Reviewed-on: https://chromium-review.googlesource.com/299173 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8bbeabc1 2015-09-11T13:52:12 Update to the latest versions of the GL and EGL headers. Add GLES 3.1 and 3.2 headers. Remove GLES 3.0 extension headers and entry point files. Change-Id: Icaa444efa52f3b9d1497189da92bc364545a6e3a Reviewed-on: https://chromium-review.googlesource.com/299172 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 7aef6020 2015-09-11T19:04:00 Revert "Update to the latest versions of the GL and EGL headers." Broke the Clang compile. In file included from ../../third_party/angle/include/GLSLANG/ShaderLang.h:28: ../../third_party/angle/include/KHR/khrplatform.h:282:30: error: no newline at end of file [-Werror,-Wnewline-eof] #endif /* __khrplatform_h_ */ Several other similar errors. BUG=None This reverts commit aac2035d851fc92b159dc8e01cfd2ebb86e99e4a. Change-Id: I407e7e65bb6a46d1d941c54cdf14a14758e22d96 Reviewed-on: https://chromium-review.googlesource.com/298834 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang aac2035d 2015-09-11T13:52:12 Update to the latest versions of the GL and EGL headers. Add GLES 3.1 and 3.2 headers. Remove GLES 3.0 extension headers and entry point files. Change-Id: I8e9df6262dc1b2536a409c5791734e4a4d63b115 Reviewed-on: https://chromium-review.googlesource.com/299341 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 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>
Jamie Madill 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>
Olli Etuaho 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>
Cooper Partin 66d6313e 2015-08-13T10:22:42 Add target platform version for generating Windows 10 WinRT projects BUG=angleproject:1122 Change-Id: Ia6a79ef1b4e94e15830981f0cee6269c9f0c71ca Reviewed-on: https://chromium-review.googlesource.com/293401 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Dmitry Skiba 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>
Jamie Madill 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>
Dmitry Skiba 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>
Jamie Madill 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>
Dmitry Skiba 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>
Olli Etuaho 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>
Olli Etuaho 5bdb8472 2015-06-03T16:21:33 Remove unused QualifierAlive traverser This class is not used anywhere in the code. TEST=angle_unittests Change-Id: Ib59573203636a669b136e3823d0abea8120f448e Reviewed-on: https://chromium-review.googlesource.com/274896 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho 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>
bungeman 46ccef19 2015-05-27T17:14:43 Remove ref to intermediate.h. With https://chromium-review.googlesource.com/213300 b9b5c105799bac1a4738c7589538fab523e3a43d the file intermediate.h was renamed Intermediate.h. However, compiler.gypi now contains references to both, but the lower case version doesn't exist anymore, so it should be removed. Change-Id: I6b36bd561f110694daecd4ad911036c94300cd1f Reviewed-on: https://chromium-review.googlesource.com/273593 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho a5316a18 2015-05-15T15:25:16 Separate expressions returning arrays for HLSL output Complex array expressions need to be broken down in HLSL output so that they are built out of simple combinations of operations and symbols. In practice this means that array constructors, array assignments and functions that return arrays inside complex expressions need to be replaced by symbols. After this change, ANGLE passes all dEQP-GLES3.functional.shaders.arrays tests. The old SimplifyArrayAssignment stub is removed, the new name SeparateExpressionsReturningArrays more closely reflects what the function needs to do. BUG=angleproject:971, angleproject:941 TEST=dEQP-GLES3.functional.shaders.arrays.*, WebGL 2 conformance tests Change-Id: Iab8dde72b1126dc2f958ffb5b1b830fe3ce25912 Reviewed-on: https://chromium-review.googlesource.com/272122 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Cooper Partin aa5cbdc8 2015-05-18T10:33:00 Updated generate_winrt_projects to produce Windows 10 projects BUG=angleproject:1004 Change-Id: I6f50226b21ff92ac85dbe5ed2e39dcc4f7e39306 Reviewed-on: https://chromium-review.googlesource.com/272160 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho a6f22096 2015-05-08T18:31:10 Make UnfoldShortCircuit to change AST instead of writing output This is needed to make way for further AST transformations to handle array expressions that need to work correctly together with unfolding short- circuiting operators. This also improves the maintainability of HLSL output by isolating the unfolding into a separate compilation step. The new version of UnfoldShortCircuit traverser will traverse the tree until an expression that needs to be unfolded is encountered. It then unfolds it and gets reset. The traverser will be run repeatedly until no more operations to unfold are found. This helps with keeping the traverser's design relatively simple. All declarations are separated to single declarations before short-circuit unfolding is run. Previously OutputHLSL already output every declaration separately. BUG=angleproject:960 TEST=WebGL conformance tests, angle_unittests, angle_end2end_tests Change-Id: Id769be396adbd4c0223e418980dc464dd855f019 Reviewed-on: https://chromium-review.googlesource.com/270460 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 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>
Jamie Madill 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>
Olli Etuaho 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>
Olli Etuaho d57e0db3 2015-04-24T15:05:08 Remove separate compilerdebug.h in favor of debug.h This unifies the behavior across the compiler and rest of ANGLE - for example, one can use #define ANGLE_TEST_CONFIG to disable UNIMPLEMENTED asserts in both the compiler and the rest of ANGLE. Compiler traces from asserts also go to the same TRACE_OUTPUT_FILE as other traces instead of being directed through ParseContext. The compiler build already includes the common sources, so no changes to build config are needed. The original version of this change was reverted due to release mode build issues. This version adds UNUSED_ASSERTION_VARIABLE where needed. TEST=angle_unittests, angle_end2end_tests, dEQP-GLES3.functional.shaders.* BUG=angleproject:983 Change-Id: I36929020a04251b8bc834fbb3c069e10128c3082 Reviewed-on: https://chromium-review.googlesource.com/267411 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill a656490d 2015-04-27T14:30:32 Revert "Remove separate compilerdebug.h in favor of debug.h" Causing compile warnings in Release: 1>compiler\translator\CallDAG.cpp(238): error C2220: warning treated as error - no 'object' file generated 1>compiler\translator\CallDAG.cpp(238): warning C4189: 'op' : local variable is initialized but not referenced 1>compiler\translator\IntermNode.cpp(1495): error C2220: warning treated as error - no 'object' file generated 1>compiler\translator\IntermNode.cpp(1495): warning C4189: 'replaced' : local variable is initialized but not referenced 1>compiler\translator\IntermNode.cpp(1517): warning C4189: 'replaced' : local variable is initialized but not referenced This reverts commit 5271025865b34685da71d0309131c5aff2e32f71. Change-Id: Icdf1c37eef22a13d083767609ab0b0285d3dc517 Reviewed-on: https://chromium-review.googlesource.com/267359 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 52710258 2015-04-24T15:05:08 Remove separate compilerdebug.h in favor of debug.h This unifies the behavior across the compiler and rest of ANGLE - for example, one can use #define ANGLE_TEST_CONFIG to disable UNIMPLEMENTED asserts in both the compiler and the rest of ANGLE. Compiler traces from asserts also go to the same TRACE_OUTPUT_FILE as other traces instead of being directed through ParseContext. The compiler build already includes the common sources, so no changes to build config are needed. TEST=angle_unittests, angle_end2end_tests, dEQP-GLES3.functional.shaders.* BUG=angleproject:983 Change-Id: Ifca4d16f667b1e5cf9c2e7cc4139940091917a1c Reviewed-on: https://chromium-review.googlesource.com/266993 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho a8c414ba 2015-04-16T15:51:03 Add basic support for arrays as return values in HLSL output In HLSL output, user-defined functions that have an array as their return value get changed so that they have the array as an out parameter instead. Still missing: support for calling a function that has array as a return value without assigning the array. Also support for assignments inside complex expressions. TEST=dEQP-GLES3.functional.shaders.arrays.return.* BUG=angleproject:941 Change-Id: I79f5170139116a3dcfb2be2df5f0f79a3d955ca8 Reviewed-on: https://chromium-review.googlesource.com/266003 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 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>
Olli Etuaho 822fa84e 2015-04-16T14:26:10 Support array initialization in HLSL output Do this by separating each array initialization into a declaration and an assignment. Array assignment is already supported in HLSL output by replacing it with a function call. The functionality is tested by the struct array constructor tests in dEQP. BUG=angleproject:941 TEST=dEQP-GLES3.functional.shaders.arrays.constructor.* Change-Id: Ida84fc343b767bea8b2d04e91c60cb8197d39039 Reviewed-on: https://chromium-review.googlesource.com/266002 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho fc0e2bc0 2015-04-16T13:39:56 Put each array declarator into a separate declaration in HLSL output Since HLSL doesn't support arrays as l-values, HLSL output needs to split declarators that initialize arrays to variable declaration and assignment implemented via a function call. To prepare for this, it is necessary that each declarator has its own declaration. BUG=angleproject:941 TEST=angle_end2end_tests, WebGL conformance tests Change-Id: I43dee487578561c01dbde90c2f55a93dda2f057a Reviewed-on: https://chromium-review.googlesource.com/266001 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 4176cd64 2015-04-02T11:14:38 Remove now unused DetectDiscontuinity.h/.cpp BUG=angleproject:937 BUG=395048 Change-Id: Ie8e520267d594a595201cb7c2438a2202d9adf25 Reviewed-on: https://chromium-review.googlesource.com/263745 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez f4eab3b9 2015-03-18T12:55:45 Implement gradient operation AST analysis This will allow narrowing down which usages of [[flatten]] and [[unroll]] are actually useful. BUG=angleproject:937 BUG=395048 Change-Id: Ib8d7b98431b8cd3563e1eff8ecc9ed5df1a9b7d6 Reviewed-on: https://chromium-review.googlesource.com/263775 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 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>
Corentin Wallez 711d8663 2015-04-02T19:43:57 Revert "Implement gradient operation AST analysis" This reverts commit 2fc57a2ace58b7ae3106344c56be94948f761b2a. Change-Id: I619297090c8441c1b90099437f8764263cdd68cc Reviewed-on: https://chromium-review.googlesource.com/263728 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang 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>
Corentin Wallez 2fc57a2a 2015-03-18T12:55:45 Implement gradient operation AST analysis This will allow narrowing down which usages of [[flatten]] and [[unroll]] are actually useful. BUG=angleproject:937 BUG=395048 Change-Id: Ic31e434c7b5bb6c32eff2336e5949391bfee25a5 Reviewed-on: https://chromium-review.googlesource.com/260930 Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 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>
Olli Etuaho b2d6a9be 2015-03-30T16:00:53 Stub simplifying array assignment for HLSL output Add an AST traverser that rejects shaders with expressions that use the return value of an assignment where an array is assigned to another array. In the future this should be made into a tool that can simplify these expressions so that return values of array assignments are not used. In its current form this code prevents OutputHLSL from producing garbage code when the original code contains expressions like a = (b = c); where a, b, and c are all arrays. BUG=angleproject:960 Change-Id: I11353d7ed7160c853e58a0ef3471ca439cb314c8 Reviewed-on: https://chromium-review.googlesource.com/263070 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 2cd7a0ed 2015-02-27T13:57:32 Remove switch fall-through on HLSL Remove fall-through from non-empty labels in switch statements. Tested with dEQP-GLES3.functional.shaders.*switch*. All pass except for tests that require dFdx/dFdy, which fail for an unrelated reason. Additional test coverage could still be useful for cases where a label is terminated by a continue or return statement. BUG=angle:921 Change-Id: I4741867789a9308d66d0adeabdaf83907106e2d2 Reviewed-on: https://chromium-review.googlesource.com/254550 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho ac5274df 2015-02-20T10:19:08 Add validation for the structure of switch statements Implement a traverser to check for the following errors: -More than one default or replicated constant expression -No statement between a label and the end of a switch statement -Statements in a switch statement before the first case statement -Mismatch between the type of init-expression and type of a case label -Case or default label nested inside other control flow nested within the corresponding switch Tested by manually disabling shading language version checks for switch and by manually enabling case statements in a Chromium build and checking that the expected errors are generated. BUG=angle:921 Change-Id: I99c49c17c8b520849adbe4d8521e46cb10e20e41 Reviewed-on: https://chromium-review.googlesource.com/251524 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Daniel Bratell 73941deb 2015-02-25T14:34:49 Disable the HLSL code in Angle if it is not being used. We're only using the HLSL code in Windows so it's not necessary to compile and distribute it on other platforms. This adds a defined ANGLE_ENABLE_HLSL that can be checked in files that are used by non-HLSL code as well. Mostly the HLSL code is just not include by the build system. Details of the space savings (heavily truncated) Total change: -165717 bytes =========================== -606 - Source: angle/src/common/utilities.cpp -627 - Source: angle/src/compiler/translator/FlagStd140Structs.cpp -695 - Source: /usr/include/c++/4.8/bits/stl_algo.h -710 - Source: angle/src/compiler/translator/TranslatorHLSL.cpp -713 - Source: angle/src/compiler/translator/IntermNode.h -863 - Source: /usr/include/c++/4.8/bits/stl_map.h -935 - Source: angle/src/compiler/translator/blocklayout.cpp -1515 - Source: angle/src/compiler/translator/BuiltInFunctionEmulator.cpp -1655 - Source: angle/src/compiler/translator/UnfoldShortCircuit.cpp -2375 - Source: /usr/include/c++/4.8/bits/vector.tcc -3135 - Source: angle/src/compiler/translator/RewriteElseBlocks.cpp -4656 - Source: angle/src/compiler/translator/UtilsHLSL.cpp -5265 - Source: angle/src/compiler/translator/BuiltInFunctionEmulatorHLSL.cpp -6505 - Source: /usr/include/c++/4.8/bits/stl_tree.h -11480 - Source: angle/src/compiler/translator/UniformHLSL.cpp -13580 - Source: angle/src/compiler/translator/StructureHLSL.cpp -18964 - Source: ?? (constant strings and a few vtbls) -89332 - Source: angle/src/compiler/translator/OutputHLSL.cpp Change-Id: I23ccc98abd0a21f847dd34f9482800b3ba679d56 Reviewed-on: https://chromium-review.googlesource.com/251528 Tested-by: bratell at Opera <bratell@opera.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 1033e1d8 2015-02-12T12:03:13 Move operator definitions to their own file This generalizes GetOperatorString so that it can be used outside ValidateLimitations. BUG=angle:911 Change-Id: I43a160b3d7d60388ad529a72f1720d3171f67315 Reviewed-on: https://chromium-review.googlesource.com/249073 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 562e81bb 2015-01-14T14:31:02 Fix Linux build, and update BUILD.gn. Re-re-land with fixes for Linux and Android. We were getting multiply defined symbol errors on Linux for some stuff in the common sources. Switch to using a static lib target for the common sources, and also sync BUILD.gn with the latest gyp. BUG=angle:773 Change-Id: Ia2d52978a167c532e5e76cb711de589855eff44e Reviewed-on: https://chromium-review.googlesource.com/240553 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 433c85d3 2015-01-13T22:52:17 Revert "Fix Linux build, and update BUILD.gn." Still more build failures, different ones this time. This reverts commit 9f8a57c6419f64965fd97fcc0df8e138677febaf. Change-Id: I7bea8e24403d92ca4ecb2ee0f24f9e065db5366d Reviewed-on: https://chromium-review.googlesource.com/240550 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9f8a57c6 2015-01-13T11:13:56 Fix Linux build, and update BUILD.gn. Re-land with fixes for Android. We were getting multiply defined symbol errors on Linux for some stuff in the common sources. Switch to using a static lib target for the common sources, and also sync BUILD.gn with the latest gyp. BUG=angle:773 Change-Id: Id3edecc633b1c4be205558137c91baf87f256156 Reviewed-on: https://chromium-review.googlesource.com/240145 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 9e0478f6 2015-01-13T11:13:54 Move the block layout code to translator. This code is easily accessible from the translator, with the proper export calls. This facilitates adding a common static library, since this code calls some methods in translator. BUG=angle:773 Change-Id: I0c50098ec3f67c2df7749b3c2518be0a9fd939e2 Reviewed-on: https://chromium-review.googlesource.com/240093 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 5c9cd3d1 2014-12-18T13:04:25 Implement hyperbolic function support for ESSL 3.00 Emulating arc hyperbolic functions is required on HLSL, where they do not exist natively. For this, BuiltInFunctionEmulator is split into GLSL and HLSL subclasses. The GLSL subclass handles the pre-existing built-in emulation implemented for working around OSX bugs, and the HLSL subclass handles emulating asinh, acosh and atanh on HLSL. BUG=angle:855 Change-Id: I0dfeffb862ac27ba7f9ecf5492ec31d9d952b273 Reviewed-on: https://chromium-review.googlesource.com/236861 Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 04184fb0 2015-01-09T16:51:16 Revert "Fix Linux build, and update BUILD.gn." This reverts commit ed409f938b4fd8db89d8551d2bf7fc6a6b9ad9b7. Change-Id: I208a2c43c73e99ae95988c6d81ed64691bd8a99f Reviewed-on: https://chromium-review.googlesource.com/239900 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill ed409f93 2015-01-07T13:22:02 Fix Linux build, and update BUILD.gn. We were getting multiply defined symbol errors on Linux for some stuff in the common sources. Switch to using a static lib target for the common sources, and also sync BUILD.gn with the latest gyp. BUG=angle:773 Change-Id: I212284cfa90cd117a784a5f17057f47dd08900d1 Reviewed-on: https://chromium-review.googlesource.com/239193 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 352beffc 2014-11-19T13:45:55 Remove RemoveAllTreeNodes, since it was a no-op IntermNode operator delete() or any of the IntermNode destructors don't do anything, since all the AST memory is allocated on the PoolAllocator. Because of this, RemoveAllTreeNodes was simply a no-op, and redundant with the PoolAllocator deallocation procedure, and could confuse people reading the code to think that IntermNodes should be deleted individually, when in fact this is not the case. BUG=angle:831 Change-Id: Ie1ccaa51986aabf267280d92a8e76ca9f97a19e5 Reviewed-on: https://chromium-review.googlesource.com/230730 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 853dc1ab 2014-11-06T17:25:48 Add mediump and lowp precision emulation support for GLSL output This implements the rounding as specified in WEBGL_debug_shader_precision extension proposal for desktop GLSL and ESSL output. The bulk of the new functionality is added in the form of a new EmulatePrecision AST traverser, which inserts calls to the rounding routines angle_frm and angle_frl in the appropriate places, and writes the rounding routines themselves to the shader. Compound assignments which are subject to emulation are transformed from "x op= y" to "angle_compound_op_frm(x, y)", a call to a function which does the appropriate rounding and places the result of the operation to x. The angle_ prefixed names should not clash with user-defined names if name hashing is on. If name hashing is not on, the precision emulation can only be used if the angle_ prefix is reserved for use by ANGLE. To support the rounding routines in output, a new operator type is added for internal helper function calls, which are not subject to name hashing. In ESSL output, all variables are forced to highp when precision emulation is on to ensure consistency with how precision emulation performs on desktop. Comprehensive tests for the added code generation are included. BUG=angle:787 Change-Id: I0d0ad9327888f803a32e79b64b08763c654c913b Reviewed-on: https://chromium-review.googlesource.com/229631 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Geoff Lang 2207213b 2014-11-20T15:15:01 Move as many files as possible from common to libANGLE. BUG=angle:733 Change-Id: If01c91cd52ac5c2102276a9fdc4b68ebc13e47f9 Reviewed-on: https://chromium-review.googlesource.com/231850 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 4349ab85 2014-11-25T15:53:34 Revert "Move as many files as possible from common to libANGLE." Chromium directly includes our common/version.h and couldn't build after this change. This reverts commit f0a2c7727f9863c38a435a16a69d513c481fbbdd. Change-Id: Iafc41b1a3973f609518fe3588fdb64cecc285332 Reviewed-on: https://chromium-review.googlesource.com/231840 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f0a2c772 2014-11-20T15:15:01 Move as many files as possible from common to libANGLE. BUG=angle:733 Change-Id: I40cee6e2e305ac493acbc8649f858785c0569aed Reviewed-on: https://chromium-review.googlesource.com/231051 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Cooper Partin 88d3b8cb 2014-10-08T10:41:56 Added IInspectable EGLNativeWindowType and ICoreWindow support Change-Id: I6dd7fef72a73572d4a3deda7ce36a11da3a75c81 Reviewed-on: https://chromium-review.googlesource.com/224366 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill e020bed5 2014-10-20T16:16:46 Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support" Causing regressions in the build: http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/20182 This reverts commit 756aebfc7afa6d0de14e96637ef396dd7b290c2d. Change-Id: I2f4bdb5aeb429c9bbc5e655a1761704f33737841 Reviewed-on: https://chromium-review.googlesource.com/224221 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin 756aebfc 2014-10-08T10:41:56 Added IInspectable EGLNativeWindowType and ICoreWindow support Change-Id: I34e443b1e194800460e441ac6cee42cf68430564 Reviewed-on: https://chromium-review.googlesource.com/224302 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Shannon Woods 8858cf0a 2014-10-17T20:53:32 Revert "Added IInspectable EGLNativeWindowType and ICoreWindow support" due to build failures on Chromium FYI bots. This reverts commit 406a3be91cc8175df95bd390425e35830778f2d5. Change-Id: Ica2abd2e557a4fd9852d85b7fc018e3d272b6edf Reviewed-on: https://chromium-review.googlesource.com/224051 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Cooper Partin 406a3be9 2014-10-08T10:41:56 Added IInspectable EGLNativeWindowType and ICoreWindow support Change-Id: I9ad82b7819bcca1c05e7aa60dc2baec4a7bc403c Reviewed-on: https://chromium-review.googlesource.com/222360 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b60fe31f 2014-09-26T14:56:41 Fix the ANGLE_ENABLE_TRACE build. We needed to include angleutils.cpp in libtranslator for this to compile. Also allow the event helpers to record API calls even if ANGLE_ENABLE_PERF is off. BUG=angle:513 Change-Id: I2646d5ebeae536a4a7f1cd7ecaf0ce019ce5ff76 Reviewed-on: https://chromium-review.googlesource.com/219756 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill b1a85f48 2014-08-19T15:23:24 Rename compiler intermediate source files. This prevents confusion between "TIntermediate" and "TIntermNode". BUG=angle:711 Change-Id: Ib7a086382a479db3f77bf2ab06ce321aa7b35d13 Reviewed-on: https://chromium-review.googlesource.com/212936 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org>
Zhenyao Mo e740addb 2014-07-18T17:01:01 Add compiler option SH_REGENERATE_STRUCT_NAMES. BUG=angle:701 TEST=webgl conformance tests Change-Id: I13b35900956e7d840d5891a5bab90a400347cd6f Reviewed-on: https://chromium-review.googlesource.com/209229 Tested-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Jamie Madill a2ad4e8a 2014-07-17T14:16:32 Export shader variables from the translator DLL. This will allow us to use these methods when compiling the translator as a DLL. BUG=angle:466,697 Change-Id: Ic9169fb7c69fe0bf5f98addfc128a30ee6b2159d Reviewed-on: https://chromium-review.googlesource.com/208752 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 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>
Jamie Madill 6a72979f 2014-07-18T10:33:14 Move shadervars constructors to cpp files. This avoid unnecessary binary bloat from STL default constructors and assignment operators. BUG=angle:466,697 Change-Id: I679e524d3e3dbd0d3866fc30a5a01967d8769249 Reviewed-on: https://chromium-review.googlesource.com/208356 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: bratell at Opera <bratell@opera.com> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Brett Wilson 04bac60c 2014-07-16T14:19:18 Explicitly list files for the build. Removes shelling out to enumerate_files for the main targets (tests and examples are currently unchanged) in favor of explicitly listing out the files in the build. There are a number of reasons. My immediate reason is that doing this allows the file lists to be shared with the GN build so the GYP and GN builds of angle should mostly automatically stay in sync now. In addition, I don't think we should be enumerating files in GYP. No other Chrome sub-projects do this, and Chrome engineers expect files to be listed in .gyp* files. It's also slower to shell out a bunch of times to get the file lists (this matters more in the GN build which runs very quickly). Updates the GN build to share these file lists. This unbreaks the Windows GN Angle build. BUG=angle:698 Change-Id: Iab8829628aeb7232bb64f4c247c35c6485bba3ee Reviewed-on: https://chromium-review.googlesource.com/208461 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Brett Wilson <brettw@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Geoff Lang 44fa7594 2014-05-30T11:50:07 Refactor platform related functionality into platform.h and tls.h. Since libGLESv2 and libEGL will eventually be cross platform, it will be useful to have platform defines and TLS functions that work everywhere. BUG=angle:664 Change-Id: Ia357925a0992d82e8b446d88d32a1984d319e6e8 Reviewed-on: https://chromium-review.googlesource.com/202133 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 006ed1ed 2014-04-28T15:47:39 Reduce translator sources compile count to one. With this change, the common sources shared between translator and translator_static are compiled in a static library. There is only one file with exported functions which needs to be compiled for each target. This should reduce ANGLE and chromium build times. BUG=angle:569 Change-Id: I3ce011872323ec988befbd6db731add4fce5787b Reviewed-on: https://chromium-review.googlesource.com/197271 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8cc03bf7 2014-04-11T13:33:57 Revert "Remove the second translator target, only using static." This reverts commit d51df461e52ac9421201234fff488104f788a7c3. Conflicts: projects/build/all.sln projects/samples/samples.sln src/compiler.gypi Change-Id: I6e1d77531df61de28e4402ed1916f6ecdebb68fd Reviewed-on: https://chromium-review.googlesource.com/192890 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang d095bdaa 2014-04-07T14:21:14 Add a common include in the project definitions. Any projects that may be included by gyp files outside our project (chrome or skia) may not have the same defines or ignored compiler warnings. To make sure that we can always compile, each project now includes a common file with all required definitions and gyp variables. BUG=angleproject:583 Change-Id: I702bee975d0554c51bfa03981920dfb295ffbafa Reviewed-on: https://chromium-review.googlesource.com/189458 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill f0b40601 2014-03-24T14:49:11 Clean up gyp build scripts. We can use angle_path instead of angle_build_scripts_path to locate enumerate_files.py. Also pass angle_path to the post-build script hook, as this information is necessary to locate the root angle folder. BUG=angle:592 Change-Id: I06b3f0201751d90b7c1efdefe8db07d114bd87dd Reviewed-on: https://chromium-review.googlesource.com/191082 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill d51df461 2014-02-26T14:18:17 Remove the second translator target, only using static. Because libGLESv2 needs a static translator to link against internal types like Attribute and Varying, as well as using some other internal methods, we can for now disable the component build for the translator. In the future we can support a proper component build with exports across library boundaries. BUG=angle:568 Change-Id: Ie3efc0a29342d02491e91952c3c2398568f83576 Reviewed-on: https://chromium-review.googlesource.com/187699 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill c9f140d8 2014-02-18T15:27:21 Add preprocess bison files to the gyp files. We had accidentally left out the y and l files from our generation scripts, causing us to miss several instances of updated enum names. BUG=angle:550 Change-Id: I8790742fbaab5435e4c0db4f61c3e8194a231550 Reviewed-on: https://chromium-review.googlesource.com/186972 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang d5da329c 2014-02-06T13:24:33 Improve the enumerate_files.py script. Cleaned up the agument parsing and added support for excluding files/folders. BUG=angle:552 Change-Id: I6dcf965f9b92ce4aa1c0b64bd4f9a0420883bcf6 Reviewed-on: https://chromium-review.googlesource.com/185204 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 1106aeb2 2014-02-06T11:06:50 Move the enumerate_files script to the build directory. BUG=angle:552 Change-Id: I9f357c68c258c7731cf0d5c2ceed3a2875b21228 Reviewed-on: https://chromium-review.googlesource.com/185142 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2e5c6042 2014-02-06T10:45:32 Add GL headers to libGLESv2, libEGL and translator projects. Change-Id: I66f36623eb5fb60fbb92d16af4f9854688b9484c Reviewed-on: https://chromium-review.googlesource.com/185190 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org>
Shannon Woods 5cd4761f 2013-12-02T19:13:14 Re-add jschuh's TODO comment for 64-bit warnings Change-Id: I690cfd9146c51cd1e19dc2bcd2cc227b4d156cd0 Reviewed-on: https://chromium-review.googlesource.com/178995 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill d5ee05cc 2013-10-30T13:08:58 Silence a warning present in Release mode, with a lack of exported symbols in compilerdebug.obj. TRAC #24052 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang
Geoff Lang 31f0dc0a 2013-10-08T13:29:13 Merge a0bd8ef0aca9eab29a0e5a437b803c5d95a777c6 from master. Use ANGLE_TRANSLATOR_STATIC to enforce a static build of the translator in chromium. This prevents strange warnings from defining COMPONENT_BUILD=0. Also rename COMPILER_IMPLEMENTATION to ANGLE_TRANSLATOR_IMPLEMENTATION for better consistency in chromium. ANGLEBUG=477 R=zmo@chromium.org BUG=
Geoff Lang 2b6008c9 2013-10-08T10:44:05 Merge 366229430ea056cf7f33917a4fa37b721512a42c from master. Create a static translator project and allow the previous translator project to be used in component builds.
Geoff Lang 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.