Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14517)

Issue 14529048: Add an option to unfold short circuiting in AST. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 6 months ago by Zhenyao Mo
Modified:
10 years, 6 months ago
Reviewers:
kbr1, Alok Priyadarshi
CC:
angleproject-review_googlegroups.com, Shannon Woods, nicolas
Base URL:
https://code.google.com/p/angleproject/@master
Visibility:
Public.

Description

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 Committed: https://code.google.com/p/angleproject/source/detail?r=5e70cf9

Patch Set 1 : #

Total comments: 7

Patch Set 2 : Per review #

Total comments: 3

Patch Set 3 : fix the updateNodes bug #

Total comments: 18

Patch Set 4 : further modification #

Total comments: 10

Patch Set 5 : final #

Unified diffs Side-by-side diffs Delta from patch set Stats (+261 lines, -15 lines) Patch
M include/GLSLANG/ShaderLang.h View 1 1 chunk +7 lines, -0 lines 0 comments Download
M src/build_angle.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download
M src/compiler/Compiler.cpp View 1 2 3 4 2 chunks +7 lines, -0 lines 0 comments Download
M src/compiler/IntermTraverse.cpp View 1 6 chunks +6 lines, -6 lines 0 comments Download
M src/compiler/Intermediate.cpp View 1 2 3 3 chunks +62 lines, -2 lines 0 comments Download
M src/compiler/OutputGLSLBase.cpp View 1 4 chunks +4 lines, -4 lines 0 comments Download
A src/compiler/UnfoldShortCircuitAST.h View 1 2 3 4 1 chunk +51 lines, -0 lines 0 comments Download
A src/compiler/UnfoldShortCircuitAST.cpp View 1 2 3 4 1 chunk +81 lines, -0 lines 0 comments Download
M src/compiler/intermediate.h View 1 2 3 12 chunks +41 lines, -3 lines 0 comments Download

Messages

Total messages: 14
Zhenyao Mo
alokp, kbr: please review. shannon, nicolas: fyi (feel free to review if you have time)
10 years, 6 months ago (2013-10-09 18:23:20 UTC) #1
Zhenyao Mo
Instead of doing the rewrite on output stage, I tried in this CL to adjust ...
10 years, 6 months ago (2013-10-09 18:25:28 UTC) #2
Alok Priyadarshi
I do not like the fact that we are making a second traversal just to ...
10 years, 6 months ago (2013-10-09 23:12:48 UTC) #3
kbr1
I don't have a strong opinion on how to do the node replacements. In general, ...
10 years, 6 months ago (2013-10-10 00:08:47 UTC) #4
Zhenyao Mo
alokp, kbr: please take a look at this revised CL. https://codereview.appspot.com/14529048/diff/1010/include/GLSLANG/ShaderLang.h File include/GLSLANG/ShaderLang.h (right): https://codereview.appspot.com/14529048/diff/1010/include/GLSLANG/ShaderLang.h#newcode193 ...
10 years, 6 months ago (2013-10-10 22:36:46 UTC) #5
Zhenyao Mo
FYI: this is tested on Linux and Mac with webgl conformance and some webgl demos. ...
10 years, 6 months ago (2013-10-10 22:55:09 UTC) #6
kbr1
https://codereview.appspot.com/14529048/diff/14011/src/compiler/UnfoldShortCircuitAST.cpp File src/compiler/UnfoldShortCircuitAST.cpp (right): https://codereview.appspot.com/14529048/diff/14011/src/compiler/UnfoldShortCircuitAST.cpp#newcode61 src/compiler/UnfoldShortCircuitAST.cpp:61: // replaced before its ancester nodes can be replace. ...
10 years, 6 months ago (2013-10-10 23:28:12 UTC) #7
Zhenyao Mo
Please take another review. Also see the test case I added in the github webgl ...
10 years, 6 months ago (2013-10-11 00:17:55 UTC) #8
kbr1
Nice work. LGTM https://codereview.appspot.com/14529048/diff/16002/src/compiler/UnfoldShortCircuitAST.h File src/compiler/UnfoldShortCircuitAST.h (right): https://codereview.appspot.com/14529048/diff/16002/src/compiler/UnfoldShortCircuitAST.h#newcode45 src/compiler/UnfoldShortCircuitAST.h:45: // which are used to make ...
10 years, 6 months ago (2013-10-11 00:51:47 UTC) #9
Alok Priyadarshi
minor comments. https://codereview.appspot.com/14529048/diff/16002/src/build_angle.gypi File src/build_angle.gypi (right): https://codereview.appspot.com/14529048/diff/16002/src/build_angle.gypi#newcode85 src/build_angle.gypi:85: 'compiler/UnfoldShortCircuitAST.cpp', nit: AST suffix is not necessary ...
10 years, 6 months ago (2013-10-11 03:28:34 UTC) #10
Zhenyao Mo
https://codereview.appspot.com/14529048/diff/16002/src/build_angle.gypi File src/build_angle.gypi (right): https://codereview.appspot.com/14529048/diff/16002/src/build_angle.gypi#newcode85 src/build_angle.gypi:85: 'compiler/UnfoldShortCircuitAST.cpp', On 2013/10/11 03:28:34, Alok Priyadarshi wrote: > nit: ...
10 years, 6 months ago (2013-10-11 22:21:57 UTC) #11
Alok Priyadarshi
lgtm. Please look at minor comments before committing. https://codereview.appspot.com/14529048/diff/28001/src/compiler/Compiler.cpp File src/compiler/Compiler.cpp (right): https://codereview.appspot.com/14529048/diff/28001/src/compiler/Compiler.cpp#newcode201 src/compiler/Compiler.cpp:201: unfoldShortCircuit.updateNodes(); ...
10 years, 6 months ago (2013-10-15 18:42:45 UTC) #12
Zhenyao Mo
https://codereview.appspot.com/14529048/diff/28001/src/compiler/Compiler.cpp File src/compiler/Compiler.cpp (right): https://codereview.appspot.com/14529048/diff/28001/src/compiler/Compiler.cpp#newcode201 src/compiler/Compiler.cpp:201: unfoldShortCircuit.updateNodes(); On 2013/10/15 18:42:45, Alok Priyadarshi wrote: > nit: ...
10 years, 6 months ago (2013-10-15 19:58:16 UTC) #13
Zhenyao Mo
10 years, 6 months ago (2013-10-15 19:59:37 UTC) #14
Message was sent while issue was closed.
Committed patchset #5 manually as r5e70cf9 (presubmit successful).
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b