src/compiler/translator/intermediate.h


Log

Author Commit Date CI Message
Jamie Madill 6654bc93 2014-03-26T14:01:57 Fix stack overflow when parsing huge expressions. The expression limit validation check needs to be in front of other tree traversal to prevent stack overflows. Also, call depths of sufficient size (80k+) could overflow the depth check itself, necessitating an upper bound on initial tree traversal. This fixes crashes in the WebGL long-expressions bug test. BUG=angle:584 Change-Id: Ib48294bf77a5923d230f237fbd63a36a5662e317 Reviewed-on: https://chromium-review.googlesource.com/191931 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill dd0d3426 2014-03-26T14:01:56 Use a heap-memory traversal to free compiler resources. The stack-memory traversal is prone to stack overflow. See the WebGL conformance test long-expressions-should-not-crash. BUG=angle:584 Change-Id: I02d72bc2e4101b7141d609c50303403ea8298e60 Reviewed-on: https://chromium-review.googlesource.com/191930 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Reviewed-by: Nicolas Capens <nicolascapens@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Zhenyao Mo 3cdfcce8 2014-03-07T13:00:08 Remove SH_MAP_LONG_VARIABLE_NAMES We use hashing to map all variables/strcuture field names, etc, so we no longer need this option. Checked with Firefox and WebKit, they no longer use this option either. Time to remove it. Change-Id: Ie3e79b91a05258b04af419a9c42b2fd1b00e67c4 Reviewed-on: https://chromium-review.googlesource.com/189236 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Shannon Woods <shannonwoods@chromium.org> Tested-by: Zhenyao Mo <zmo@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/189568
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>
Zhenyao Mo 7cab38b5 2013-10-15T12:59:30 Add an option to unfold short circuiting in AST. We replace "a || b" with "a ? true : b", "a && b" with "a ? b : false". This is to work around short circuiting bug in Mac drivers. ANGLEBUG=482 TEST=webgl conformance tests R=alokp@chromium.org, kbr@chromium.org Review URL: https://codereview.appspot.com/14529048 Conflicts: src/build_angle.gypi src/compiler/translator/Compiler.cpp Change-Id: Ic2384a97d58f54294efcb3a012deb2007a9fc658 Reviewed-on: https://chromium-review.googlesource.com/178996 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Tested-by: Shannon Woods <shannonwoods@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
Nicolas Capens a621c2e4 2013-11-20T13:40:23 Use 64-bit safe constant union indexes. BUG=angle:450 Change-Id: I4a16733e3e6aebf2939f8255ae2e4e8c5febc606
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.