BlamKiwi / 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 bugdroid1@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 bugdroid1@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 bugdroid1@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 bugdroid1@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 bugdroid1@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 bugdroid1@chromium.org on 17 Apr 2015 at 2:48

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

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      : Id3a7459753b1b466a06da89f3f8b03b2c2c7a5c1
Reviewed-at    : https://chromium-review.googlesource.com/267752

Cache gl::Data in Context to speed up validation.

This avoids creating a new Data object and copying it around.
Gives a noticable performance increase in the benchmark which
tests validation-only draw calls. Gives about a 8% increase
in the benchmark.

BUG=angleproject:959

src/libANGLE/Context.cpp
src/libANGLE/Context.h
src/libANGLE/State.cpp

Original comment by bugdroid1@chromium.org on 29 Apr 2015 at 8:00

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

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      : I211c310385bdee46ed06f68ecd9c98385e1f8db9
Reviewed-at    : https://chromium-review.googlesource.com/267751

Cache maximum enabled vertex attribute.

This can give us much faster draw call validation, by saving us from
checking buffer sizes for non-enabled attribs. Also for checking if
vertex buffers are mapped. Gives >100% increase in the benchmark.

BUG=angleproject:959

src/libANGLE/State.cpp
src/libANGLE/VertexArray.cpp
src/libANGLE/VertexArray.h
src/libANGLE/validationES.cpp

Original comment by bugdroid1@chromium.org on 29 Apr 2015 at 8:00

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

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      : I384a5c4fbb1c2cd47483bd7cf4bc1d39447a99bc
Reviewed-at    : https://chromium-review.googlesource.com/267750

Cache validate samplers result.

This gives ~23% increase in the validation-only draw call perf test.

BUG=angleproject:959

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

Original comment by bugdroid1@chromium.org on 29 Apr 2015 at 8:00

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/475e5b7f91f8ed9688b5a46efe54f15357096e3e

commit 475e5b7f91f8ed9688b5a46efe54f15357096e3e
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:12:45 2015

D3D11: Reduce overhead of clearing unused textures.

We would spend a fair bit of time iterating over the unused textures,
setting them to null one-by-one, and updating our cache. We can
reduce this time by smarter caching, and skipping unmodified ranges.

BUG=angleproject:959

Change-Id: I92f11cf63542c55bb3adbbb8276a54bcfe848f61
Reviewed-on: https://chromium-review.googlesource.com/277118
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>

[modify] 
http://crrev.com/475e5b7f91f8ed9688b5a46efe54f15357096e3e/src/libANGLE/renderer/
d3d/d3d11/Renderer11.cpp
[modify] 
http://crrev.com/475e5b7f91f8ed9688b5a46efe54f15357096e3e/src/libANGLE/renderer/
d3d/d3d9/Renderer9.cpp
[modify] 
http://crrev.com/475e5b7f91f8ed9688b5a46efe54f15357096e3e/src/libANGLE/renderer/
d3d/RendererD3D.h
[modify] 
http://crrev.com/475e5b7f91f8ed9688b5a46efe54f15357096e3e/src/libANGLE/renderer/
d3d/RendererD3D.cpp
[modify] 
http://crrev.com/475e5b7f91f8ed9688b5a46efe54f15357096e3e/src/libANGLE/renderer/
d3d/d3d9/Renderer9.h
[modify] 
http://crrev.com/475e5b7f91f8ed9688b5a46efe54f15357096e3e/src/libANGLE/renderer/
d3d/d3d11/Renderer11.h
[modify] 
http://crrev.com/475e5b7f91f8ed9688b5a46efe54f15357096e3e/src/common/mathutil.h

Original comment by bugdroid1@chromium.org on 22 Jun 2015 at 5:23

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/d4898490db26b6a950af1c9ec8f9a7ac7996d62c

commit d4898490db26b6a950af1c9ec8f9a7ac7996d62c
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:56:18 2015

Revert "D3D11: Reduce overhead of clearing unused textures."

Compile error on Windows:

error C2561: 'rx::Renderer11::clearTextures' : function must return a value

BUG=angleproject:959

This reverts commit 475e5b7f91f8ed9688b5a46efe54f15357096e3e.

Change-Id: Id34ff9530a71ce43549e2eb78d2d927084d46a47
Reviewed-on: https://chromium-review.googlesource.com/280915
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>

[modify] 
http://crrev.com/d4898490db26b6a950af1c9ec8f9a7ac7996d62c/src/libANGLE/renderer/
d3d/d3d11/Renderer11.cpp
[modify] 
http://crrev.com/d4898490db26b6a950af1c9ec8f9a7ac7996d62c/src/libANGLE/renderer/
d3d/d3d9/Renderer9.cpp
[modify] 
http://crrev.com/d4898490db26b6a950af1c9ec8f9a7ac7996d62c/src/libANGLE/renderer/
d3d/RendererD3D.h
[modify] 
http://crrev.com/d4898490db26b6a950af1c9ec8f9a7ac7996d62c/src/libANGLE/renderer/
d3d/RendererD3D.cpp
[modify] 
http://crrev.com/d4898490db26b6a950af1c9ec8f9a7ac7996d62c/src/libANGLE/renderer/
d3d/d3d9/Renderer9.h
[modify] 
http://crrev.com/d4898490db26b6a950af1c9ec8f9a7ac7996d62c/src/libANGLE/renderer/
d3d/d3d11/Renderer11.h
[modify] 
http://crrev.com/d4898490db26b6a950af1c9ec8f9a7ac7996d62c/src/common/mathutil.h

Original comment by bugdroid1@chromium.org on 22 Jun 2015 at 5:56

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/aa9e99714beaab707a4abac9cc2004220a36cb59

commit aa9e99714beaab707a4abac9cc2004220a36cb59
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:57:16 2015

D3D11: Reduce overhead of clearing unused textures.

*re-land with compile fix*

We would spend a fair bit of time iterating over the unused textures,
setting them to null one-by-one, and updating our cache. We can
reduce this time by smarter caching, and skipping unmodified ranges.

BUG=angleproject:959

Change-Id: I4de20bc131c4a568108ad670a2ef491cfd4c50ed
Reviewed-on: https://chromium-review.googlesource.com/280916
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>

[modify] 
http://crrev.com/aa9e99714beaab707a4abac9cc2004220a36cb59/src/libANGLE/renderer/
d3d/d3d11/Renderer11.cpp
[modify] 
http://crrev.com/aa9e99714beaab707a4abac9cc2004220a36cb59/src/libANGLE/renderer/
d3d/d3d9/Renderer9.cpp
[modify] 
http://crrev.com/aa9e99714beaab707a4abac9cc2004220a36cb59/src/libANGLE/renderer/
d3d/RendererD3D.h
[modify] 
http://crrev.com/aa9e99714beaab707a4abac9cc2004220a36cb59/src/libANGLE/renderer/
d3d/RendererD3D.cpp
[modify] 
http://crrev.com/aa9e99714beaab707a4abac9cc2004220a36cb59/src/libANGLE/renderer/
d3d/d3d9/Renderer9.h
[modify] 
http://crrev.com/aa9e99714beaab707a4abac9cc2004220a36cb59/src/libANGLE/renderer/
d3d/d3d11/Renderer11.h
[modify] 
http://crrev.com/aa9e99714beaab707a4abac9cc2004220a36cb59/src/common/mathutil.h

Original comment by bugdroid1@chromium.org on 22 Jun 2015 at 6:04

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/f9327d33b062248adf6f60bcfe5cc7a1613f6e9e

commit f9327d33b062248adf6f60bcfe5cc7a1613f6e9e
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:57:16 2015

D3D11: Optimize ProgramD3D::sortAttributesByLayout.

We can use pointer math here, instead of copying values.

BUG=angleproject:959

Change-Id: I3b87956224d0846c9011f5d8edb811bc5e4f2b85
Reviewed-on: https://chromium-review.googlesource.com/277119
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>

[modify] 
http://crrev.com/f9327d33b062248adf6f60bcfe5cc7a1613f6e9e/src/libANGLE/renderer/
d3d/d3d11/InputLayoutCache.cpp
[modify] 
http://crrev.com/f9327d33b062248adf6f60bcfe5cc7a1613f6e9e/src/libANGLE/renderer/
d3d/ProgramD3D.h
[modify] 
http://crrev.com/f9327d33b062248adf6f60bcfe5cc7a1613f6e9e/src/libANGLE/renderer/
d3d/ProgramD3D.cpp

Original comment by bugdroid1@chromium.org on 23 Jun 2015 at 2:41

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/b3f4e8d1c905ee6a775fee08dc0b8ae95eac7f92

commit b3f4e8d1c905ee6a775fee08dc0b8ae95eac7f92
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:57:17 2015

Refactor VertexDataManager's current value cache.

This clears the way for future optimizations.

BUG=angleproject:959

Change-Id: Ief9077159e1e5fed5670862454a6f0b41d630551
Reviewed-on: https://chromium-review.googlesource.com/277280
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>

[modify] 
http://crrev.com/b3f4e8d1c905ee6a775fee08dc0b8ae95eac7f92/src/libANGLE/renderer/
d3d/VertexDataManager.h
[modify] 
http://crrev.com/b3f4e8d1c905ee6a775fee08dc0b8ae95eac7f92/src/libANGLE/renderer/
d3d/VertexDataManager.cpp

Original comment by bugdroid1@chromium.org on 23 Jun 2015 at 2:42

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/9c38580bbe72c257addbcec2d93cfcb01c4efb32

commit 9c38580bbe72c257addbcec2d93cfcb01c4efb32
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:57:18 2015

Refactor VertexDataManager to store translated attrib.

Refactoring patch only. Reduces the number of parameters we need to
pass around in internal functions. Clears the way for future
optimization work.

BUG=angleproject:959

Change-Id: Ic98ab5a07189eaa053dffce994546666bb07cede
Reviewed-on: https://chromium-review.googlesource.com/277281
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>

[modify] 
http://crrev.com/9c38580bbe72c257addbcec2d93cfcb01c4efb32/src/libANGLE/renderer/
d3d/VertexDataManager.h
[modify] 
http://crrev.com/9c38580bbe72c257addbcec2d93cfcb01c4efb32/src/libANGLE/renderer/
d3d/VertexDataManager.cpp

Original comment by bugdroid1@chromium.org on 25 Jun 2015 at 2:23

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/7d112bb95c1f0e7c1a45bba6ec57256539a4523d

commit 7d112bb95c1f0e7c1a45bba6ec57256539a4523d
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:57:19 2015

Refactor source pointer math out of VertexBuffer9/11.

This math can live in a single place in the VertexDataManager. This
cleans up the code and paves the way for future optimizations.

BUG=angleproject:959

Change-Id: I7138c6e080d9c3d6507b55d981bfb62c2590a2a8
Reviewed-on: https://chromium-review.googlesource.com/277282
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>

[modify] 
http://crrev.com/7d112bb95c1f0e7c1a45bba6ec57256539a4523d/src/libANGLE/renderer/
d3d/VertexDataManager.cpp
[modify] 
http://crrev.com/7d112bb95c1f0e7c1a45bba6ec57256539a4523d/src/libANGLE/renderer/
d3d/VertexBuffer.h
[modify] 
http://crrev.com/7d112bb95c1f0e7c1a45bba6ec57256539a4523d/src/libANGLE/renderer/
d3d/VertexBuffer.cpp
[modify] 
http://crrev.com/7d112bb95c1f0e7c1a45bba6ec57256539a4523d/src/libANGLE/renderer/
d3d/d3d11/VertexBuffer11.h
[modify] 
http://crrev.com/7d112bb95c1f0e7c1a45bba6ec57256539a4523d/src/libANGLE/renderer/
d3d/d3d11/VertexBuffer11.cpp
[modify] 
http://crrev.com/7d112bb95c1f0e7c1a45bba6ec57256539a4523d/src/libANGLE/renderer/
d3d/d3d9/VertexBuffer9.h
[modify] 
http://crrev.com/7d112bb95c1f0e7c1a45bba6ec57256539a4523d/src/libANGLE/renderer/
d3d/d3d9/VertexBuffer9.cpp

Original comment by bugdroid1@chromium.org on 25 Jun 2015 at 2:23

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/3d72cc7911ca7d122685d39e19d8d15a5e7f46ec

commit 3d72cc7911ca7d122685d39e19d8d15a5e7f46ec
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:57:19 2015

Pass current value type instead of the object.

This allows us to simplify the logic in VertexDataManager enough
that we can start to cache attribute information.

BUG=angleproject:959

Change-Id: I7b53a137d73f40f86e3acb9caebb66f9cacf8b6f
Reviewed-on: https://chromium-review.googlesource.com/277283
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>

[modify] 
http://crrev.com/3d72cc7911ca7d122685d39e19d8d15a5e7f46ec/src/libANGLE/renderer/
d3d/VertexDataManager.cpp
[modify] 
http://crrev.com/3d72cc7911ca7d122685d39e19d8d15a5e7f46ec/src/libANGLE/renderer/
d3d/VertexBuffer.h
[modify] 
http://crrev.com/3d72cc7911ca7d122685d39e19d8d15a5e7f46ec/src/libANGLE/renderer/
d3d/VertexBuffer.cpp
[modify] 
http://crrev.com/3d72cc7911ca7d122685d39e19d8d15a5e7f46ec/src/libANGLE/renderer/
d3d/VertexDataManager.h
[modify] 
http://crrev.com/3d72cc7911ca7d122685d39e19d8d15a5e7f46ec/src/libANGLE/renderer/
d3d/d3d11/VertexBuffer11.h
[modify] 
http://crrev.com/3d72cc7911ca7d122685d39e19d8d15a5e7f46ec/src/libANGLE/renderer/
d3d/d3d11/VertexBuffer11.cpp
[modify] 
http://crrev.com/3d72cc7911ca7d122685d39e19d8d15a5e7f46ec/src/libANGLE/renderer/
d3d/d3d9/VertexBuffer9.h
[modify] 
http://crrev.com/3d72cc7911ca7d122685d39e19d8d15a5e7f46ec/src/libANGLE/renderer/
d3d/d3d9/VertexBuffer9.cpp

Original comment by bugdroid1@chromium.org on 29 Jun 2015 at 7:23

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/27c0891718e79b8510948ba3c1bf6d2815d5a1e8

commit 27c0891718e79b8510948ba3c1bf6d2815d5a1e8
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:57:20 2015

Cache active attribute lists in VertexDataManager.

This saves us re-creating vector memory every iteration, and allows
us to iterate over much smaller lists of attributes. In the future
it could allow us to update the cache more efficiently with state
change updates.

BUG=angleproject:959

Change-Id: Ie8ae7a31726468dc2184165380f1f3e5e0152936
Reviewed-on: https://chromium-review.googlesource.com/277284
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>

[modify] 
http://crrev.com/27c0891718e79b8510948ba3c1bf6d2815d5a1e8/src/libANGLE/renderer/
d3d/VertexDataManager.h
[modify] 
http://crrev.com/27c0891718e79b8510948ba3c1bf6d2815d5a1e8/src/libANGLE/renderer/
d3d/VertexDataManager.cpp

Original comment by bugdroid1@chromium.org on 29 Jun 2015 at 7:23

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/46565a42f0375ce551dc0250ce2b4b9b73853c4f

commit 46565a42f0375ce551dc0250ce2b4b9b73853c4f
Author: Jamie Madill <jmadill@chromium.org>
Date: Mon Jun 22 17:57:21 2015

Small optimization to VertexDataManager.

Avoid calling a getter repeatedly in a loop, when we can instead
store a local reference to an array.

BUG=angleproject:959

Change-Id: I507ad1a6cf3bb6183dd3499df024dfec6950a6c8
Reviewed-on: https://chromium-review.googlesource.com/277285
Tested-by: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Geoff Lang <geofflang@chromium.org>

[modify] 
http://crrev.com/46565a42f0375ce551dc0250ce2b4b9b73853c4f/src/libANGLE/Program.h
[modify] 
http://crrev.com/46565a42f0375ce551dc0250ce2b4b9b73853c4f/src/libANGLE/renderer/
d3d/VertexDataManager.cpp
[modify] 
http://crrev.com/46565a42f0375ce551dc0250ce2b4b9b73853c4f/src/libANGLE/Program.c
pp

Original comment by bugdroid1@chromium.org on 30 Jun 2015 at 2:04

GoogleCodeExporter commented 9 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/angle/angle/+/476682e67f823e11648ebd22678069ea99af28cd

commit 476682e67f823e11648ebd22678069ea99af28cd
Author: Jamie Madill <jmadill@chromium.org>
Date: Tue Jun 30 14:04:29 2015

Use std::vector for TranslatedAttribs.

This allows us to cache a std::vector between calls, and avoids us
calling allocation/constructors for locals, which saves us some
time. It also allows us to use the vector's size to limit the range
of attribs we look at.

BUG=angleproject:959

Change-Id: I799ed6c92fa8fca96e92e235b125a11d2d551aab
Reviewed-on: https://chromium-review.googlesource.com/277286
Reviewed-by: Geoff Lang <geofflang@chromium.org>
Tested-by: Jamie Madill <jmadill@chromium.org>

[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/d3d11/InputLayoutCache.cpp
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/VertexDataManager.cpp
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/d3d11/Renderer11.cpp
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/d3d9/Renderer9.cpp
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/RendererD3D.h
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/VertexDataManager.h
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/ProgramD3D.h
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/d3d9/VertexDeclarationCache.cpp
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/d3d11/InputLayoutCache.h
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/d3d9/VertexDeclarationCache.h
[modify] 
http://crrev.com/476682e67f823e11648ebd22678069ea99af28cd/src/libANGLE/renderer/
d3d/ProgramD3D.cpp

Original comment by bugdroid1@chromium.org on 30 Jun 2015 at 2:17