bennycen / angleproject

Automatically exported from code.google.com/p/angleproject
Other
0 stars 0 forks source link

Refactor FBO attachments #963

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently FBO attachments have a few gotchas:

 * our code allocates new memory every set and glMakeCurrent
 * we need specialized helper functions to de-reference to the native render target
 * we use and Impl class for Default attachments, but not for the other types

We could clean this up quite a bit, and improve performance by not 
re-allocating and using virtual methods instead of ifs.

Original issue reported on code.google.com by jmad...@chromium.org on 1 Apr 2015 at 4:37

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : c30c424ff044d6832d48d0150328dbadc59f739a

Code-Review  0 : Brandon Jones, Jamie Madill, Kenneth Russell
Code-Review  +2: Geoff Lang
Verified     0 : Brandon Jones, Geoff Lang, Kenneth Russell
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I7e1cb161d1e08f78b1c4d730a32ad09ac7e61e30
Reviewed-at    : https://chromium-review.googlesource.com/263482

Make egl::Surface ref-counted.

This will let us store references to Surface in FBO attachments,
even after the surface is destroyed.

BUG=angleproject:963

src/libANGLE/RefCountObject.cpp
src/libANGLE/Surface.cpp
src/libANGLE/Surface.h
src/libANGLE/Surface_unittest.cpp
src/libANGLE/renderer/DisplayImpl.cpp

Original comment by bugdro...@chromium.org on 1 Apr 2015 at 7:10

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : c46f45d90638e554096ea8e042a872be68f6bea2

Code-Review  0 : Brandon Jones, Jamie Madill
Code-Review  +1: Kenneth Russell
Code-Review  +2: Geoff Lang
Verified     0 : Brandon Jones, Geoff Lang, Kenneth Russell
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I3e34849e8b1ccae0c91a79617ec6f64aaaab6b10
Reviewed-at    : https://chromium-review.googlesource.com/263483

Refactor DefaultAttachments.

Instead of using an Impl type for default attachments, store the
egl::Surface pointer where possible.

BUG=angleproject:963

src/libANGLE/Framebuffer.cpp
src/libANGLE/FramebufferAttachment.cpp
src/libANGLE/FramebufferAttachment.h
src/libANGLE/renderer/d3d/FramebufferD3D.cpp
src/libANGLE/renderer/d3d/SurfaceD3D.cpp
src/libANGLE/renderer/d3d/SurfaceD3D.h
src/libANGLE/renderer/d3d/SwapChainD3D.h
src/libANGLE/renderer/d3d/d3d11/SwapChain11.cpp
src/libANGLE/renderer/d3d/d3d11/SwapChain11.h
src/libANGLE/renderer/d3d/d3d9/SwapChain9.cpp
src/libANGLE/renderer/d3d/d3d9/SwapChain9.h

Original comment by bugdro...@chromium.org on 2 Apr 2015 at 2:55

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : 7f67b030a8ae26e3ff54f6d33c655fc69c0b9fdb

Code-Review  0 : Brandon Jones, Jamie Madill
Code-Review  +1: Kenneth Russell
Code-Review  +2: Geoff Lang
Verified     0 : Brandon Jones, Geoff Lang, Kenneth Russell
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I472e13664e45f9f05621dea3d28135d4e833fb3d
Reviewed-at    : https://chromium-review.googlesource.com/263485

Move resource storage to attachment base.

We can use GetAs() to retrieve the corresponding API object.

BUG=angleproject:963

src/libANGLE/FramebufferAttachment.cpp
src/libANGLE/FramebufferAttachment.h

Original comment by bugdro...@chromium.org on 2 Apr 2015 at 3:38

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : 4ef3c241f204fbc800c23c4d96ea1e651ca5f4ed

Code-Review  0 : Brandon Jones, Jamie Madill
Code-Review  +1: Kenneth Russell
Code-Review  +2: Geoff Lang
Verified     0 : Brandon Jones, Geoff Lang, Kenneth Russell
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I5e6fa64822e637e1cc769be6fe777fa6e13a0d83
Reviewed-at    : https://chromium-review.googlesource.com/263484

Remove DefaultAttachment.

This class is no longer necessary or used.

BUG=angleproject:963

src/libANGLE/Framebuffer.h
src/libANGLE/FramebufferAttachment.cpp
src/libANGLE/FramebufferAttachment.h
src/libANGLE/renderer/DefaultAttachmentImpl.h
src/libANGLE/renderer/ImplFactory.h
src/libANGLE/renderer/d3d/FramebufferD3D.cpp
src/libANGLE/renderer/d3d/FramebufferD3D.h
src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
src/libANGLE/renderer/d3d/d3d11/Renderer11.h
src/libANGLE/renderer/d3d/d3d9/Renderer9.cpp
src/libANGLE/renderer/d3d/d3d9/Renderer9.h
src/libANGLE/renderer/generate_new_renderer.py
src/libANGLE/renderer/gl/DefaultAttachmentGL.cpp
src/libANGLE/renderer/gl/DefaultAttachmentGL.h
src/libANGLE/renderer/gl/RendererGL.cpp
src/libANGLE/renderer/gl/RendererGL.h
src/libGLESv2.gypi
src/tests/angle_unittests_utils.h

Original comment by bugdro...@chromium.org on 2 Apr 2015 at 3:38

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : 6c7a80d85de8dfe5a797518324280e173eb1f501

Code-Review  0 : Jamie Madill
Code-Review  +2: Geoff Lang
Verified     0 : Geoff Lang
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I1ac64aa0908a58d9780054084d5c205c61848763
Reviewed-at    : https://chromium-review.googlesource.com/263730

Detect RTTI properly on Clang.

This was giving a compile error on OSX. Also update the logic
slightly.

BUG=angleproject:963

src/common/debug.h

Original comment by bugdro...@chromium.org on 2 Apr 2015 at 5:16

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : 7936a6d3c4a4f3895634ef58d915a1ca76bf7695

Code-Review  0 : Brandon Jones, Geoff Lang, Kenneth Russell
Code-Review  +2: Jamie Madill
Verified     0 : Brandon Jones, Geoff Lang, Kenneth Russell
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I1efb2e41aa08766189499995b3150aec6fd61c4e
Reviewed-at    : https://chromium-review.googlesource.com/263486

Move the texture index to attachment base.

This will let us squash the attachment types in a follow-up patch.

BUG=angleproject:963

src/libANGLE/FramebufferAttachment.cpp
src/libANGLE/FramebufferAttachment.h

Original comment by bugdro...@chromium.org on 2 Apr 2015 at 6:08

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Jamie Madill <jmadill@chromium.org>
Commit : 8cf4a39bbfd04fb30ad789777fa6f6de594f5048

Code-Review  0 : Brandon Jones, Geoff Lang, Kenneth Russell
Code-Review  +2: Jamie Madill
Verified     0 : Brandon Jones, Geoff Lang, Kenneth Russell
Verified     +1: Jamie Madill
Commit Queue   : Chumped
Change-Id      : I62419095a7b65486f54d74791027594e8e595e48
Reviewed-at    : https://chromium-review.googlesource.com/263629

Return a ref for FBO attachment image indexes.

This cleans up the syntax somewhat. Also place some more of the
helper methods in the header.

BUG=angleproject:963

src/libANGLE/Framebuffer.cpp
src/libANGLE/FramebufferAttachment.cpp
src/libANGLE/FramebufferAttachment.h
src/libANGLE/renderer/d3d/FramebufferD3D.cpp
src/libANGLE/renderer/d3d/d3d11/Renderer11.cpp
src/libANGLE/renderer/d3d/d3d11/Renderer11.h
src/libANGLE/validationES.cpp

Original comment by bugdro...@chromium.org on 2 Apr 2015 at 6:09