src/libANGLE/renderer/d3d/IndexDataManager.cpp


Log

Author Commit Date CI Message
Corentin Wallez bc3b5e63 2015-07-07T10:08:05 D3D11: map index buffers only when needed. Before this patch, index buffers where always mapped in case we needed the index data for the indexed point sprites workaround. This patch makes it so the index buffer is only mapped in this case, when we need to stream index data or when we need to fill the static copies of the index buffers. This make the memory usage of http://alteredqualia.com/xg/examples/mammoth.html go down from 41MB to 28MB. BUG=angleproject:516 Change-Id: I937506d06fd6f074ef2120469dbd235e20245fca Reviewed-on: https://chromium-review.googlesource.com/283626 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 2e62a9a8 2015-07-03T14:13:50 Simplify the flow of IndexDataManager::prepareIndexData This will simplify the work on follow up CLs a lot BUG=angleproject:516 Change-Id: Ie8374ec28fce2e01e76c711a4d280e1ed004a21f Reviewed-on: https://chromium-review.googlesource.com/283380 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Cooper Partin 558f2b5a 2015-06-02T09:34:11 Added emulated indexed pointsprite rendering support. This emulation is for renderers that do not support Geometry Shaders. BUG=angleproject:949 Change-Id: I7acf003e83ea6661f10a703486e6d07eb28786f8 Reviewed-on: https://chromium-review.googlesource.com/274851 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Cooper Partin <coopp@microsoft.com>
Jamie Madill b48e8b07 2015-04-15T14:26:37 D3D11: Only rewrite for primitive restart when needed. We would rewrite our index data every draw call. Change the index check to see if we're writing to the same sized / typed static buffer and only rewrite the data if the user re-uploaded. Also add a performance test for the primitive restart workaround. As a future improvement we could avoid creating new D3D objects every time we reinitialize static data, since BufferSubData calls don't change the size of the buffer if the index type remains the same. BUG=476658 Change-Id: I9d2540ad8b1b34fa0142ba0bf794cf572da8c61d Reviewed-on: https://chromium-review.googlesource.com/265838 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill fd1bf4e6 2015-03-31T09:46:02 Add an BufferFactoryD3D class to help mocking. This D3D-only class has one method, used to generate the D3D IndexBuffer/VertexBuffer. This can help us mock up IndexDataManager. At a later point we can refactor the VertexFormat queries from Renderer into a Caps struct that mirrors our Texure Caps. BUG=angleproject:956 Change-Id: Id8b1220a763873ee871ce92365bbee03633789c7 Reviewed-on: https://chromium-review.googlesource.com/262774 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho ff5e7374 2015-03-25T16:52:11 Recompute stream offset instead of fetching a cached value Recomputing the stream offset is relatively cheap now after recent changes. Remove caching it to make the code less complex. TEST=angle_end2end_tests BUG=angleproject:956 Change-Id: Icb9cc4e4ffd685a78b7f8a45958992a471ebb0f5 Reviewed-on: https://chromium-review.googlesource.com/262422 Reviewed-by: Nicolas Capens <capn@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Olli Etuaho 11ffe1b8 2015-03-24T17:28:18 Micro-optimize math in IndexDataManager Use bitwise operations instead of division, which is expensive on multiple CPU architectures. BUG=angleproject:956 TEST=angle_end2end_tests Change-Id: I57ab540d447c03dae5a96bafb4975fc37e310261 Reviewed-on: https://chromium-review.googlesource.com/262181 Tested-by: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Olli Etuaho 8fcd4e0c 2015-03-24T16:19:33 Fix redundant index validation on the D3D9 backend Make sure that the computed index range is added to the cache of the main buffer object, instead of just to the static buffer object created for the buffer object. This applies to the code path used for D3D9. This way the front-end code in ValidateDrawElements gets the index range from the cache instead of having to iterate over all the indices used on every draw call. BUG=chromium:461274 TEST=WebGL conformance tests, angle_end2end_tests Change-Id: I07cf493d2771dab8e76d69bafda7ac49e5a04808 Reviewed-on: https://chromium-review.googlesource.com/262180 Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Olli Etuaho <oetuaho@nvidia.com>
Jamie Madill 9236b418 2015-02-02T16:51:52 Add generic Impl casting helper methods. GetAs and GetImplAs are template helpers that can replace all of our custom "makeTextureD3D", etc methods. This will help save code across different back-ends. Change-Id: Ib3215c005bfac5a819c5d8f7d60a73a725241332 Reviewed-on: https://chromium-review.googlesource.com/245390 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 2b5420c0 2014-11-19T14:20:15 Merge libGLESv2 and libEGL classes into libANGLE. BUG=angle:733 Change-Id: Ic491c971411fe82c56cd97c5c8325ac14ec218df Reviewed-on: https://chromium-review.googlesource.com/230830 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>