src/compiler/translator/RewriteElseBlocks.cpp


Log

Author Commit Date CI Message
Olli Etuaho a223430c 2016-08-31T12:05:39 Promote unary nodes automatically Unary nodes now get their type set automatically based on the operation and operand. The operand should only be changed to another of the same type after the node is constructed. The operation can't be changed on unary and binary nodes after they've been constructed. BUG=angleproject:1490 TEST=angle_unittests Change-Id: Ib1ea3dcb1162261966c02d5f03d8091cf647fac1 Reviewed-on: https://chromium-review.googlesource.com/378935 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Olli Etuaho <oetuaho@nvidia.com>
Corentin Wallez 2d58f7a2 2015-09-28T10:44:55 RewriteElseBlocks.cpp: add missing override Change-Id: Ic98de554cabffabd3cdd58b2a44a554cb2c3cd53 Reviewed-on: https://chromium-review.googlesource.com/302464 Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Ben Wells e6e8c7c5 2015-07-01T16:48:31 Fix 'unused private field' warnings for clang. BUG=505317 Change-Id: I731b6e5ae5d5eba50f556314eeeebc6a3d29fc7a Reviewed-on: https://chromium-review.googlesource.com/282932 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Olli Etuaho 64f0be91 2015-06-03T17:38:34 Remove unused right-to-left AST traversal support No code actually uses the right-to-left traversal. All it does is add unnecessary complexity. TEST=angle_unittests, angle_end2end_tests BUG=angleproject:1037 Change-Id: Id15498343538c02c252ef0852f9a00c85ac3c4bb Reviewed-on: https://chromium-review.googlesource.com/275183 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho 4d59f3c6 2015-05-28T17:33:53 Make false blocks produced by RewriteElseBlocks sequence nodes All child nodes of selection should be sequence nodes, so that they will output braces and extra braces can be removed from HLSL output. Also make RewriteElseBlocks to reuse common IntermTraverser functionality to simplify the code. TEST=WebGL conformance tests on D3D9 BUG=angleproject:1013 Change-Id: Iafdc05468b22d110abcd020cf52c646dd98fb4a0 Reviewed-on: https://chromium-review.googlesource.com/273608 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Olli Etuaho 78174db7 2015-04-21T16:14:00 Replace EvqInternal with a separate flag to make it more flexible The internal flag disables decorating a given symbol in output, effectively placing it to a different namespace than user-defined symbols. This enables the compiler to insert symbols to the tree when transforming it to be suitable for HLSL output without running into name conflicts. In this patch the flag is separated from the qualifiers since sometimes different qualifiers need to be used with these internal symbols. TEST=angle_unittests, angle_end2end_tests, WebGL conformance tests BUG=angleproject:941 Change-Id: I7036bed98fdb1478a383bb959ca03b42c3cb8100 Reviewed-on: https://chromium-review.googlesource.com/266690 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 4836d22a 2014-07-24T06:55:51 Fix ASSERT when rewriting else-if blocks with no else. The code assumed an else-if would end in an else. We can also save a few allocations in the cases where there is no else. BUG=angle:699 Change-Id: I550857366775b4a34aea97e117ef732297d3f448 Reviewed-on: https://chromium-review.googlesource.com/208681 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@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 787fc03f 2014-07-07T12:49:45 Fix HLSL compiler error with else-rewriting in functions. In functions with return types where we would use if-else rewriting, we would potentially generate a spurious HLSL error that warned of branches with no return value in the function. This was causing a maps regression where overlays would not draw in Earth mode. BUG=346463 BUG=391697 Change-Id: I9f4fa959057a3a2dab6cdd98f8381b5871cabf03 Reviewed-on: https://chromium-review.googlesource.com/206824 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill ed3eef1f 2014-02-26T09:47:11 Fix not rewriting else-if blocks. We would miss expanding the else-if clauses in a chain of selection statements. BUG=346463 BUG=391697 Change-Id: Iee644b875cf68d0ed3dc0b73542efc49ecb23242 Reviewed-on: https://chromium-review.googlesource.com/206822 Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org>
Jamie Madill e53c98ba 2014-02-03T11:57:13 Add work-around for D3D9 shader compiler bug. With certain selection statements with a vertex input in the condition and side-effects in the else-block, we'd run in to a D3D9 compiler bug which would cause incorrect results. We can work around this bug in D3D9 by selectively rewriting these statements to use an 'else if' clause instead of 'else'. BUG=322794 Change-Id: I93c96fb201ff4959c00d9a36321faac7e0343278 Reviewed-on: https://chromium-review.googlesource.com/184681 Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>