src/libANGLE/renderer/gl/VertexArrayGL.cpp


Log

Author Commit Date CI Message
Jiajia Qin 4747414e 2017-12-29T13:41:00 Use dirty bit for element array buffer BUG=angleproject:2188 Change-Id: I2b2aced542032c7c263f911ef1516af1d42190cc Reviewed-on: https://chromium-review.googlesource.com/846346 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Corentin Wallez 336129f6 2017-10-17T15:55:40 Use a packed enum for buffer targets. BUG=angleproject:2169 Change-Id: I4e08973d0e16404b7b8ee2f119e29ac502e28669 Reviewed-on: https://chromium-review.googlesource.com/723865 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 492f58ec 2017-10-09T19:41:33 Rename VertexArrayImpl::mData to mState. Refactoring change only. BUG=angleproject:1898 Change-Id: I9f55651f923ff930c395a9bb575b4f86ad5d9cbd Reviewed-on: https://chromium-review.googlesource.com/707689 Reviewed-by: Yuly Novikov <ynovikov@chromium.org> Commit-Queue: 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>
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>
Shao dde78e8c 2017-05-22T14:13:27 ES31: Implement Vertex Attrib Binding on OpenGL This patch intends to implement Vertex Attrib Binding on OpenGL back-ends: 1. Add supports for updating vertex attributes by Vertex Attrib Binding APIs. 2. Refactor the process of updating vertex attribtues in class VertexArray to make it easier to implement this feature. BUG=angleproject:1593 TEST=dEQP-GLES31.functional.vertex_attribute_binding.* Change-Id: I800e61518c552b94b84c415895ad31668b0a84b2 Reviewed-on: https://chromium-review.googlesource.com/510251 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 4928b7ca 2017-06-20T12:57:39 Proliferate gl::Context everywhere. This gives the D3D back-end access to the GL state almost anywhere. This uses the onDestroy hook for Textures to push errors up from destructors, although they still don't quite make it to the Context. There are places, such as in EGL object (Context/Surface) destruction, where we end up calling through to GL implementation internals without having access to a gl::Context. We handle this via a proxy Context to a Display, basically a null context, that has access to impl-side state like the Renderer pointer if necessary. It does not have access to the normal GL state. Also Pass gl::Context to RefCountObject::release(). Since we're using destroy() methods now, we should not ever call the destructor directly. BUG=angleproject:1156 Change-Id: Ie4c32ad6bf6caaff0289901f30b5c6bafa2ce259 Reviewed-on: https://chromium-review.googlesource.com/529707 Commit-Queue: Jamie Madill <jmadill@chromium.org> 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>
Jamie Madill c564c070 2017-06-01T12:45:42 Pass gl::Context to impl methods instead of ContextImpl. In some cases we might have to call back into the GL layer, passing the Context, and if we just have a ContextImpl pointer this isn't possible. It also removes the need for SafeGetImpl. BUG=angleproject:2044 Change-Id: I6363e84b25648c992c25779d4c43f795aa2866d6 Reviewed-on: https://chromium-review.googlesource.com/516835 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shao df682a8e 2017-03-31T15:13:21 ES31: Refactor syncState in VertexArrayGL This patch intends to solve several design issues by refactoring the process of syncState in VertexArrayGL before implementing ES3.1 feature Vertex Attrib Binding on the OpenGL back-end. 1. Use nullptr as the flag of using client memory pointer 2. Simplify comparisons in updateAttribPointer. 3. Put all code related to mFunctions->vertexAttrib*Pointer() into an individual function 4. Remove redundant mStateManager->bindVertexArray() in all update* functioins and only call it once in syncState(). BUG=angleproject:1593 Change-Id: I8f68534bb9291a601b9b77954d7281e5171c2b55 Reviewed-on: https://chromium-review.googlesource.com/465378 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 231c7f56 2017-04-26T13:45:37 Apply clang-format to many files. This cleans up the formatting in many places. BUG=None Change-Id: I6c6652ebc042f1f0ffecced53582d09d66b4f384 Reviewed-on: https://chromium-review.googlesource.com/487884 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 876429b7 2017-04-20T15:46:24 Update gl2.h and update entry points. Some method signatures were updated. Types like GLclampf and GLvoid were replaced with other equivalents. BUG=angleproject:1309 Change-Id: I05e8e2072c5a063d87ad96a855b907424661e680 Reviewed-on: https://chromium-review.googlesource.com/475011 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Shao 4181bc97 2017-03-17T14:55:25 Fix bug in updating vertex attribs with client memory pointers In DEBUG version, when using OpenGL back-ends, ANGLE may meet an INVALID_OPERATION error from driver when attemping to update an attribute which is disabled and using a client memory pointer. This patch fixes this bug by skipping such vertex attributes when updating them to driver. With this patch the process to update vertex attributes should be: (1) For enabled attributes using client memory pointer: update by streaming mode in streamAttributes() (2) For disabled attributes using client memory pointer: just label them dirty and skip them (3) For attributes using buffer objects: update with vertexAttrib*Pointer BUG=angleproject:1942 Change-Id: I57043e5904eb4a342fa22d449d98a957010170d6 Reviewed-on: https://chromium-review.googlesource.com/456747 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: 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 dd43e6cd 2017-03-24T14:18:49 Pass Context to VertexArray and Framebuffer syncstate. This will enable more Vulkan-friendly idioms like clearing the vulkan pipeline caches correctly on GL state changes immediately because we have access to the ContextVk. BUG=angleproject:1898 Change-Id: I16c848d8abdde8e26a38d384e565cec8548a66d0 Reviewed-on: https://chromium-review.googlesource.com/459079 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Shao 80957d99 2017-02-20T21:25:59 ES31: Implement Vertex Attrib Binding entry points This patch intends to implement all entry points related to Vertex Attrib Binding. (1) Add entry points and validation code on following APIs: - VertexAttribFormat - VertexAttribIFormat - VertexAttribBinding - BindVertexBuffer - VertexBindingDivisor (2) Add queries on following parameters: - VERTEX_ATTRIB_BINDING - VERTEX_ATTRIB_RELATIVE_OFFSET - VERTEX_BINDING_DIVISOR - VERTEX_BINDING_OFFSET - VERTEX_BINDING_STRIDE - VERTEX_BINDING_BUFFER BUG=angleproject:1593 TEST=angle_end2end_tests TEST=angle_unittests TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_relative_offset_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_bindings_* TEST=dEQP-GLES31.functional.state_query.integer.max_vertex_attrib_stride_* TEST=dEQP-GLES31.functional.state_query.vertex_attribute_binding.* TEST=dEQP-GLES31.functional.debug.negative_coverage.log.vertex_array.vertex_attrib_pointer TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_format TEST=dEQP-GLES31.functional.debug.negative_coverage.get_error.vertex_array.vertex_attrib_i_format Change-Id: I4b477a82df6aad89b89b088580a06d66963e6666 Reviewed-on: https://chromium-review.googlesource.com/446124 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Corentin Wallez <cwallez@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>
Geoff Lang 38a24a94 2017-02-15T13:53:06 Fix incorrect indices being used when divisor is non-zero. When streaming client data in the OpenGL backend, incorrect vertex data was uploaded. The 'first' parameter should be ignored when drawing with a non-zero divisor, even when doing non-instanced draw calls. BUG=angleproject:1894 Change-Id: If5a9ed4683f5c64eea1436eff28b2b2f86befcf4 Reviewed-on: https://chromium-review.googlesource.com/443067 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
He Yunchao acd1898e 2017-01-04T10:46:42 Replace Error(GL_NO_ERROR) with NoError(). In order to make the errors be consistent throughout ANGLE. BUG=angleproject:1686 Change-Id: I0a2d86091d640aedeac94beae345c1fb6971b00d Reviewed-on: https://chromium-review.googlesource.com/424835 Commit-Queue: Yunchao He <yunchao.he@intel.com> Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jiajia Qin d9671226 2016-11-29T16:30:31 Implement ES3.1 glDraw*Indirect entry points for OpenGL BUG=angleproject:1595 TEST=dEQP-GLES31.functional.draw_indirect.* Change-Id: I82f5d0864e70d6e7abdccf5f10330ddfa099ec62 Reviewed-on: https://chromium-review.googlesource.com/417250 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Geoff Lang b2ebb5e8 2016-06-08T18:17:55 Revert "Revert "Use MapBufferRangeWithFallback in VertexArrayGL::streamAttributes"" This reverts commit 8b8d043205a69802be7579bd90798162f34740b2. Change-Id: I25726642d066ca322830d1f5a4327f4e7e551fa6 Reviewed-on: https://chromium-review.googlesource.com/350870 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
Geoff Lang 8b8d0432 2016-06-07T21:34:11 Revert "Use MapBufferRangeWithFallback in VertexArrayGL::streamAttributes" This reverts commit c88d8354479c2e8021ceacebed1450d509cf8ffa. Likely causing failures on Linux webgl tests: http://build.chromium.org/p/chromium.gpu.fyi/waterfall?builder=Linux%20Release%20(New%20Intel) Change-Id: I0294f7f544c666ee7db13c4f7acae868c6bd2240 Reviewed-on: https://chromium-review.googlesource.com/350530 Reviewed-by: Geoff Lang <geofflang@chromium.org>
Yuly Novikov c88d8354 2016-06-02T23:37:47 Use MapBufferRangeWithFallback in VertexArrayGL::streamAttributes Otherwise, end2end tests crash on Nexus 5X, because Adreno driver doesn't provide glMapBuffer. BUG=angleproject:1362 TEST=angle_end2end_tests on Nexus 5X and Linux Change-Id: I6207eca2d0e03eee957bb612271a66016fd562bb Reviewed-on: https://chromium-review.googlesource.com/349421 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
Jamie Madill 3f572680 2016-04-26T13:41:36 Rename gl::VertexArray::Data to gl::VertexArrayState. BUG=angleproject:1363 Change-Id: I5acf670bd88988941676cc9bc75606d55cca224e Reviewed-on: https://chromium-review.googlesource.com/340744 Reviewed-by: Geoff Lang <geofflang@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Corentin Wallez ca311ddb 2015-12-07T15:07:48 Enable and fix the -Wshorten-64-to-32 BUG=angleproject:635 Change-Id: If09014508d5f4dfeb17ac946672a76a98b8ad175 Reviewed-on: https://chromium-review.googlesource.com/316580 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tryjob-Request: Corentin Wallez <cwallez@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
hendrikw bb7740cc 2015-10-20T15:30:53 angle: prevent huge allocations when GL_MAX_VERTEX_ATTRIBS fails I'm not sure why yet, but when using angle in skia, getIntegerv(GL_MAX_VERTEX_ATTRIBS, &maxVertexAttribs) sometimes fails, and when that happens we attempt to allocate and array with the size of maxVertexAttribs, which is uninitialized, which could be huge. Prevent this by initializing the variable. Also sweep through other similar calls and ensure that these use initialized values (test code has not been updated) BUG=skia:4380 Change-Id: If1f3cf72f2b2829ad3933637af8778d574a20f61 Reviewed-on: https://chromium-review.googlesource.com/307239 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Jamie Madill <jmadill@chromium.org> Tryjob-Request: Dian Xiang <dianx@google.com> Tested-by: Hendrik Wagenaar <hendrikw@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>
Geoff Lang 2b835a6f 2015-09-10T15:58:44 Call the correct vertex attrib function for stream integer attribs. Fixes tests related to integer attributes in dEQP-GLES3.functional.shaders.builtin_functions.* BUG=angleproject:880 Change-Id: I107c5c9fd1adc29f58617fab095374daa74a0da1 Reviewed-on: https://chromium-review.googlesource.com/298970 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 6b10ddbf 2015-09-02T15:55:10 Fix the vertex copy loop iterating over one too many elements. BUG=angleproject:1149 BUG=angleproject:880 Change-Id: I2840043ded50f805afa3032fc1f0362fa91b8877 Reviewed-on: https://chromium-review.googlesource.com/297088 Tryjob-Request: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@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>
Geoff Lang 3caa6528 2015-08-27T14:38:52 Only update the synced parts of mAppliedAttributes. Members such as divisor are not synced in VertexArrayGL::updateAttribPointer so assigning the whole attribute causes the divisor to not be synced. BUG=angleproject:1136 Change-Id: I947a144f81ae67953947e363debd1d1cff78207a Reviewed-on: https://chromium-review.googlesource.com/295145 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Corentin Wallez 2c34a4b0 2015-08-25T16:26:02 VertexArrayGL: fix an off by one error for indexRange for drawElements DrawElements' range was of the form [start, end] while DrawArrays' was of the form [start, end), which caused an out of bound array access in the client vertex pointers. This issue was detected while running angle_end2end_tests with AddressSanitizer. BUG=angleproject:1137 Change-Id: Id9abddf29eaf73bacfd08d1616a999be2fe616b8 Reviewed-on: https://chromium-review.googlesource.com/295122 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 4d5362d0 2015-08-25T11:25:14 VertexArrayGL: fix the streaming of offset non-packed strides When the packed stride and source stride were different, the streaming code path used a loop that added two times the offset for the start of the index range. BUG=angleproject:1135 Change-Id: I6d314a1a28abec4df22f7c798c1af87a18d8b7ec Reviewed-on: https://chromium-review.googlesource.com/295225 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 0b9e9032 2015-08-17T11:51:52 Revert "Revert "Implement dirty bits acceleration for VertexArrayGL."" Should be fixed with the Iterator change. BUG=angleproject:1040 This reverts commit 5b21ed5fd030d33ae379b8cc493746244d2928b4. Change-Id: Ibb77775b6b2ce5a49cee7dd81efc62d8c3ba3c62 Reviewed-on: https://chromium-review.googlesource.com/293901 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 5b21ed5f 2015-08-14T18:12:50 Revert "Implement dirty bits acceleration for VertexArrayGL." Seems to cause an exception in Release, in end2end_tests. BUG=angleproject:1040 This reverts commit 6d51c70ccf63a2c5ec240d960ff1bc179d36c92c. Change-Id: I6548bc68dce07d2d85e40afdb604157e689c1d6c Reviewed-on: https://chromium-review.googlesource.com/293821 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 6d51c70c 2015-08-14T10:38:10 Implement dirty bits acceleration for VertexArrayGL. BUG=angleproject:1040 TEST=angle_end2end_tests,angle_perftests,WebGL Change-Id: I91d9aea5eefb58ecaf5b1cc95926fddb2aa846ea Reviewed-on: https://chromium-review.googlesource.com/289570 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>
Jamie Madill 77a90c26 2015-08-11T16:33:17 Reland of "Store the applied element array buffer as a binding pointer." To be consistent with how we start vertex attributes. A null pointer indicates we're using the streaming buffer. Will also aid the dirty state bits refactor. The re-land fixes a crash with WebGL related to element array buffers. BUG=angleproject:1040 TEST=WebGL CTS, end2end_tests, unittests Change-Id: I9b82e06825bf95f0fc2b7c7427e1eb6dd257c1ee Reviewed-on: https://chromium-review.googlesource.com/290044 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@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>
Cooper Partin b459fb04 2015-08-07T16:12:39 Fixed compiler warning C4456 'declaration of variable hides previous local declaration'. BUG=angleproject:1119 Change-Id: I99572711ceeae94fb920d197c86e741945d3b60b Reviewed-on: https://chromium-review.googlesource.com/292279 Tested-by: Cooper Partin <coopp@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 2e5b500c 2015-07-30T17:40:29 Revert "Store the applied element array buffer as a binding pointer." This reverts commit 0018c85ea45090b5de61d4be1fbfbf96a3cde48b. Change-Id: Ieab61c0a4cd1b24d606263e9bf2bae31ea2e8ac4 Reviewed-on: https://chromium-review.googlesource.com/289486 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 0018c85e 2015-07-30T10:57:46 Store the applied element array buffer as a binding pointer. to be consistent with how we start vertex attributes. A null pointer indicates we're using the streaming buffer. Will also aid the dirty state bits refactor. BUG=angleproject:1040 TEST=WebGL CTS, end2end_tests, unittests Change-Id: I7a9167282b60dbe0cbb9f0e5d9e3770890ffeb71 Reviewed-on: https://chromium-review.googlesource.com/284619 Reviewed-by: Geoff Lang <geofflang@chromium.org> Tested-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang b61e173a 2015-06-05T11:49:55 Only sync attributes used by the current program in RendererGL. Improves draw call overhead of RendererGL. DrawCallPerf_gl: Before: 136973 score After: 153317 score Improvement: 11.932% BUG=angleproject:959 Change-Id: Ib75f6fdd756648e4a07f6e970cda03abbdbcf009 Reviewed-on: https://chromium-review.googlesource.com/275409 Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 8e34494f 2015-07-09T14:22:07 Share data between VertexArray and Impl. Using the same design as for the Framebuffer::Data helper, we can use a struct to share between the object and the Impl. This also gives the Impl access to the maxEnabledAttrib, and saves some duplicated storage. BUG=angleproject:1040 TEST=WebGL CTS, end2end_tests, unittests Change-Id: I55c91e8a5f3dcae302cab441182320aafd5375ef Reviewed-on: https://chromium-review.googlesource.com/283930 Tested-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ee09b58e 2015-06-16T15:13:52 Notify the VertexArrayImpl when a buffer is detached. Update VertexArrayGL to clear it's cached buffer binding when a buffer is detached to prevent name aliasing. Fixes: * DEQP standalone crashes. * WebGL Conformance DEQP tests. Change-Id: If21a617629e15873ddeae0368b5399616f2ca68b Reviewed-on: https://chromium-review.googlesource.com/278050 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 294cad9d 2015-05-26T15:11:23 When applying vertex array objects, update the currently applied index buffer. When binding a vertex array object, it was not changing the tracked index buffer binding. This was causing the buffer bindings to sometimes not be updated between index and non-indexed draw calls. Fixes: * Intermittent crashes in chromium startup. * conformance/rendering/many-draw-calls.html * conformance/rendering/framebuffer-switch.html * conformance/attribs/gl-bindAttribLocation-aliasing.html * conformance/attribs/gl-vertex-attrib-render.html * conformance/buffers/index-validation-verifies-too-many-indices.html BUG=angleproject:883 Change-Id: I34ed1ebc65b339329c0f9ab9c28a392f552ed3d8 Reviewed-on: https://chromium-review.googlesource.com/273300 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 851cd580 2015-05-26T16:47:23 Check for null attribute buffers before binding. Fixes: * Crash in conformance/extensions/oes-vertex-array-object.html BUG=angleproject:880 Change-Id: I90eba9b26b2834644ce3ba0e78cab3417c2a7bd1 Reviewed-on: https://chromium-review.googlesource.com/273325 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Kenneth Russell <kbr@chromium.org>
Geoff Lang 1eb708e1 2015-05-04T14:58:23 Clear cached state when deleting GL objects. Change-Id: I84eac9b3796858e5e19e26851ad83baa1f9b6af2 Reviewed-on: https://chromium-review.googlesource.com/269142 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 520c4ae2 2015-05-05T13:12:36 Add a Buffer::getIndexRange function. Instead of exposing the index range cache, add a more generic method that allows the buffers to handle their own caching of index ranges. BufferImpl::getData can be hard to implement for BufferGL because there isn't a way to tell the buffer to unmap and glGetBufferSubData can be very expensive, requiring an extra copy of the data. BUG=angleproject:881 Change-Id: Idec645219056132e0d72a410fbe7b971fa02c9e9 Reviewed-on: https://chromium-review.googlesource.com/261892 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Olli Etuaho <oetuaho@nvidia.com> Tested-by: Geoff Lang <geofflang@chromium.org>
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>
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>
Olli Etuaho 3d5f2687 2015-03-25T17:05:59 Remove unused streamOffset from IndexRangeCache This value is now redundant - it is always the same as regular offset. TEST=angle_end2end_tests BUG=angleproject:956 Change-Id: If4b6c8bcbebf24fbf84723fe081fd058916cc504 Reviewed-on: https://chromium-review.googlesource.com/262423 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>
Geoff Lang 7c82bc46 2015-03-09T16:18:08 Handle client data for draw calls with RendererGL. BUG=angleproject:880 Change-Id: I67839d4934767db77cff7b501002c5aafbcbaef2 Reviewed-on: https://chromium-review.googlesource.com/257672 Tested-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 6ae6efca 2015-03-09T14:42:35 Only sync the VAO state just before the draw call. BUG=angleproject:880 Change-Id: Ifd59c0f67aeab0e4700b3dca57c1b75e3fae48b8 Reviewed-on: https://chromium-review.googlesource.com/257671 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang ba4c4a85 2015-02-24T12:38:46 Implement basic functionality in VertexArrayGL. No support for raw vertex data pointers yet. BUG=angle:880 Change-Id: Ifa8099b0f49028a1465edecde495ba725ac79598 Reviewed-on: https://chromium-review.googlesource.com/252801 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f1e85927 2015-02-23T14:40:04 Add test for very basic operations to enable as GL functionality is added. Add OpenGL and OpenGLES platform types for the ANGLE tests. Comment out some UNIMPLEMENTEDs that tests using OpenGL trigger. BUG=angle:882 Change-Id: I7f85eed184f7cebd25e2521d793fc9c394b704ce Reviewed-on: https://chromium-review.googlesource.com/252252 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang f9a6f084 2015-01-22T13:32:49 Add GL and WGL renderer stubs. BUG=angle:890 Change-Id: I64f2a72b4a350f95acc2ca7080fea1a308422ca4 Reviewed-on: https://chromium-review.googlesource.com/242573 Reviewed-by: Kenneth Russell <kbr@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>