[Mesa-dev] [PATCH 0/4] Some cleanup in state invalidation around VAOs.

Mathias.Froehlich at gmx.net Mathias.Froehlich at gmx.net
Thu May 17 06:37:17 UTC 2018


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

Hi Brian,

The patch series mostly takes care of FLUSH_VERTICES and signalling
_NEW_ARRAY changes in the context of the VAO.
The FLUSH_VERTICES macro is used to finally carry a set of pending
immediate mode draw calls to the hardware for execution. That needs to be done
before we change any state that potentially affects the way these pending draw
calls are rendered.
On the other hand there are the VAO state changes on gl_context::Array.VAO,
which do not affect the way immediate mode draws are carried out. Thus we
can basically avoid calling FLUSH_VERTICES in this corner of mesa.
The only thing we need to do is to make sure the glArrayElement's state is
invalidated when the VAO that is currently being modified is the current
gl_context::Array.VAO. Note that since direct state access the modified VAO
may be an other one than the currently bound VAO.

The change passed intels CI system as well as piglit here locally without
regressions on radeonsi and classic swrast.

please review
Thanks!

Mathias


Mathias Fröhlich (4):
  mesa: Remove FLUSH_VERTICES from VAO state changes.
  mesa: Remove flush_vertrices argument from VAO methods.
  mesa: Flag _NEW_ARRAY only if we are changing ctx->Array.VAO.
  mesa: The glArrayElement api is independent of the current program.

 src/mesa/drivers/common/meta.c           |  32 ++++-----
 src/mesa/main/api_arrayelt.c             |   2 +-
 src/mesa/main/bufferobj.c                |   2 +-
 src/mesa/main/enable.c                   |   4 +-
 src/mesa/main/varray.c                   | 119 ++++++++++---------------------
 src/mesa/main/varray.h                   |   8 +--
 src/mesa/state_tracker/st_cb_rasterpos.c |   4 +-
 src/mesa/vbo/vbo_context.c               |   4 +-
 src/mesa/vbo/vbo_exec_draw.c             |   6 +-
 src/mesa/vbo/vbo_save_api.c              |   6 +-
 10 files changed, 68 insertions(+), 119 deletions(-)

-- 
2.14.3



More information about the mesa-dev mailing list