shairai / angleproject

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

Reduce CPU overhead of draw calls. #959

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
D3D9 and D3D11 have significant CPU overhead for draw calls that can be 
improved.

Optimize for the DrawCallPerf perf test.

Original issue reported on code.google.com by geofflang@chromium.org on 25 Mar 2015 at 4:32

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Geoff Lang <geofflang@chromium.org>
Commit : 20d78d241b448aa0b2e3f49d902d3ab63a551932

Code-Review  0 : Geoff Lang
Code-Review  +1: Jamie Madill
Code-Review  +2: Nicolas Capens
Verified     0 : Jamie Madill, Nicolas Capens
Verified     +1: Geoff Lang
Commit Queue   : Chumped
Change-Id      : I6c11d4a5a22c314c69b3403dfdeb2d950b1c7639
Reviewed-at    : https://chromium-review.googlesource.com/262336

Don't use a helper function to get the vertex attributes.

The overhead of the function call ended up being a hot spot for draw calls
since the attributes are iterated over many times in VertexDataManager.

BUG=angleproject:959

src/libANGLE/State.cpp
src/libANGLE/State.h
src/libANGLE/VertexArray.cpp
src/libANGLE/VertexArray.h
src/libANGLE/angletypes.cpp
src/libANGLE/renderer/d3d/VertexDataManager.cpp
src/libANGLE/renderer/d3d/VertexDataManager.h
src/libGLESv2/entry_points_gles_2_0.cpp
src/libGLESv2/entry_points_gles_3_0.cpp

Original comment by bugdro...@chromium.org on 30 Mar 2015 at 2:06

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Geoff Lang <geofflang@chromium.org>
Commit : 45795dbe14265ff375395bf57e7004f903579254

Code-Review  0 : Geoff Lang
Code-Review  +1: Jamie Madill
Code-Review  +2: Nicolas Capens
Verified     0 : Jamie Madill, Nicolas Capens
Verified     +1: Geoff Lang
Commit Queue   : Chumped
Change-Id      : I96769879dabdbba7a222f98d87c5be0a829cb7dd
Reviewed-at    : https://chromium-review.googlesource.com/262335

Inline commonly used Error methods and add move operators.

The function call overhead of the constructors and assignement operators
ended up being a hotspot even though the functions didn't do any
significant work.

BUG=angleproject:959

src/libANGLE/Error.cpp
src/libANGLE/Error.h
src/libANGLE/Error.inl
src/libGLESv2.gypi

Original comment by bugdro...@chromium.org on 30 Mar 2015 at 2:06

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Geoff Lang <geofflang@chromium.org>
Commit : 7a26a1ad025101e156d2fbc9887a6c94acf00721

Code-Review  0 : Geoff Lang
Code-Review  +1: Jamie Madill
Code-Review  +2: Nicolas Capens
Verified     0 : Jamie Madill, Nicolas Capens
Verified     +1: Geoff Lang
Commit Queue   : Chumped
Change-Id      : Ie08e68ae27372a97bd118e61478201b0d3dad955
Reviewed-at    : https://chromium-review.googlesource.com/262337

Cache std::vectors in ProgramD3D to avoid allocations during draw calls.

BUG=angleproject:959

src/libANGLE/renderer/d3d/ProgramD3D.cpp
src/libANGLE/renderer/d3d/ProgramD3D.h

Original comment by bugdro...@chromium.org on 30 Mar 2015 at 2:56

GoogleCodeExporter commented 9 years ago

Original comment by geofflang@chromium.org on 30 Mar 2015 at 3:06

GoogleCodeExporter commented 9 years ago

Original comment by geofflang@chromium.org on 30 Mar 2015 at 3:07

GoogleCodeExporter commented 9 years ago
Project: angle/angle
Branch : master
Author : Geoff Lang <geofflang@chromium.org>
Commit : 5ead927f9fa920c39e601fef91b66753d81e845e

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

Don't use a helper function to get the vertex attributes.

The overhead of the function call ended up being a hot spot for draw calls
since the attributes are iterated over many times in VertexDataManager.

BUG=angleproject:959

src/libANGLE/State.cpp
src/libANGLE/State.h
src/libANGLE/VertexArray.cpp
src/libANGLE/VertexArray.h
src/libANGLE/angletypes.cpp
src/libANGLE/renderer/d3d/VertexDataManager.cpp
src/libANGLE/renderer/d3d/VertexDataManager.h
src/libGLESv2/entry_points_gles_2_0.cpp
src/libGLESv2/entry_points_gles_3_0.cpp

Original comment by bugdro...@chromium.org on 30 Mar 2015 at 8:29

GoogleCodeExporter commented 9 years ago

Original comment by jmad...@chromium.org on 15 Apr 2015 at 2:03

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

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

Micro-optimize State::hasMappedBuffer.

This speeds up draw call validation.

BUG=angleproject:959

src/libANGLE/State.cpp

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

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

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

Micro-optimize ValidateDrawBase.

This speeds up our draw call benchmark.

BUG=angleproject:959

src/libANGLE/Program.cpp
src/libANGLE/Program.h
src/libANGLE/validationES.cpp

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