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

Issue 4331048: Unroll for-loop if sampler array uses loop index as its index. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 1 month ago by Zhenyao Mo
Modified:
13 years, 1 month ago
Reviewers:
zmo, kbr1, Alok Priyadarshi
CC:
angleproject-review_googlegroups.com
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

Unroll for-loop if sampler array uses loop index as its index. If inside a for-loop, sampler array index is the loop index, Mac cg compiler will crash. This CL unroll the loop in such situation. The behavior is: 1) If the for-loop index is a float, we reject the shader. 2) If it is an integer, we unroll the for-loop. Things that should be done in the future are: 1) Add line number macros. 2) Add a limit to unroll iteration count. anglebug=94 Committed: http://code.google.com/p/angleproject/source/detail?r=606

Patch Set 1 #

Patch Set 2 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+339 lines, -14 lines) Patch
M src/build_angle.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
A src/compiler/ForLoopUnroll.h View 1 chunk +46 lines, -0 lines 0 comments Download
A src/compiler/ForLoopUnroll.cpp View 1 1 chunk +172 lines, -0 lines 0 comments Download
M src/compiler/OutputGLSL.h View 2 chunks +3 lines, -0 lines 0 comments Download
M src/compiler/OutputGLSL.cpp View 1 4 chunks +33 lines, -13 lines 0 comments Download
M src/compiler/ValidateLimitations.h View 1 chunk +1 line, -0 lines 0 comments Download
M src/compiler/ValidateLimitations.cpp View 1 4 chunks +75 lines, -0 lines 0 comments Download
M src/compiler/intermediate.h View 2 chunks +7 lines, -1 line 0 comments Download

Messages

Total messages: 10
Zhenyao Mo
Please review.
13 years, 1 month ago (2011-03-30 22:46:19 UTC) #1
Zhenyao Mo
Ping.
13 years, 1 month ago (2011-04-01 17:14:09 UTC) #2
Alok Priyadarshi
Overall looks fine. A couple of concerns/suggestions: 1. Unrolling should be controlled by a flag ...
13 years, 1 month ago (2011-04-01 17:17:43 UTC) #3
zmo
Thanks for reviewing this. On 2011/04/01 17:17:43, Alok Priyadarshi wrote: > Overall looks fine. > ...
13 years, 1 month ago (2011-04-01 17:22:59 UTC) #4
Alok Priyadarshi
> > My feeling is we don't need an option. It's either unroll or crash, ...
13 years, 1 month ago (2011-04-01 17:29:29 UTC) #5
zmo
On 2011/04/01 17:22:59, zmo wrote: > Thanks for reviewing this. > > On 2011/04/01 17:17:43, ...
13 years, 1 month ago (2011-04-01 17:33:44 UTC) #6
zmo
OK, let me explain my reasoning before Judge Ken makes the final call: 1) If ...
13 years, 1 month ago (2011-04-01 17:43:18 UTC) #7
kbr1
It would be better if this patch were less intrusive and implemented as a separate ...
13 years, 1 month ago (2011-04-01 20:30:32 UTC) #8
zmo
Per discussion with kbr off-line, although keeping it as a separate pass and unrolling the ...
13 years, 1 month ago (2011-04-01 23:04:07 UTC) #9
kbr1
13 years, 1 month ago (2011-04-04 19:14:37 UTC) #10
Thanks for doing the cleanups and adding a comment pointing back to this CL.

LGTM
Sign in to reply to this message.

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