src/libANGLE/renderer/gl/BufferGL.h


Log

Author Commit Date CI Message
Geoff Lang 6d3d381e 2019-08-23T16:45:05 GL: Update BufferGL to use ANGLE_GL_TRY. Refactor the check for keeping shadow data into a feature so it's only initialized once. Bug: angleproject:3020 Change-Id: I45575c246afa7cd54e3a07d7a8464f4d4f45b3be Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1769064 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jonah Ryan-Davis <jonahr@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Jamie Madill 8dc27f99 2018-11-29T11:45:44 Use packed enum for DrawElementsType. The packing and unpacking take a few extra instructions. But it completely obviates the need for any switches in the validation code. Speed is slightly faster or the similar depending on the back-end. Also add gl_angle_ext.xml to GL entry point generator inputs. This was missing and would cause the code generation to miss certain changes. Bug: angleproject:2985 Change-Id: I1ea41a71db71135000166ead8305ec42d22ff7b3 Reviewed-on: https://chromium-review.googlesource.com/c/1351729 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Jamie Madill ae108bd1 2018-10-18T15:00:38 Use angle::Result in front-end (Part 5) Refactors gl::Buffer and implementation. Bug: angleproject:2491 Change-Id: Ic6860dac2faf33067965e7117ea8e98dc6a8dc7a Reviewed-on: https://chromium-review.googlesource.com/c/1283310 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: 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>
Corentin Wallez 2e568cfb 2017-09-18T17:05:22 Add generator for packed GL enums. For testing this also converts two unimportant GLenums, gl::BufferUsage and gl::CullModeFace. BUG=angleproject:2169 Change-Id: If1e86a97d0fed3fd567303aca6506ec579503076 Reviewed-on: https://chromium-review.googlesource.com/688000 Commit-Queue: Corentin Wallez <cwallez@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 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>
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>
Jamie Madill 9f9b1d2d 2017-03-06T18:25:22 Make ScratchBuffer its own type. This helper tool in Renderer11 can be useful in other back-ends, or even in the front end. BUG=angleproject:1635 Change-Id: I18ec19a891a9bdfa7b80dea1b8e308abf206906b Reviewed-on: https://chromium-review.googlesource.com/450919 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill 5f56ddb9 2017-01-13T17:29:55 Buffer: Pass Context to all impl methods. This allows us to retrieve Device handles for Vulkan, and could allow us to avoid storing some pointers for other back-ends. BUG=angleproject:1684 Change-Id: Iccd5b97cf1c3a332d62a38ad0fcf21c352270439 Reviewed-on: https://chromium-review.googlesource.com/426400 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>
Jamie Madill b8353b01 2017-01-25T12:57:21 Vulkan: Simple buffer creation. This is necessary to initialize vertex arrays. BUG=angleproject:1579 Change-Id: Ic5a232d5cdfaa75b41241901de842e62ff3b173f Reviewed-on: https://chromium-review.googlesource.com/406645 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Jamie Madill 8f775607 2016-11-03T16:45:34 Introduce a gl::BufferState class. This state can share vital pieces of information with the impl. The most elementary state is the buffer size, which then the impl doesn't need to replicate. BUG=angleproject:1579 Change-Id: I341393c64a6e49de65c1d53b1bad2fa143209862 Reviewed-on: https://chromium-review.googlesource.com/406644 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Jamie Madill 29639857 2016-09-02T15:00:09 D3D11: Work around Intel uniform buffers bug. When copying from a staging buffer to a uniform buffer, the first upload would be incorrect. Work around this by trying to upload directly to a uniform buffer on the first BufferSubData call. BUG=chromium:593024 Change-Id: I0df3a1422b962bf3ece5d445f435df01e3544b67 Reviewed-on: https://chromium-review.googlesource.com/368774 Reviewed-by: Geoff Lang <geofflang@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
Geoff Lang 90a96efc 2016-01-27T14:53:36 Allow BufferGL to function without being able to map buffers for read. Reading back buffer data is required for index range validation but without glMapBufferRange it is not possible to read back buffer data on OpenGL ES. To work around this, keep a shadow copy of the buffer data when this function is not available. BUG=angleproject:1145 Change-Id: I8e9b3b174574316d3af0022bd29c7d9c96d168c3 Reviewed-on: https://chromium-review.googlesource.com/324092 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Geoff Lang <geofflang@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 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 cc6f55dd 2015-03-20T13:01:02 Split Buffer::map into map and mapRange to match the API. BUG=angleproject:681 Change-Id: Ia4bf2b81134a922265ca762f33ac85d9ddbf1a7c Reviewed-on: https://chromium-review.googlesource.com/261890 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Tested-by: Geoff Lang <geofflang@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>
Geoff Lang b9c0d3b6 2015-03-20T12:46:33 Move buffer::markTransformFeedbackUsage to BufferD3D only. BUG=angleproject:681 Change-Id: Ia9f4ac9cee2c3e4fa140eba12bdb9ab0cc423f6c Reviewed-on: https://chromium-review.googlesource.com/261709 Reviewed-by: Jamie Madill <jmadill@chromium.org> Tested-by: Geoff Lang <geofflang@chromium.org>
Geoff Lang 36c79011 2015-02-24T11:47:20 Implement basic functionality in BufferGL. BUG=angle:881 Change-Id: I8d761741d204d26cea1c87eec725bc8ebaaaa584 Reviewed-on: https://chromium-review.googlesource.com/252800 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>