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

Issue 3265041: All surfaces follow D3D Y convention (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 5 months ago by apatrick1
Modified:
13 years, 3 months ago
Reviewers:
kbr1, dgkoch, nicolas
CC:
angleproject-review_googlegroups.com
Base URL:
http://angleproject.googlecode.com/svn/trunk/
Visibility:
Public.

Description

All surfaces follow D3D Y convention, i.e. (0, 0) is "top-left" rather than GL's "bottom-left". This eliminates the need to flip the default FBO to the D3D convention using additional blits when presenting and reduces VRAM usage for redundant window sized surfaces. I took out the gl_Position.y flip from the vertex shader so FBOs are rendered according to D3D conventions. Texture lookups are flipped on Y to compensate. Cube map +Y and -Y faces are swapped. Y is now flipped in various other places, including uploading and reading back texture data from / to system memory, functions that take pixel space coordinates, winding order for culling, the implementation of ddy, the calculation of gl_Position and gl_FragCoord in fragment shaders and the flipping of compressed texture tiles. Committed: http://code.google.com/p/angleproject/source/detail?r=536

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 9

Patch Set 3 : '' #

Patch Set 4 : '' #

Total comments: 22

Patch Set 5 : '' #

Total comments: 3

Patch Set 6 : '' #

Patch Set 7 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+323 lines, -399 lines) Patch
M src/compiler/OutputHLSL.cpp View 1 2 3 4 5 6 7 chunks +23 lines, -9 lines 0 comments Download
M src/libEGL/Surface.h View 1 2 3 4 5 6 1 chunk +1 line, -11 lines 0 comments Download
M src/libEGL/Surface.cpp View 1 2 3 4 5 6 6 chunks +8 lines, -192 lines 0 comments Download
M src/libGLESv2/Context.cpp View 1 2 3 4 5 6 18 chunks +62 lines, -61 lines 0 comments Download
M src/libGLESv2/Program.cpp View 1 2 3 4 5 6 2 chunks +3 lines, -3 lines 0 comments Download
M src/libGLESv2/Texture.h View 1 2 3 4 5 6 6 chunks +29 lines, -26 lines 0 comments Download
M src/libGLESv2/Texture.cpp View 1 2 3 4 5 6 40 chunks +131 lines, -81 lines 0 comments Download
M src/libGLESv2/libGLESv2.cpp View 1 2 3 4 5 6 3 chunks +3 lines, -3 lines 0 comments Download
M src/libGLESv2/mathutil.h View 1 2 3 4 5 6 3 chunks +28 lines, -1 line 0 comments Download
M src/libGLESv2/utilities.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M src/libGLESv2/utilities.cpp View 1 2 3 4 5 6 2 chunks +34 lines, -12 lines 0 comments Download

Messages

Total messages: 30
apatrick1
Hi Daniel, I'm sure this will need considerably more work but I think this is ...
13 years, 5 months ago (2010-11-23 02:04:31 UTC) #1
dgkoch
Haven't had a chanced to go over this one yet in detail, but I wanted ...
13 years, 5 months ago (2010-11-23 22:06:15 UTC) #2
dgkoch
Adding Nicolas in as a reviewer. Our previous Surface::swap definitely seems more complex that it ...
13 years, 5 months ago (2010-11-24 21:07:06 UTC) #3
apatrick1
This new approach is getting increasingly complicated. I found I have to reverse the culling ...
13 years, 5 months ago (2010-11-24 23:14:02 UTC) #4
kbr1
On 2010/11/24 23:14:02, apatrick1 wrote: > This new approach is getting increasingly complicated. I found ...
13 years, 5 months ago (2010-11-24 23:40:46 UTC) #5
kbr1
On 2010/11/24 23:40:46, kbr1 wrote: > On 2010/11/24 23:14:02, apatrick1 wrote: > > This new ...
13 years, 5 months ago (2010-11-24 23:41:44 UTC) #6
dgkoch
Ah yes -- FrontFace and CullMode (and thus all the stencil operations) need to factor ...
13 years, 5 months ago (2010-11-25 19:10:41 UTC) #7
apatrick1
I think the end might be in sight! I ended up adding a fragment shader ...
13 years, 5 months ago (2010-12-02 01:35:25 UTC) #8
apatrick1
http://codereview.appspot.com/3265041/diff/12001/src/libGLESv2/Context.cpp File src/libGLESv2/Context.cpp (right): http://codereview.appspot.com/3265041/diff/12001/src/libGLESv2/Context.cpp#newcode3531 src/libGLESv2/Context.cpp:3531: // Fails for sub-rectangles and if source is default ...
13 years, 5 months ago (2010-12-02 01:35:43 UTC) #9
dgkoch
Have you measured any performance benefits from this approach? http://codereview.appspot.com/3265041/diff/12001/src/libGLESv2/Context.cpp File src/libGLESv2/Context.cpp (right): http://codereview.appspot.com/3265041/diff/12001/src/libGLESv2/Context.cpp#newcode3503 src/libGLESv2/Context.cpp:3503: ...
13 years, 5 months ago (2010-12-07 04:29:20 UTC) #10
dgkoch
I don't have any good suggestions for the unsupported cases in BlitFramebuffer at the moment. ...
13 years, 5 months ago (2010-12-07 04:32:34 UTC) #11
apatrick1
Thanks for the feedback. To clarify, this patch is more related to stability than performance, ...
13 years, 5 months ago (2010-12-07 19:12:23 UTC) #12
apatrick1
http://codereview.appspot.com/3265041/diff/12001/src/libGLESv2/Context.cpp File src/libGLESv2/Context.cpp (right): http://codereview.appspot.com/3265041/diff/12001/src/libGLESv2/Context.cpp#newcode3503 src/libGLESv2/Context.cpp:3503: // StretchRect does not support negative scaling. I tried ...
13 years, 5 months ago (2010-12-07 19:21:06 UTC) #13
apatrick1
Daniel, I tried a completely different approach. The idea is to have all surfaces follow ...
13 years, 5 months ago (2010-12-09 00:43:46 UTC) #14
apatrick1
Daniel, I tested all the changed code with a combination of running modified ANGLE samples ...
13 years, 5 months ago (2010-12-14 23:39:29 UTC) #15
nicolas
I was concerned that rendering to a cube map might not work correctly with this ...
13 years, 5 months ago (2010-12-16 15:24:29 UTC) #16
apatrick1
I tested the cube map flipping by dropping the modified ANGLE into Chrome and going ...
13 years, 5 months ago (2010-12-17 01:26:08 UTC) #17
dgkoch
Hi Al, Sorry I haven't had a chance to go over this in detail yet, ...
13 years, 4 months ago (2010-12-22 04:21:17 UTC) #18
dgkoch
Overall this is looking reasonable. I wonder though, if maybe we should have a giant ...
13 years, 4 months ago (2010-12-23 20:19:22 UTC) #19
nicolas
The skybox of the Aquarium demo is indeed a cube map, but as far as ...
13 years, 4 months ago (2011-01-04 16:48:50 UTC) #20
apatrick1
I addressed Daniel's comments and uncovered a bug in subImage with additional testing. This is ...
13 years, 4 months ago (2011-01-07 23:40:22 UTC) #21
dgkoch
Will look at the new patch next.. http://codereview.appspot.com/3265041/diff/23001/src/libEGL/Surface.cpp File src/libEGL/Surface.cpp (left): http://codereview.appspot.com/3265041/diff/23001/src/libEGL/Surface.cpp#oldcode155 src/libEGL/Surface.cpp:155: result = ...
13 years, 4 months ago (2011-01-11 20:00:06 UTC) #22
dgkoch
Haven't been able to spot any serious flaws in this yet. A couple minor issues ...
13 years, 4 months ago (2011-01-11 21:38:01 UTC) #23
apatrick1
All done. I wanted to see if you saw any major additional work that might ...
13 years, 4 months ago (2011-01-11 23:01:22 UTC) #24
nicolas
Hi Al, Thanks for those cube map face index translation changes. It looks a lot ...
13 years, 4 months ago (2011-01-12 19:08:47 UTC) #25
apatrick1
I forgot to flip the half pixel offset. That was what was causing the blue ...
13 years, 4 months ago (2011-01-15 00:45:26 UTC) #26
nicolas
Looks great to me. I'm confident that anything we might have overlooked can be fixed ...
13 years, 4 months ago (2011-01-19 16:21:59 UTC) #27
apatrick1
Daniel, okay to commit?
13 years, 3 months ago (2011-01-19 18:39:40 UTC) #28
dgkoch
Can you edit the description before you commit? I've noticed that these get added to ...
13 years, 3 months ago (2011-01-19 18:49:49 UTC) #29
apatrick1
13 years, 3 months ago (2011-01-19 23:16:23 UTC) #30
This is in top of tree chrome now at r71834. It'll be in the canary channel
soon.
Sign in to reply to this message.

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