src/libANGLE/renderer/d3d/VertexDataManager.cpp


Log

Author Commit Date CI Message
Tim Van Patten e76c5c3c 2019-05-03T15:51:30 Vulkan: Enable drawRangeElements() Enable drawRangeElements() for the Vulkan backend and the associated tests. Test: angle_deqp_gles3_tests Bug: angleproject:3420 Change-Id: I98770631ce1387131bb45e2c1e9df24e911bc692 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1595101 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill 0719a88e 2019-04-03T13:15:17 Fix OOB access for dynamic attribs with offsets. We were not properly adding the offset to compute the right bounds. Bug: chromium:943709 Change-Id: I93e714b46dd366d5833fffa858ea3ab0322ffa92 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1548441 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com>
Jamie Madill d51fbe34 2019-01-25T15:03:39 Fold buffer access validation into extensions. We only need to perform vertex array buffer validation if the WebGL compatiblity extension is enabled and robust access is not available. Although sometimes the range checks are useful for determining undefined behaviour they are not required by the OpenGL spec. They also slow down state updates significantly. This migrates the OOR tests into specific WebGL tests. It also requires a change to a Chromium test on the passthrough decoder. Improves perf by about 10% in the Vulkan VBO state change test. Also fixes some robust resource access cases for D3D11. Bug: angleproject:3000 Change-Id: Ice37f38f01c2f27bf32ed55657a30e69d8508335 Reviewed-on: https://chromium-review.googlesource.com/c/1390362 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dd34b3b9 2019-01-16T09:59:54 Pack VertexAttribType enum. This improves performance slightly in vertex array format checks. Instead of needing to switch on GLenum values we can use packed arrays and tables to determine the values we need. Does not significantly affect performance but will enable future work. Bug: angleproject:3074 Change-Id: I6f4821a463e9b41fe3f8c8967eb3ed4c1d6b84be Reviewed-on: https://chromium-review.googlesource.com/c/1393903 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill c3dc5d48 2018-12-30T12:12:04 Merge gl::Context and gl::ContextState. This reduces the number of indrections when accessing the Extensions or Caps structures. It will provide a small speed-up to some methods. It also cleans up the code. Bug: angleproject:2966 Change-Id: Idddac70758c42c1c2b75c885d0cacc8a5c458685 Reviewed-on: https://chromium-review.googlesource.com/c/1392391 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Markus Tavenrath <matavenrath@nvidia.com>
Jamie Madill 7c985f5c 2018-11-29T18:16:17 Make angle::Result an enum. This moves away from a class type to a value type. This should improve performance when using angle::Result as a return value. Previously the generated code would return a pointer instead of a value. Improves performance in the most targeted microbenchmark by 10%. In more realistic scanarios it will have a smaller improvement. Also simplifies the class implementation and usage. Includes some unrelated code generation changes. Bug: angleproject:2491 Change-Id: Ifcf86870bf1c00a2f73c39ea6e4f05ca705050aa Reviewed-on: https://chromium-review.googlesource.com/c/1356139 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill b980c563 2018-11-27T11:34:27 Reformat all cpp and h files. This applies git cl format --full to all ANGLE sources. Bug: angleproject:2986 Change-Id: Ib504e618c1589332a37e97696cdc3515d739308f Reviewed-on: https://chromium-review.googlesource.com/c/1351367 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill c1fd7376 2018-10-26T22:48:39 Move index range calculations into VertexArray. This is in preparation for removing the entire DrawCallParams struct. This struct was big enough to cause a performance hit on draw call perf tests just by virtue of initializing the fields. Also dereferencing the struct members is slower than reading function parameters since it adds an indirection. Also includes some error refactoring to enable moving code to a shared location. In total this patch series reduces overhead by up to 5%. Bug: angleproject:2933 Change-Id: Ib663f2538c14ac30d4c31fd10d6350be469626e2 Reviewed-on: https://chromium-review.googlesource.com/c/1298380 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Frank Henigman d633b156 2018-10-04T23:34:31 Get rid of VertexFormatType. The enum VertexFormatType is redundant with angle::FormatID. The Vulkan back end has already eschewed VertexFormatType, this change updates the D3D back ends. BUG=angleproject:2531 Change-Id: I67ea2203ca80be828f4c757a37810fe67a279364 Reviewed-on: https://chromium-review.googlesource.com/c/1263899 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill e39e8f46 2018-10-05T08:17:38 GL back-end error refactor. Adds explicit error handling to a few scoped state handler classes. Otherwise mostly mechanical refactoring. Bug: angleproject:2753 Change-Id: I2bf969a68f45880902b6e7902297c1340a76a1c4 Reviewed-on: https://chromium-review.googlesource.com/c/1255647 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill ec1fe5b7 2018-08-10T10:05:52 D3D: Use angle::Result error pattern. This completes the refactor for the D3D9/D3D11 back-ends. Bug: angleproject:2752 Change-Id: Ie35a925f75c902d8f9fdab6bc33b3bb9c937f85b Reviewed-on: https://chromium-review.googlesource.com/1167209 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 854429de 2018-07-27T08:12:48 D3D: Return error from getVertexSpaceRequired. This removes another use of the gl::ErrorOrResult pattern. Unblocks error refactoring. Bug: angleproject:2738 Change-Id: Ib611a3b68f8995469befd51797dfed34eaeee84e Reviewed-on: https://chromium-review.googlesource.com/1151450 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill b1565903 2018-07-27T08:12:48 D3D: Pass gl::Context to many more functions. This makes the Context more available for logging errors. Also includes more refactoring to VertexDataManager to ensure we can access the gl::Context. Bug: angleproject:2738 Change-Id: Iae3d22a1403078d236bfe63a3e2d203c13678dc4 Reviewed-on: https://chromium-review.googlesource.com/1151449 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 021bad40 2018-07-27T08:12:47 D3D: Add streaming buffer initialize. This gives us better control over the error returned by the init routine. Also changes the streaming buffer in VertexDataManager to not be a unique_ptr. Bug: angleproject:2738 Change-Id: I3193840dfb71c7574adbe65bc5f9227f4add1fd3 Reviewed-on: https://chromium-review.googlesource.com/1151448 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 02b5328b 2018-07-24T11:06:47 D3D: Make computeOffset not use ErrorOrResult. Unblocks further error refactoring. Also cleans up some checked math logic. Bug: angleproject:2738 Change-Id: I0c9fba9bb908dfc8424921d0db9871241b86e7de Reviewed-on: https://chromium-review.googlesource.com/1142954 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill dec86230 2018-07-11T09:01:18 Generalize Context scratch buffer errors. This refactor will allow us to generate different error types in different backends. This makes Vulkan happy because it won't have to generate gl::Errors and can stay with vk::Error. Bug: angleproject:2713 Change-Id: I981402450f3b519d4f79851982547695d583355a Reviewed-on: https://chromium-review.googlesource.com/1128921 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill ca2ff38b 2018-07-11T09:01:17 Refactor internal format pixel math methods. This removes the use of the ErrorOrResult class from these methods. This will enable more performant Error handling. Also cleans up the ANGLE_TRY_CHECKED_MATH macro to be more general. Bug: angleproject:2713 Change-Id: I349947d320907839ca88ec1f9251e6ddc3858a08 Reviewed-on: https://chromium-review.googlesource.com/1128920 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org>
Jamie Madill 18e323ab 2018-05-11T16:54:17 D3D11: Fix out-of-range access with robust access. When using a vertex buffer with DYNAMIC usage, with robust buffer access enabled, we would sometimes read out-of-bounds when using very large values for the index range. An unchecked signed addition would overflow and lead to reading a negative offset. Fix this problem by keeping the value size_t whenever possible. Also do clamped casts when converting to a smaller values. Also adds a regression test. Bug: chromium:842028 Change-Id: Ie630ac857c6acfc0bace849a03eebfbaa2fbe89a Reviewed-on: https://chromium-review.googlesource.com/1055928 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 0946393d 2018-04-04T05:26:59 Move Buffer Subject/Observer to front end. This makes BufferImpl into an Observer Subject. It also refactors the Vertex Array updates for the D3D11 backend use more of a dirty bit coding style. This change makes it so Buffer contents changes trigger front-end dirty bits from the back-end, which may be undesirable. Bug: angleproject:2389 Change-Id: Iac8ce1171284a86851c18cd1373ddf24fcefe40b Reviewed-on: https://chromium-review.googlesource.com/979812 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill acf2f3ad 2017-11-21T19:22:44 Apply Chromium style fixes. This addresses several minor code quality issues that are validated in Chromium, but not yet applied to ANGLE: * constructors and destructors must be defined out-of-line * auto is not allowed for simple pointer types * use override everywhere instead of virtual * virtual functions must also be defined out-of-line Slightly reduces binary size for me (~2k on Win, 150k on Linux). Bug: angleproject:1569 Change-Id: I073ca3365188caf5f29fb28d9eb207903c1843e6 Reviewed-on: https://chromium-review.googlesource.com/779959 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 33510107 2017-09-20T10:39:18 Pass gl::Context to more Buffer methods. This will allow us to pull out the Renderer from the Context in more places in Buffer11, for state update. Impacts a few method calls in a few places. BUG=angleproject:2151 Change-Id: I1360caea65a94d3de4cd9f52d1b74b10439b02b3 Reviewed-on: https://chromium-review.googlesource.com/673136 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Frank Henigman <fjhenigman@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7aa786c8 2017-09-19T13:57:15 Fix warnings produced from MSVS code analysis. We could dereference a null pointer in a couple edge cases. BUG=angleproject:2151 Change-Id: I0d40b930c5008b80928bfe8c93588f80127fd166 Reviewed-on: https://chromium-review.googlesource.com/665995 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
Jiajia Qin 8a7b3a0c 2017-08-25T16:05:48 Reland 'Remove IndexRange retrieving in validation' This change adds GL_KHR_robust_buffer_access_behavior support. The old change is in https://chromium-review.googlesource.com/c/angle/angle/+/607413 BUG=755897, angleproject:1393, angleproject:1463 Change-Id: I04a1132c3ae8d3a766194df61c4ff7bf0b084f03 Reviewed-on: https://chromium-review.googlesource.com/640750 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez c1346fba 2017-08-24T16:11:26 Revert "Remove IndexRange retrieving in validation" This reverts commit 59d9da089580afac175ff5f1a932b987c9d194d6. Reason for revert: <INSERT REASONING HERE> Original change's description: > Remove IndexRange retrieving in validation > > This change can improve the performance of drawElements which uses > the path without translation. > Paste a set of mean data (repeated 30) for reference on Intel skylake > Win10 desktop. > DrawElementsPerfBenchmark.Run/d3d11: > before after > mean: 13644.4666667 -> mean: 13887.8333333 > DrawElementsPerfBenchmark.Run/d3d11_index_buffer_changed: > before after > mean: 45.8 -> mean: 46.3666666667 > > BUG=755897, angleproject:1393 > > Change-Id: I11f5db25445346958dfef52b1d23df5483cda32f > Reviewed-on: https://chromium-review.googlesource.com/607413 > Reviewed-by: Geoff Lang <geofflang@chromium.org> > Reviewed-by: Jamie Madill <jmadill@chromium.org> > Commit-Queue: Jamie Madill <jmadill@chromium.org> TBR=geofflang@chromium.org,jmadill@chromium.org,jiajia.qin@intel.com Change-Id: I4b00af2c32af36aa978ac2fddcf7514134497cf3 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: 755897, angleproject:1393 Reviewed-on: https://chromium-review.googlesource.com/633296 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Qin Jiajia 59d9da08 2017-08-09T16:59:17 Remove IndexRange retrieving in validation This change can improve the performance of drawElements which uses the path without translation. Paste a set of mean data (repeated 30) for reference on Intel skylake Win10 desktop. DrawElementsPerfBenchmark.Run/d3d11: before after mean: 13644.4666667 -> mean: 13887.8333333 DrawElementsPerfBenchmark.Run/d3d11_index_buffer_changed: before after mean: 45.8 -> mean: 46.3666666667 BUG=755897, angleproject:1393 Change-Id: I11f5db25445346958dfef52b1d23df5483cda32f Reviewed-on: https://chromium-review.googlesource.com/607413 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 401345e4 2017-08-21T10:52:40 D3D11: Move more state into StateManager11. This moves the input layout cache and vertex and index data managers and related info into the state manager. This makes it easier to manage the state application with regards to dirty bits. Also updates the dirty current value handling in StateManager11. BUG=angleproject:1156 BUG=angleproject:2052 Change-Id: I8de968a1f8416363aa1c49d9e9da129942d21275 Reviewed-on: https://chromium-review.googlesource.com/616783 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Martin Radev 553590a5 2017-07-31T16:40:39 Modify attribute divisor for multiview instanced rendering If the ANGLE_multiview extension is used in a program, the number of geometry instances is the number of instances passed to glDraw*Instanced times the number of views in the program. The attribute divisor has to be multiplied by the number of views so that the correct attributes are gathered in the input assembly stage. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: I960d6313c02e3eb83f7a07e72b9bcac072c736f4 Reviewed-on: https://chromium-review.googlesource.com/593953 Commit-Queue: Martin Radev <mradev@nvidia.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Martin Radev dd5f27ee 2017-06-07T10:17:09 Make VertexBinding's member variables private The patch decorates all members in VertexBinding as private and limits access to them only through getters and setters. This makes it easier to debug and keep track of any assignments to the class members. BUG=angleproject:2062 TEST=angle_end2end_tests Change-Id: Iddd49063d060f136bc9cf11c313a5af0931d433c Reviewed-on: https://chromium-review.googlesource.com/530786 Commit-Queue: Olli Etuaho <oetuaho@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov c4d18aac 2017-03-09T18:45:02 Use ErrorStream everywhere Eliminates one more usage of FormatString and its static initializer. Add more ErrorStream types and replace gl::Error and egl::Error with them. BUG=angleproject:1644 Change-Id: Ib498d0ae4b81a332ec71aed7cf709993b154e6bb Reviewed-on: https://chromium-review.googlesource.com/505429 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei-Shao 995c2ed2 2017-05-15T13:31:45 Initialize currentValueAttrib->binding in updateCurrentValueAttribs This patch intends to fix a crash issue in the win-clang build of ANGLE by adding the missing currentValueAttrib->binding assignment in StateManager11.cpp::updateCurrentValueAttribs(). In D3D11 all vertex attributes (VertexAttribute and its VertexBinding) should be treated as a whole, so we should always ensure these two parts are availabe. This patch also add ASSERTs before using *translated->attrib and *translated->binding to prevent a TranslatedAttribute object having a null attrib or binding. BUG=chromium:721783, angleproject:1593 Change-Id: Id11d6f1d4c37daabad2265e01ea38eb51046b9cb Reviewed-on: https://chromium-review.googlesource.com/505928 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 6de51858 2017-04-12T09:53:01 Optimize angle::BitSetIterator. Adds a new custom bitset template to handle packing as many bits as possible into a single variable. Intelligently select the right class depending on platform features and bit sizes. For now, always use a packed 64-bit set on 64-bit, instead of using a 32-bit set for smaller bitsets. BUG=angleproject:1814 Change-Id: I3ffef815c15515555833f6fc9302d8a4eee5423b Reviewed-on: https://chromium-review.googlesource.com/471827 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 20e005b2 2017-04-07T14:19:22 Rename BitSetIterator.h to bitset_utils.h BUG=angleproject:1814 Change-Id: I152ae13b6b7cf0ba72259967f0f124e199b20e07 Reviewed-on: https://chromium-review.googlesource.com/471826 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e16a4519 2017-03-07T20:46:40 D3D11 FL9_3: Fix bug in R32F vertex format emulation. We would allow direct storage when this format is emulated. Noticed this when making a test which used a single float vertex format. BUG=angleproject:1635 Change-Id: Ia2164b0f311b27f24b6aa7760eb9f9a3834c6044 Reviewed-on: https://chromium-review.googlesource.com/451578 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Qin Jiajia cde4f024 2017-02-21T14:06:02 Remove unused parameters of StoreStaticAttrib The parameters count and instances in VertexDataManager::StoreStaticAttrib are never used in the function body. So this patch will remove them. BUG=none Change-Id: Ic3fe21ae50e5016145bfd0c78542540c8ec76fd2 Reviewed-on: https://chromium-review.googlesource.com/445337 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yunchao He <yunchao.he@intel.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiawei-Shao 2597fb64 2016-12-09T16:38:02 ES31: Refactor VertexArray for Vertex Attrib Binding OpenGL ES3.1 feature Vertex Attrib Binding requires vertex arrays should be split into two arrays: 1. an array of vertex buffer binding points, each of which specifies: - a bound buffer object, - a starting offset for vertex attribute data in that buffer object, - a stride used by all attributes using that binding point, - a frequency divisor used by all attributes using that binding point. 2. an array of generic vertex attribute format information records, each of which specifies: - a reference to one of the new buffer binding points above, - a component count and format, and a normalization flag for the attribute data, - the offset of the attribute data relative to the base offset of each vertex found at the associated binding point. Current ANGLE implementation simply uses a struct to represent a vertex attribute object, which does not meet the requirements above. This patch aims to be the the basis of the implementation of all ES3.1 Vertex Attrib Binding APIs by refactoring the struct VertexAttribute and the class VertexArray to fit the new data layout and ensuring all current functionality is retained. BUG=angleproject:1593 TEST=angle_unittests, angle_end2end_tests, gpu_unittests Change-Id: Ieb41f1bf503f815fd0476d2ea045dcb863465254 Reviewed-on: https://chromium-review.googlesource.com/418880 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov d73f852f 2017-01-13T17:48:57 Reland "Replace gl::trace logging with Chromium style logging" Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. Fix incorrect enabling of ERR() calls in UNIMPLEMENTED() and UNREACHABLE(), resulting in increased code size and <iostream> adding 5 static initializers to chrome because of cerr referenced in statically linked translator. BUG=angleproject:1660 Change-Id: I7caa18036118d532e0544f75278602559172ae04 Reviewed-on: https://chromium-review.googlesource.com/431457 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6a6b09c9 2017-01-12T21:52:29 Revert "Replace gl::trace logging with Chromium style logging" Failing Chromium static initializers check: FAILED linux-release-64/sizes/chrome-si/initializers: actual 8, expected 7, better lower Possibly due to the static initializer for std::array for the log severity types. We should change it to POD. BUG=angleproject:1660 This reverts commit afcc41cee4ff63e7f6c9e60e55fc061adbba7dd4. Change-Id: Ifb362a4af78542608397c7a0b19e6afe076f2cf3 Reviewed-on: https://chromium-review.googlesource.com/427235 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Yuly Novikov afcc41ce 2016-12-13T12:59:39 Replace gl::trace logging with Chromium style logging Removing one usage of FormatString() and its static buffer. And preparation for Platform logging. BUG=angleproject:1660 Change-Id: I58192988ad16196706fe48d0c0ab0fd1a10c0210 Reviewed-on: https://chromium-review.googlesource.com/424173 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 60e6edfa 2016-10-31T12:17:19 Make ASSERT reference the conditional expression. This should prevent further unexpected bot breakage due to unreferenced variables in the ASSERT expression. Also remove the no longer needed variable referencing macro. BUG=angleproject:1586 Change-Id: I127695165bdfe39c51fe8d17e00daf6bf2fa8252 Reviewed-on: https://chromium-review.googlesource.com/404948 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e2e406c3 2016-06-02T13:04:10 Add base::numerics for safe math and conversions. This replaces are "IsUnsignedXXXSafe" family of methods. Also add overflow checks to unpack block sizes. BUG=angleproject:1397 Change-Id: Ib47be149b0486c70f795b0d0f8899441faac9340 Reviewed-on: https://chromium-review.googlesource.com/348062 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 52b09c2f 2016-04-11T14:12:31 Re-re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. Re-re-land with a fix for using XFB with deleted buffers. BUG=angleproject:1327 Change-Id: I0fba49515375c149bbf54d933f8d1f747fbb8158 Reviewed-on: https://chromium-review.googlesource.com/338003 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 53a36004 2016-04-08T19:03:18 Revert "Re-land "D3D11: Implement dirty bits for VertexArray11.""" Seems to make the following dEQP test flaky: dEQP-GLES3.functional.lifetime.attach.deleted_output.buffer_transform_feedback doesn't show up on every bot test, but run it a few times and it'll flake. Reverting while I investigate. BUG=angleproject:1327 This reverts commit 3477f3a62dc139a253a0b361ee138116e9fa881f. Change-Id: Ic23a392526f5f6e107cf0aa06448389804d6b208 Reviewed-on: https://chromium-review.googlesource.com/337961 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 3477f3a6 2016-03-29T17:15:29 Re-land "D3D11: Implement dirty bits for VertexArray11."" Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. Re-land with a fix for the start vertex offset. BUG=angleproject:1327 Change-Id: Ic23e48fb18ed7f29c1999914a2f799ac04aa03e9 Reviewed-on: https://chromium-review.googlesource.com/334225 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez 00f394ec 2016-03-16T12:09:11 Revert Dirty bits for VertexArray11 This is a combination of two reverts: Revert "D3D11: Remove unused mRenderer from VertexArray11." Revert "D3D11: Implement dirty bits for VertexArray11." Reverting only the first commit would trigger warnings on the Windows clang bot. BUG=594509 BUG=angleproject:1327 This reverts commit fc4712b5ed270436f2993bfda9e916d4f92684a4. This reverts commit 7d8585b802b7eb741b380bd0d05769281d9507c9. Change-Id: I612dbba0816d6144f71ce815701c13a798585bc7 Reviewed-on: https://chromium-review.googlesource.com/332989 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 7d8585b8 2016-03-09T15:53:12 D3D11: Implement dirty bits for VertexArray11. Translated attributes are now stored in the VertexArray11 in a cache, and only updated when dirty bits change. Currently dynamic attributes must be re-translated every call, so these are stored in a list and processed repeatedly. This skips doing a lot of the VertexDataManager work for vertex attributes that don't change between draw calls. Current value attributes, which correspond to disabled attributes that the program will pulls vertex data from, are owned by the Context, so these need to be handled outside of the VertexArray11. Further changes will be necessary to reduce the redundant work we do in the InputLayoutCache. We shouldn't need to re-check the cache if nothing relevant changed. This give about a 23% performance improvement on the draw call benchmark on my machine. BUG=angleproject:1327 Change-Id: I7fb944d32ea7e6c78b9e478406bdb7e10a7fc05b Reviewed-on: https://chromium-review.googlesource.com/330173 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e18eb970 2016-03-04T15:46:59 D3D: Refactor VertexDataManager attribute storage. Instead of splitting attributes into 'active enabled' and 'active disabled', split them into static/dynamic/direct/current value, and handle each group invidually. This also will allow the dirty bits code to call in to the VertexDataManager separately for each type of necessary vertex data translation, and skip it entirely for direct buffer storage. Should be a refactoring patch only. BUG=angleproject:1327 Change-Id: I53cb5672054d99ae68e9aa2e5a3c046a002e360d Reviewed-on: https://chromium-review.googlesource.com/330171 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill e36b92d4 2016-03-04T15:46:58 D3D: Use a single D3D buffer per static vertex attribute. The current caching logic stores multiple static attributes in a single buffer if the attributes share a D3D buffer - sometimes. If a buffer is 'committed' (has been used in a draw) then we would make a new D3D buffer for the next set of static attributes. Instead use a simpler scheme of a single D3D buffer for each static attribute. Also change rx::VertexBuffer to a reference counted class. This simplifies the caching logic for static vertex buffers (translated attributes) considerably. We only need to release the buffers when the ref count is zero, and ensure we track the ref count correctly when bound to D3D. This leads the way towards using a simpler dirty bit scheme for intelligent state updates, and less overhead doing work with buffer state updates. BUG=angleproject:1327 Change-Id: I99461d50b9663024eaa654cd56b42a63f1416d08 Reviewed-on: https://chromium-review.googlesource.com/330170 Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill d8fa9215 2016-03-02T11:51:43 D3D: Refactor VertexBuffer::getSpaceRequired. By making this a virtual call to BufferFactoryD3D (aka RendererD3D), we can also stop having side-effects in the BufferD3D class of creating a static buffer storage when we only want to know the space required for some vertex elements. This refactoring will aid implementation of VertexArray11 dirty bits. BUG=angleproject:1327 Change-Id: I0e34c6e9f5da35edebc179d578ad9392dc0166db Reviewed-on: https://chromium-review.googlesource.com/329741 Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Jamie Madill dbfc6c63 2016-02-29T01:08:57 D3D: Make directStoragePossible a local static method. This method doesn't need to call through to the VertexBuffer class, since in only really depends on vertex format caps. This makes the code local to the VertexDataManager, the only place it is used. Refactoring patch only, for VertexArray11 dirty bits. BUG=angleproject:1327 Change-Id: I315313a72a00186930d7f9b1091ccb91f37f9f96 Reviewed-on: https://chromium-review.googlesource.com/329740 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Zhenyao Mo <zmo@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill a0537333 2015-11-19T13:55:26 D3D: Fix incorrect instanced vertex offsets. The spec says that DrawElements is equivalent to the instanced call with an instance ID of zero. This patch fixes a bug in our VertexDataManager where we would sometimes ignore the attribute divisor for DrawElements, and stream the wrong amount of data/wrong start offset. BUG=angleproject:1213 TEST=dEQP-GLES3.functional.draw.draw_elements.* TEST=dEQP-GLES3.functional.draw.draw_range_elements.* TEST=dEQP-GLES3.functional.draw.random.* Change-Id: I1c430a14ab3be68a24e233e9cdd1e4fd88c920a0 Reviewed-on: https://chromium-review.googlesource.com/312062 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 84b0c3b7 2015-11-05T15:15:28 Re-land "In D3D, cache static vertex buffers to prevent wasteful recreation" BUG=angleproject:197 Changes since first failed patch: - Optimized BufferD3D::getStaticVertexBuffer() - Removed loop to commit static buffers - Out-of-date static buffers (which are much rarer anyway after this patch) are marked for deletion at the *next* draw call, rather than searched for before each draw call. That search was expensive. The change should see a net improvement to DrawCallPerfBenchmark for D3D null. Change-Id: If4942e0afd9e8fefadce8820a1305e13636547ef Reviewed-on: https://chromium-review.googlesource.com/311115 Tested-by: Austin Kinross <aukinros@microsoft.com> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5b58cae2 2015-11-05T14:51:47 Revert "In D3D, cache static vertex buffers to prevent wasteful recreation" Perf bisect traced performance regression to this CL: 8.1% regression in angle_perftests/DrawCallPerf_d3d9_null/score 6.2% regression in angle_perftests/DrawCallPerf_d3d11_null/score BUG=angleproject:197 This reverts commit 868651d334d060458af13c7ff9211c2f72be0cad. Change-Id: Iaba7eb4e574eb886496361e61fd5fe78ca14dcb8 Reviewed-on: https://chromium-review.googlesource.com/311150 Tryjob-Request: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Austin Kinross 868651d3 2015-08-31T15:31:18 In D3D, cache static vertex buffers to prevent wasteful recreation BUG=angleproject:197 Change-Id: I66cd10609b2edbcf12b99530eafe1727511fe515 Reviewed-on: https://chromium-review.googlesource.com/296503 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 846f107f 2015-09-01T09:07:15 Fix unsigned/signed comparison in VertexDataManager. Affects Debug/Win32 only. BUG=angleproject:1136 Change-Id: I29fbf06077014c313489be07ff983009afb652fd Reviewed-on: https://chromium-review.googlesource.com/296362 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 3cf12ce6 2015-08-27T14:40:48 Implement the instanced draw calls in RendererGL. BUG=angleproject:1136 Change-Id: I1167365618bdc3ca37ac0f4c60809de32c7a9d78 Reviewed-on: https://chromium-review.googlesource.com/295733 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 5b49bb83 2015-08-31T18:48:50 Revert "Implement the instanced draw calls in RendererGL." Causing crashes in some dEQP tests. This reverts commit c1948415e52dbaefb0d3176b75a58a7b86bd091a. Change-Id: Idedb32484b4f2b09090346bc4228fe536190a621 Reviewed-on: https://chromium-review.googlesource.com/296440 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang c1948415 2015-08-27T14:40:48 Implement the instanced draw calls in RendererGL. BUG=angleproject:1136 Change-Id: Id04e357b97c04b3843b25827f705fd802e6a68e3 Reviewed-on: https://chromium-review.googlesource.com/295233 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 63805b47 2015-08-25T13:17:39 Make the Program's semantic index D3D-only. This concept isn't strictly necessary for GL-side validation. Instead we can use a bitset to track active attribs, and determine is a particular location is active. BUG=angleproject:1123 Change-Id: If7a920a3071672116bafffb3368671f721723b65 Reviewed-on: https://chromium-review.googlesource.com/294570 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin 4d61f7ed 2015-08-12T10:56:50 Reland Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' Additional warnings found with more testing and added C4267 warning disable only for angle_libpng BUG=angleproject:1120 Change-Id: Ic403dcff5a8018056fa51a8c408e64207f3362eb Reviewed-on: https://chromium-review.googlesource.com/293028 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b195643c 2015-08-12T17:35:20 Revert "Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data'" Seems to have quite a few warnings in 64-bit on my machine. BUG=angleproject:1120 This reverts commit c5cf9bc47d0ee028adbbf9e9f94ca567eec601dc. Change-Id: I86768b900aeba52e7a2242d9ae8949f93f1a5ba9 Reviewed-on: https://chromium-review.googlesource.com/293280 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Cooper Partin c5cf9bc4 2015-08-06T10:46:48 Fixed compiler warning C4267 'conversion from 'size_t' to 'type', possible loss of data' BUG=angleproject:1120 Change-Id: I01ef10bea7f487c2b394d030c76628f38d2ea645 Reviewed-on: https://chromium-review.googlesource.com/292780 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 16f99b74 2015-07-02T14:09:06 Fix warnings with code analysis tools. Variable shadowing and a few other non-bug warnings. BUG=None Change-Id: Ibf62d6e7fef91fc213a53a6902f494147ed30ebc Reviewed-on: https://chromium-review.googlesource.com/283223 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 476682e6 2015-06-30T10:04:29 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>
Jamie Madill 46565a42 2015-06-22T13:57:21 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>
Jamie Madill 27c08917 2015-06-22T13:57:20 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>
Jamie Madill 3d72cc79 2015-06-22T13:57:19 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>
Jamie Madill 7d112bb9 2015-06-22T13:57:19 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>
Jamie Madill 9c38580b 2015-06-22T13:57:18 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>
Jamie Madill b3f4e8d1 2015-06-22T13:57:17 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>
Minmin Gong 794e0009 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: Id0e06d7d6600344d858f00dabc219d79289bbc82 Reviewed-on: https://chromium-review.googlesource.com/265020 Tested-by: Minmin Gong <mgong@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b3584fb4 2015-04-09T17:34:21 Revert "Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data)" Causing a build failure on Mac/Clang: ./Tokenizer.cpp:551:7: error: extra tokens at end of #else directive [-Werror,-Wextra-tokens] #else if defined(_MSC_VER) http://build.chromium.org/p/chromium.gpu.fyi/builders/GPU%20Mac%20Builder/builds/29136 This reverts commit 3b26e231d99154814eb428f75a67bbe7a21adadc. Change-Id: I2d11ddcc18130d908fd2ec3d6f5ab890cfccd5e7 Reviewed-on: https://chromium-review.googlesource.com/264983 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Minmin Gong 3b26e231 2015-04-07T18:31:54 Fix and enable warning C4244 (Conversion from 'type1' to 'type2', possible loss of data) Change-Id: I73d9a2b9ad16f032be974b9c819de0dc1247c2ea Reviewed-on: https://chromium-review.googlesource.com/264533 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@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 5ead927f 2015-03-25T12:27:43 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 Change-Id: I9bbfcbd115661ad629db9ed93d683cd8d0dc9a78 Reviewed-on: https://chromium-review.googlesource.com/263102 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 5b97287e 2015-03-30T19:52:55 Revert "Don't use a helper function to get the vertex attributes." Caused a warning on 32-bit builds. This reverts commit 20d78d241b448aa0b2e3f49d902d3ab63a551932. Change-Id: I4d61024fb29978e7f1bacdd693fc6f1bc00bd0cc Reviewed-on: https://chromium-review.googlesource.com/262918 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 20d78d24 2015-03-25T12:27:43 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 Change-Id: I6c11d4a5a22c314c69b3403dfdeb2d950b1c7639 Reviewed-on: https://chromium-review.googlesource.com/262336 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Nicolas Capens <capn@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
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>
Austin Kinross 3ae6465f 2015-01-26T15:51:39 Fix lots of variable shadowing in ANGLE BUG=angle:877 Change-Id: I3df0fffb19f5ecbe439fbc2a8d6d239a5dc6b638 Reviewed-on: https://chromium-review.googlesource.com/243334 Tested-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 74cafab1 2015-01-23T23:17:32 Revert "Fix lots of variable shadowing in ANGLE" Caused WebGL CTS failures on the texture-npot test: https://www.khronos.org/registry/webgl/sdk/tests/conformance/textures/texture-npot.html This reverts commit c67e6e9fade44ef8938724e82db11db725e9c8e5. Change-Id: I089e99859231e0d657084ac3647257c650a9da92 Reviewed-on: https://chromium-review.googlesource.com/243041 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Austin Kinross c67e6e9f 2015-01-21T16:01:07 Fix lots of variable shadowing in ANGLE BUG=angle:877 Change-Id: I15168ae32605b26aee08274464ffe68adb5a7e87 Reviewed-on: https://chromium-review.googlesource.com/242351 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Austin Kinross be0facc6 2015-01-07T16:22:29 Reduce calls to ID3D11DeviceContext::Map() in VertexBuffer11.cpp This change moves VertexBuffer11::storeVertexAttributes()'s call to Map() outside a for-loop, eliminating unnecessary calls to Map(). Since Map() is a relatively expensive operation (even when using NO_OVERWRITE) this change gives a noticeable performance boost in some scenarios. Change-Id: I320111b32f2bb9eed92efbd240206e12aaa9964e Reviewed-on: https://chromium-review.googlesource.com/240181 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Austin Kinross <aukinros@microsoft.com>
Gregoire Payen de La Garanderie 2c7ea058 2015-01-07T12:47:35 Implement support for ES 3.0 instanced arrays BUG=angle:863 Change-Id: I3918c478b33b26b2b179a7f8dd6e4210ecb0cf5c Reviewed-on: https://chromium-review.googlesource.com/239170 Tested-by: Gregoire Payen de La Garanderie <Gregory.Payen@imgtec.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill d4b55a00 2015-01-09T14:21:49 Fix "start" vertex being applied for instanced buffers. In GLES, the start vertex only applies to non-instanced vertex attributes. BUG=angle:864 BUG=447140 Change-Id: Idd2afbfbd4c2e76e06b2704cc002fae26b353109 Reviewed-on: https://chromium-review.googlesource.com/239843 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Austin Kinross <aukinros@microsoft.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 7dd2e10d 2014-11-10T15:19:26 Merge the ProgramBinary class into Program. BUG=angle:731 Change-Id: I2ee97155841dc62f04bb71c1f2035d210fd3883c Reviewed-on: https://chromium-review.googlesource.com/232694 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 21329414 2014-12-02T20:50:30 Revert "Merge the ProgramBinary class into Program." Issues appeared on the FYI waterfall, content_gl_tests hangs. This reverts commit 2195a6d6032883ed05468d5ecd019e7cb9a27bce. Change-Id: I9fe1a53cf40887ae5a98fd77b4872f41085fcea7 Reviewed-on: https://chromium-review.googlesource.com/232386 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 2195a6d6 2014-11-10T15:19:26 Merge the ProgramBinary class into Program. BUG=angle:731 Change-Id: Ia0a356c0684f3a3576c71dfd04b00874318dd084 Reviewed-on: https://chromium-review.googlesource.com/228701 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>