src/compiler/translator/ValidateLimitations.cpp


Log

Author Commit Date CI Message
Kimmo Kinnunen 197beb4d 2024-02-13T15:47:32 Metal: Crash if for loop body is optimized away Loops might have their bodies optimized away. For case like `for(;;) if(false);` the constant pruning happens at parse phase. The else branch (e.e. no else branch, nullptr) would be selected as the body. Some code treated the body as optional, some code treated it as required. Define it as required, and remove all conditional code related to the loop body. Bug: angleproject:8532 Change-Id: Ic35f1bf78e63ceb2cee7b96ba99e788efc282e6f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/5291554 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Kimmo Kinnunen <kkinnunen@apple.com> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Shahbaz Youssefi 8b869a95 2021-06-13T01:09:27 Translator: Generate Ops for all built-in functions EOpCallBuiltInFunction is removed in this change, as well as the "op": "auto" property in builtin_function_declarations.txt. Instead, gen_builtin_symbols.py automatically generates Ops for every built-in function and generates the TOperator enum accordingly. This simplifies SPIR-V code generation by allowing switches to be used on operators instead of string comparisons. Bug: angleproject:4589 Bug: angleproject:4889 Change-Id: Ia351524400b0e12a10a5572e27e9b88c6ec2e61c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2958869 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Tim Van Patten <timvp@google.com>
Stuart Morgan 9d737966 2019-08-14T12:25:12 Standardize copyright notices to project style For all "ANGLE Project" copyrights, standardize to the format specified by the style guide. Changes: - "Copyright (c)" and "Copyright(c)" changed to just "Copyright". - Removed the second half of date ranges ("Y1Y1-Y2Y2"->"Y1Y1"). - Fixed a small number of files that had no copyright date using the initial commit year from the version control history. - Fixed one instance of copyright being "The ANGLE Project" rather than "The ANGLE Project Authors" These changes are applied both to the copyright of source file, and where applicable to copyright statements that are generated by templates. BUG=angleproject:3811 Change-Id: I973dd65e4ef9deeba232d5be74c768256a0eb2e5 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1754397 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Olli Etuaho c26214de 2018-03-16T10:43:11 Move AST utilities to a subdirectory Move AST related utilities to compiler/translator/tree_util. BUG=angleproject:2409 TEST=angle_unittests Change-Id: I7567c2f6f2710292029263257c7ac26e2a144ac8 Reviewed-on: https://chromium-review.googlesource.com/966032 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho fbb1c792 2018-01-19T16:26:59 Store symbol names as a ImmutableString This will enable compile-time initialization of built-in symbols as well as reducing copying strings. Most of the code that deals with names is changed to use ImmutableString where it makes sense to avoid conversions. The lexer/parser now allocate const char pointers into pool memory instead of allocating TStrings. These are then converted to ImmutableString upon entering TParseContext. BUG=angleproject:2267 TEST=angle_unittests, angle_end2end_tests Change-Id: I244d6271ea1ecf7150d4f89dfa388a7745a1150c Reviewed-on: https://chromium-review.googlesource.com/881561 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 68981eb5 2018-01-23T17:46:12 Track parameter qualifiers of functions in call nodes We now add a reference to TFunction to all TIntermAggregate nodes where it is possible, including built-in ops. We also make sure that internal TFunctions added in traversers have correct parameter qualifiers. This makes TLValueTrackingTraverser much simpler. Instead of storing traversed functions or looking up builtin functions from the symbol table, determining which function parameters are out parameters can now be done simply by looking it up from the function symbol associated with the aggregate node. Symbol instances are no longer deleted when a symbol table level goes out of scope, and TFunction destructor no longer clears the parameters. They're all either statically allocated or pool allocated, so this does not result in leaks. TEST=angle_unittests BUG=angleproject:2267 Change-Id: I57e5570da5b5a69a98a8778da3c2dc82b6284738 Reviewed-on: https://chromium-review.googlesource.com/881324 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 8b5e8fdb 2017-12-15T14:59:15 Replace remaining usage of TName with TSymbol TName used to contain just a subset of the information stored in TSymbol. It makes more sense to use TSymbol directly instead of converting it to TName. This also improves type safety a bit by making some functions only take in TVariable or TFunction instead of the more generic TName. BUG=angleproject:2267 TEST=angle_unittests Change-Id: Icb46923c25d33ebbbbc06ddc487da25957dda771 Reviewed-on: https://chromium-review.googlesource.com/829143 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho b6af22b5 2017-12-15T14:05:44 Store TVariable* in TIntermSymbol instead of storing id This is an intermediate step to only storing a TVariable * in TIntermSymbol instead of copying the name. This makes it possible to get a constant value out of a TIntermSymbol without doing a symbol table lookup. BUG=angleproject:2267 TEST=angle_unittests Change-Id: Ibff588241a4ad4ac330063296273288b20a072c9 Reviewed-on: https://chromium-review.googlesource.com/829142 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman 0e74e059 2017-12-17T22:17:17 Fix gcc builds. Remove unused function and fix dangling else's that gcc complains about. In the gyp build specify -std=c++14. BUG=none Change-Id: I552942ccc574104a5424a9add00e6e72d6efa28a Reviewed-on: https://chromium-review.googlesource.com/830750 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho a5e693af 2017-07-13T16:07:26 Make unique id counter a member of TSymbolTable This makes unique id counting thread-safe. BUG=angleproject:624 TEST=angle_unittests Change-Id: Ie0f2c7e574470b39750d37d2181c790bc874b275 Reviewed-on: https://chromium-review.googlesource.com/570419 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho cccf2b00 2017-07-05T14:50:54 Reorganize AST traversal utility code Define TIntermTraverser and TIntermLValueTrackingTraverser in a separate header file. hash() function is moved out from TIntermTraverser as it is not related to the core functionality of traversing and transforming ASTs. Also reorganize some traversers to follow common conventions: - Intermediate output is now in OutputTree.h/.cpp - Max tree depth check is now in IsASTDepthBelowLimit.h/.cpp BUG=angleproject:1490 TEST=angle_unittests Change-Id: Id4968aa9d4e24d0c5bac90dc147fc9f310de0184 Reviewed-on: https://chromium-review.googlesource.com/559531 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Yunchao He f81ce4a3 2017-04-24T10:49:17 Refactoring: replace NULL by nullptr for pointers (3rd CL). This CL mainly handles passing/returning NULL to/from a function. BUG=angleproject:2001 Change-Id: I34802f792e710e3d7ff697cbe4701dc1bf5ab009 Reviewed-on: https://chromium-review.googlesource.com/485060 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Yunchao He 4f285443 2017-04-21T12:15:49 Refactoring: replace NULL by nullptr for pointers (2nd CL). This CL mainly handles the pointer comparisons (== or !=). BUG=angleproject:2001 Change-Id: I25ac3b61032e7ad91459a1c6541cadc87cf9b160 Reviewed-on: https://chromium-review.googlesource.com/483935 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yunchao He d7297bfb 2017-04-19T15:27:10 Code refactoring: replace NULL by nullptr for pointers. This is the frist change to replace NULL by nullptr. It handles the initialization and assignment for pointers. BUG=angleproject:2001 Change-Id: I6d4bb198a72e38b867cd2f65a6e6f2f61339a0b5 Reviewed-on: https://chromium-review.googlesource.com/481600 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 9ec79391 2017-03-31T23:04:23 Use TLValueTrackingTraverser in ValidateLimitations Use TLValueTrackingTraverser to determine whether a loop index is used as an l-value. This replaces custom logic in ValidateLimitations, greatly simplifying the code. Also pass the symbol table to ValidateLimitations as a parameter, which removes the need to store a global pointer to the current ParseContext. BUG=angleproject:1960 TEST=angle_unittests, WebGL conformance tests Change-Id: I122c85c78bbea05833d7c787cd184de568c5c45f Reviewed-on: https://chromium-review.googlesource.com/465606 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho ec9232bd 2017-03-27T17:01:37 Store unmangled function names in the AST This makes the code simpler across the board. There are a few cases where mangled names still need to be generated in AST traversers, but they are outweighed by much leaner output code for all function nodes. BUG=angleproject:1490 TEST=angle_unittests, angle_end2end_tests Change-Id: Id3638e0fca6019bbbe6fc5e1b7763870591da2d8 Reviewed-on: https://chromium-review.googlesource.com/461077 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho 1ecd14b8 2017-01-26T13:54:15 Fold user-definedness of function nodes into TOperator Whether a function call is user-defined is not orthogonal to TOperator associated with the call node - other ops than function calls can't be user-defined. Because of this it makes sense to store the user- definedness by having different TOperator enums for different types of calls. This patch also tags internal helper functions that have a raw definition outside the AST with a separate TOperator enum. This way they can be handled with logic that is easy to understand. Before this, function calls like this left the user-defined bit unset, despite not really being built-ins either. The EmulatePrecision traverser uses this. This is also something that could be used to clean up built-in emulation in the future. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I597fcd9789d0cc22b689ef3ce5a0cc3f621d4859 Reviewed-on: https://chromium-review.googlesource.com/433443 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 77ba408a 2016-12-16T12:01:18 Unify Diagnostics interface Use the same kind of interface for reporting preprocessor errors as for reporting regular compiler errors, and make global errors like having too many uniforms also go through Diagnostics. Also don't create std::string objects unnecessarily. Includes cleanups of some dead code related to reporting errors. BUG=angleproject:1670 TEST=angle_unittests Change-Id: I3ee794d32ddeec1826bdf1b76b558f35259f82c0 Reviewed-on: https://chromium-review.googlesource.com/421527 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill d7b1ab58 2016-12-12T14:42:19 Fix up translator style. Using git cl format. BUG=angleproject:650 Change-Id: I7d3f98d2b0dcfb0a8de6c35327db74e55c28d761 Reviewed-on: https://chromium-review.googlesource.com/419059 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 1b896c62 2016-11-16T13:10:44 translator: remove code related to for-loop unrolling For loop unrolling is not used and causes the translator fuzzer to find a hang when unrolling tons of nested loops (duh). Also remove MMap.h which was unused. This is essentially a revert of https://codereview.appspot.com/4331048 BUG=chromium:665255 Change-Id: Id6940f7e306d4ed53bc992f751e9ffe733190f17 Reviewed-on: https://chromium-review.googlesource.com/412023 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 45bcc784 2016-11-07T13:58:48 translator: Scope all classes with "sh". I was seeing an odd problem with our PoolAlloc conflicting with the glslang/Vulkan TIntermNode, so the fix was to move everything to a separate namespace. The bison grammars are also regenerated. No functional changes. BUG=angleproject:1576 Change-Id: I959c7afe4c092f0d458432c07b4dcee4d39513f3 Reviewed-on: https://chromium-review.googlesource.com/408267 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 13389b66 2016-10-16T11:48:18 Split TIntermDeclaration from TIntermAggregate The new class TIntermDeclaration is now used for struct, interface block and variable declarations. TIntermDeclaration nodes do not have a type - rather the type is stored in each child node. The types may differ in case the declaration is a series of array declarators with mismatching sizes. TIntermAggregate is still used for function calls, function prototypes, function parameter lists and invariant declarations. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I0457188f354481470855f61ac1c878fc2579b1d1 Reviewed-on: https://chromium-review.googlesource.com/400023 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Olli Etuaho bd674557 2016-10-06T13:28:42 Separate function info from TIntermAggregate This change will make it easier to split types of TIntermAggregate nodes representing functions and function calls into different node classes. BUG=angleproject:1490 TEST=angle_unittests Change-Id: I730aa7858fe31fda86218fc685980c6ad486f5e0 Reviewed-on: https://chromium-review.googlesource.com/394706 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 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>
Olli Etuaho 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>
Olli Etuaho 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>
Corentin Wallez e5a1f271 2015-08-21T02:58:25 Use override in all the places where it is possible This will avoid -Winconsistent-overrides in the future. Done using the -Wsuggest-override warning of GCC 5.1 BUG= Change-Id: I707a649dc368f5dd1e139fd144370abcac0b6263 Reviewed-on: https://chromium-review.googlesource.com/294920 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Dmitry Skiba efa3d8eb 2015-06-22T14:52:10 Change TSymbolTable::insertBuiltIn() TType* pointers to const. Const types make it possible to implement caching and other optimizations. BUG=492725 Change-Id: I64398bb9effcc909dd052a038acbb5ec0ca730e8 Reviewed-on: https://chromium-review.googlesource.com/281046 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Dmitry Skiba <dskiba@google.com>
Olli Etuaho 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>
Jamie Madill 6e06b1f4 2015-05-14T10:01:17 Make TParseContext a class, with private data. *re-land with build fix* BUG=angleproject:995 Change-Id: I67d3ded8f6c705b54fb372857e07ce1a86b58475 Reviewed-on: https://chromium-review.googlesource.com/271162 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill 749fe340 2015-05-13T21:07:55 Revert "Make TParseContext a class, with private data." Causing build errors on Linux: FAILED: ninja -t msvc -e environment.x86 -- C:\b\build\goma/gomacc "C:\b\depot_tools\win_toolchain\vs2013_files\VC\bin\amd64_x86\cl.exe" /nologo /showIncludes /FC @obj\third_party\angle\src\compiler\translator\translator_lib.ParseContext.obj.rsp /c ..\..\third_party\angle\src\compiler\translator\ParseContext.cpp /Foobj\third_party\angle\src\compiler\translator\translator_lib.ParseContext.obj /Fdobj\third_party\angle\src\translator_lib.cc.pdb c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\validateglobalinitializer.h(11) : error C2220: warning treated as error - no 'object' file generated c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\validateglobalinitializer.h(11) : warning C4099: 'TParseContext' : type name first seen using 'class' now seen using 'struct' c:\b\build\slave\gpu_win_builder__dbg_\build\src\third_party\angle\src\compiler\translator\parsecontext.h(28) : see declaration of 'TParseContext' BUG=angleproject:995 This reverts commit 6c0c2987fba9dcf2a8d432534c9548092281bfa4. Change-Id: I49a8b7df9bc8b7c4892bf3af5e2c7a6444fba890 Reviewed-on: https://chromium-review.googlesource.com/270767 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6c0c2987 2015-05-13T13:50:04 Make TParseContext a class, with private data. BUG=angleproject:995 Change-Id: Ie077e3a4f0fd5ef840aa35edeb41d15a98b7c0ff Reviewed-on: https://chromium-review.googlesource.com/270628 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
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>
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>
Gregoire Payen de La Garanderie be954a23 2014-12-23T00:05:28 Implement support for the binary operator '%' in the translator. BUG=angle:854 Change-Id: If116de132dc83d93255749b54c1919a75abcb65c Reviewed-on: https://chromium-review.googlesource.com/236330 Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Zhenyao Mo de1e00e1 2014-10-09T16:55:32 Implement support of unary operator "+" in translator. BUG=angle:779 TEST=conformance/glsl/misc/struct-unary-operators.html Change-Id: Ia827e07dcfc8ad3bbbc078e54336815be9027945 Reviewed-on: https://chromium-review.googlesource.com/222720 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Zhenyao Mo e40d1e9c 2014-07-16T17:40:36 Fix style violations. BUG=angle:650 TEST=no behavior change Change-Id: I3096615a181b1ec2c18ce60566c3d6249975b84e Reviewed-on: https://chromium-review.googlesource.com/208569 Tested-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 183bde55 2014-07-02T15:31:19 Return shader variable information using GLenum values. Instead of duplicating GL header define values, explictly return GLenum for variable queries in the shader inspection API. This reduces the duplicate defines in the shader compiler header. BUG=angle:466 Change-Id: Iddaaff597b188251fa2e546f352bf77ab3ac43bc Reviewed-on: https://chromium-review.googlesource.com/205860 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org>
Jamie Madill ce505553 2014-06-26T14:56:33 Revert "Return variable type queries using GLenum values." Breaks the FYI bots until we get Chromium patched. BUG=angle:466 This reverts commit 53221f5a0382887155d90f7f286e41190d4f5bfb. Change-Id: Ib28548df5c10a6f76f46e4cf8f2013dca5cf0ee2 Reviewed-on: https://chromium-review.googlesource.com/205850 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53221f5a 2014-06-25T16:04:59 Return variable type queries using GLenum values. Instead of duplicating GL header define values, explictly return GLenum for variable queries in the shader inspection API. This reduces the duplicate defines in the shader compiler header. BUG=angle:466 Change-Id: If631b20ce68747297a946e1371def7709027a613 Reviewed-on: https://chromium-review.googlesource.com/204937 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Zhenyao Mo 550c600b 2014-02-26T15:40:48 Improvement on loop unrolling with loops indexing sampler arrays 1) Before this workaround is hardwired on mac, now we move it behind a compil 2) Fix the issue where "break" inside the loop isn't handled while unrolled. BUG=338474 TEST=webgl conformance test sampler-array-using-loop-index.html Change-Id: I4996a42c2dea39a8a5af772c256f8e3cb383f59a Reviewed-on: https://chromium-review.googlesource.com/188079 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org> Conflicts: include/GLSLANG/ShaderLang.h src/compiler/translator/ValidateLimitations.cpp Change-Id: I546197bd7df1634ebccdd380be14c3250cd56151 Reviewed-on: https://chromium-review.googlesource.com/189061 Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill f4b79ba8 2013-11-26T10:38:18 Fix issues with the conditional discard workarounds to do with assignments. The old modifiesState method really checked if an operator was an assignment, so restored that behaviour and use the new side effects detection only for the new code. ANGLEBUG=486 BUG= R=nicolascapens@chromium.org, zmo@chromium.org Review URL: https://codereview.appspot.com/22130043 Change-Id: I84d4e95a0457e63f237a814d80e4f72dd861496b
Jamie Madill 3c9eeb97 2013-11-04T11:09:26 Disable optimizations for shaders with conditional discard in D3D9, and only use expanded short-circuiting conditionals for expressions with potential side-effects. Conservatively assume aggreate and selection operators have side effects for now. BUG= ANGLEBUG=486 R=geofflang@chromium.org, kbr@chromium.org, nicolas@transgaming.com, shannonwoods@chromium.org Review URL: https://codereview.appspot.com/14441075 Conflicts: src/common/version.h src/compiler/translator.vcxproj src/compiler/translator.vcxproj.filters src/compiler/translator/OutputHLSL.cpp src/libGLESv2/ProgramBinary.cpp src/libGLESv2/Shader.cpp src/libGLESv2/Shader.h Change-Id: Iaf9f10b5de7b33c927ef032f3c4fe9d5095f64dd
Jamie Madill 6b9cb259 2013-10-17T10:45:47 Rename ParseHelper.cpp/h to ParseContext.cpp/h. TRAC #24002 Signed-off-by: Shannon Woods Signed-off-by: Geoff Lang
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.