Commit b4d8445
Move Buffer from VertexBinding to VertexArray
In later CL we will not taking shared context lock for certain
VertexArray API calls. VertexArray itself is per context, so this sounds
reasonable to do. The main challenge here is a lot of VertexArray
function end up accessing gl::Buffer object, which could be modified by
other shared contexts. In order to safely not taking the shared context
lock, we need to separate out Buffer object out of VertexArray itself so
that these lockless APIs will take VertexArray that does not have access
to buffer.
In this CL, VertexArray is split into two classes: VertexArrayPrivate is
everything in VertexArray except buffers. VertexArray is a subclass of
VertexArrayPrivate and owns all the buffers. Buffer is removed from
gl::VertexBinding class. In order to let back end access to buffers,
VertexArrayImpl holds a weak reference to
VertexArray::mVertexArrayBuffers (which is a vector of buffers).
Further, VertexArrayBufferBindingMask mBufferBindingMask is moved from
VertexArrayState into VertexArray class well, since it tracks which
index has a non-null buffer. The bulk of change are due to the
VertexARrayImpl constructor change, since it now takes
vertexArrayBuffers argument. Other bulk of changes are due to
VertexBinding no long has the buffer, but you need to get it directly
from VertexArray or VertexArrayImpl.
This CL also reverts some of the change in crrev.com/c/6758215 that
mVertexBindings no longer contains kElementArrayBufferIndex.
BYPASS_LARGE_CHANGE_WARNING
Bug: b/433331119
Change-Id: I15f4576f7c5c8d8f4d9c9c07d38a60ce539bfeea
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6774702
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com>
Commit-Queue: Charlie Lao <cclao@google.com>1 parent 8dca0ef commit b4d8445
File tree
43 files changed
+514
-390
lines changed- src
- libANGLE
- capture
- renderer
- d3d
- d3d11
- d3d9
- gl
- metal
- null
- vulkan
- wgpu
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
43 files changed
+514
-390
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6148 | 6148 | | |
6149 | 6149 | | |
6150 | 6150 | | |
| 6151 | + | |
6151 | 6152 | | |
6152 | | - | |
| 6153 | + | |
6153 | 6154 | | |
6154 | 6155 | | |
6155 | 6156 | | |
| |||
6171 | 6172 | | |
6172 | 6173 | | |
6173 | 6174 | | |
| 6175 | + | |
6174 | 6176 | | |
6175 | | - | |
| 6177 | + | |
6176 | 6178 | | |
6177 | 6179 | | |
6178 | 6180 | | |
| |||
6189 | 6191 | | |
6190 | 6192 | | |
6191 | 6193 | | |
| 6194 | + | |
6192 | 6195 | | |
6193 | | - | |
| 6196 | + | |
6194 | 6197 | | |
6195 | 6198 | | |
6196 | 6199 | | |
| |||
6207 | 6210 | | |
6208 | 6211 | | |
6209 | 6212 | | |
| 6213 | + | |
6210 | 6214 | | |
6211 | | - | |
| 6215 | + | |
6212 | 6216 | | |
6213 | 6217 | | |
6214 | 6218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3672 | 3672 | | |
3673 | 3673 | | |
3674 | 3674 | | |
3675 | | - | |
| 3675 | + | |
3676 | 3676 | | |
3677 | 3677 | | |
3678 | 3678 | | |
| |||
0 commit comments