[Mesa-dev] [PATCH 00/13] Switch over to use VAOs for drawing.

Mathias.Froehlich at gmx.net Mathias.Froehlich at gmx.net
Thu Feb 15 19:55:12 UTC 2018


From: Mathias Fröhlich <Mathias.Froehlich at gmx.net>

Hi,

The following series moves over to draw via a VAO in all draw
paths. At the current stage this introduces an additional
indirection for the immediate mode and display list draws.
But in the mid term using a VAO should enable drivers to make
use of the binding information already present in the VAO
that gets lost when transforming VAO to a gl_vertex_array list.
In the mid term todays fast vbo_exec_array draw path should
move closer to the backend drivers. But the old style dlist
draw path does as well benefit from the preserved single
vbo binding information still visible in the VAO.
The changeset just cleans up the most obvious parts that are
directly involved with the changes done. For example the
duplicate _mesa_update_state call is no longer needed with the
series and cleaned up. But the series enables much more cleanup.
The series is tested without piglit regressions with my
available hardware that is i965, classic swrast and radeonsi.

Please review
Thanks!

Mathias


Mathias Fröhlich (13):
  mesa: Provide an alternative to get_vp_mode()
  vbo: Use _VPMode instead of get_vp_mode().
  vbo: Remove get_vp_mode() and enum vp_mode.
  mesa: Introduce a yet unused _DrawVAO.
  vbo: Implement method to track the inputs array.
  vbo: Use _DrawVAO for array type draw commands.
  mesa: Add flush_vertices to
    _mesa_{enable,disable}_vertex_array_attrib.
  mesa: Make _mesa_vertex_attrib_binding public.
  mesa: Add flush_vertices to _mesa_bind_vertex_buffer.
  vbo: Implement tool functions for vbo specific VAO setup.
  vbo: Make use of _DrawVAO from immediate mode draw
  mesa: Use atomics for shared VAO reference counts.
  vbo: Make use of _DrawVAO from the dlist code.

 src/mesa/drivers/common/meta.c |  36 +++++----
 src/mesa/main/arbprogram.c     |   5 ++
 src/mesa/main/arrayobj.c       |  39 ++++++++--
 src/mesa/main/arrayobj.h       |   9 +++
 src/mesa/main/attrib.c         |   2 +
 src/mesa/main/bufferobj.c      |   2 +-
 src/mesa/main/context.c        |   5 ++
 src/mesa/main/enable.c         |   6 +-
 src/mesa/main/mtypes.h         |  38 ++++++++++
 src/mesa/main/pipelineobj.c    |   3 +
 src/mesa/main/shaderapi.c      |   5 ++
 src/mesa/main/state.c          |  44 +++++++++++
 src/mesa/main/state.h          |  15 ++++
 src/mesa/main/varray.c         |  85 ++++++++++++---------
 src/mesa/main/varray.h         |  13 +++-
 src/mesa/program/program.c     |   1 +
 src/mesa/vbo/vbo.h             |  28 +++++++
 src/mesa/vbo/vbo_attrib.h      |   4 +-
 src/mesa/vbo/vbo_context.c     |  17 ++++-
 src/mesa/vbo/vbo_exec.c        |  80 +++++++++++++++++++-
 src/mesa/vbo/vbo_exec.h        |  14 ----
 src/mesa/vbo/vbo_exec_api.c    |  47 +-----------
 src/mesa/vbo/vbo_exec_array.c  | 162 ++++++++++++++++++++++++-----------------
 src/mesa/vbo/vbo_exec_draw.c   | 116 ++++++++++++++++-------------
 src/mesa/vbo/vbo_private.h     |  84 ++++++++++++++-------
 src/mesa/vbo/vbo_save.c        |  37 ++--------
 src/mesa/vbo/vbo_save.h        |   4 +-
 src/mesa/vbo/vbo_save_api.c    | 132 +++++++++++++++++++++++++++++++--
 src/mesa/vbo/vbo_save_draw.c   |  63 +++-------------
 29 files changed, 735 insertions(+), 361 deletions(-)

-- 
2.14.3



More information about the mesa-dev mailing list