[Mesa-dev] [PATCH 04/11] gallium: Use Array._DrawVAO in st_atom_array.c.
Mathias Fröhlich
Mathias.Froehlich at gmx.net
Mon Apr 23 07:04:39 UTC 2018
Hi all,
On Wednesday, 11 April 2018 16:23:52 CEST Brian Paul wrote:
> Hmm, in my experience, interleaved arrays are fairly common.
>
> I still haven't had much time to look at Mathias's latest patches.
>
> And I haven't looked this code in the state tracker recently, but I seem
> to recall there was some difference between interleaved arrays (in one
> VBO) vs. separate arrays in separate VBOs that needed special handling.
>
> As for determining whether arrays are interleaved, if that's something
> we still need to do, I think it could be lifted into core Mesa. We
> could add a new gl_vertex_array_object::_IsInterleaved field which is
> only updated when the VAO state is modified.
We don't need such a flag.
We can easily integrate that into the current patch series. The bitmask loops
help to loop in an outer loop by unique binding point - which would mean in
the user space case by interleaved set or array attributes - and for each of
that binding points (= one new buffer object) in an inner loop over the
attributes belonging to this binding point.
I think that I have a solution for both of your concerns by just using this
nested bitmask loops.
It is just that the interleaved scan for *user*space*arrays* (not the vbo
interleaved case - that is already handled well or already taken from the
already application provided data in the VAO) is currently not done in generic
code, but can be moved there with a computational effort that is not more than
carrying over the information from gl_vertex_buffer_binding to
pipe_vertex_buffer and from gl_array_attributes to pipe_vertex_element.
Look at the comment in patch #1. There is a pseudo code example how this is
meant to work.
best
Mathias
More information about the mesa-dev
mailing list