src/libANGLE/renderer/d3d/IndexDataManager.h


Log

Author Commit Date CI Message
Cooper Partin 534bf87b 2016-02-09T11:33:29 Implemented instanced rendering for emulated point sprites Non-instanced PointSprite emulation for lower feature levels is implemented using D3D DrawIndexedInstanced and an instanced vertex buffer containing a pointsprite quad. GL instanced rendering using glDrawArraysInstanced and glDrawElementsInstanced with pointsprite emulation is performed using a for-loop. The loop iterates over each instance to render and adjusts the buffer offsets accordingly. This is not performant and is only used and required by this chosen pointsprite emulation method. Indexed instanced (glDrawElementsInstanced), uses the same offset loop because the vertex buffer containing the data to be rendered has already been expanded using getEmulatedIndexedBuffer(). Expanding the buffer makes the two rendering operations similar enough to share code. BUG=angleproject:1279 TEST=angle_end2end_tests Change-Id: If46cc9f158e29f5518c70ad630b3228f474a9f8b Reviewed-on: https://chromium-review.googlesource.com/321407 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Jamie Madill 4dd1e55f 2015-11-06T14:23:24 D3D11: Implement basic primitive restart. D3D11 handles primitive restart similarly to OpenGL's fixed index, with a couple differences. It can't be toggled off, so we need to restrict the max element index (handled in a prior patch), and for smaller buffer types we need to rewrite the index data. BUG=angleproject:597 Change-Id: Ib890ce9b3f5511784138ea3953a384b1c483ca9e Reviewed-on: https://chromium-review.googlesource.com/309639 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3edfe034 2015-09-04T16:38:24 Support primitive restart in RendererGL. Store index ranges in a new struct that tracks how many real indices were seen. Update index caching to key on primitive restart being enabled and update index counting functions to skip primitive restart indicies when needed. Passes dEQP-GLES3.functional.primitive_restart.* Change-Id: Id1e25a5adcdcd4e998836e8ff6679c64be4c3066 Reviewed-on: https://chromium-review.googlesource.com/297770 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
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>
Geoff Lang 831b1953 2015-05-05T11:02:27 Move the IndexRangeCache and Range types to the gl namespace. BUG=angleproject:881 Change-Id: Ib05149facee9fcc7714cb957ca8647b3498a36b6 Reviewed-on: https://chromium-review.googlesource.com/269254 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org>
Jamie Madill f0d10f89 2015-03-31T12:56:52 Replace non-copyable macro with a helper class. This class provides a simpler scheme for blocking default copy and assignment operators. It also reduces the amount of code needed since it's inherited to child classes. This also fixes the conflict between our macro and the same-named macro in Chromium code. BUG=angleproject:956 Change-Id: If0dc72aa3f63fbc7b8fa34907418821c64c39e2f Reviewed-on: https://chromium-review.googlesource.com/263257 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>
Geoff Lang 0a73dd85 2014-11-19T16:18:08 Fix include guards. BUG=angle:733 Change-Id: I08b2c11c4831f1161c178c1842b10e807185aced Reviewed-on: https://chromium-review.googlesource.com/230831 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@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>