[Mesa-dev] [PATCH 0/8] Proper implementation of glInvalidateBuffer(Sub)Data

Nicolai Hähnle nhaehnle at gmail.com
Tue Jan 12 08:06:22 PST 2016


Hi,

Mesa's current implementation of glInvalidateBuffer(Sub)Data is a no-op. This
is allowed by the spec, but it's not what applications expect. For example,
the game Planet Explorers uses streaming VBOs and relies on
glInvalidateBufferData for performance. In a user-provided apitrace of the
game, the framerate is roughly tripled by this series. Please review!

Thanks,
Nicolai
--
 src/gallium/docs/source/screen.rst           |  2 +
 .../drivers/freedreno/freedreno_screen.c     |  1 +
 src/gallium/drivers/i915/i915_screen.c       |  1 +
 src/gallium/drivers/ilo/ilo_screen.c         |  1 +
 src/gallium/drivers/llvmpipe/lp_screen.c     |  1 +
 .../drivers/nouveau/nv30/nv30_screen.c       |  1 +
 .../drivers/nouveau/nv50/nv50_screen.c       |  1 +
 .../drivers/nouveau/nvc0/nvc0_screen.c       |  1 +
 src/gallium/drivers/r300/r300_screen.c       |  1 +
 src/gallium/drivers/r600/r600_pipe.c         |  1 +
 .../drivers/radeon/r600_buffer_common.c      | 39 +++++++++--
 .../drivers/radeon/r600_pipe_common.c        |  1 +
 .../drivers/radeon/r600_pipe_common.h        |  3 +
 src/gallium/drivers/radeon/radeon_winsys.h   |  8 +++
 src/gallium/drivers/radeonsi/si_pipe.c       |  1 +
 src/gallium/drivers/softpipe/sp_screen.c     |  1 +
 src/gallium/drivers/svga/svga_screen.c       |  1 +
 src/gallium/drivers/vc4/vc4_screen.c         |  1 +
 src/gallium/drivers/virgl/virgl_screen.c     |  1 +
 src/gallium/include/pipe/p_context.h         |  8 ++-
 src/gallium/include/pipe/p_defines.h         |  1 +
 src/gallium/winsys/amdgpu/drm/amdgpu_bo.c    |  6 ++
 .../winsys/radeon/drm/radeon_drm_bo.c        |  6 ++
 src/mesa/main/bufferobj.c                    | 30 +++++----
 src/mesa/main/dd.h                           |  5 ++
 src/mesa/state_tracker/st_cb_bufferobjects.c | 62 ++++++++++++++----
 src/mesa/state_tracker/st_cb_bufferobjects.h |  3 +-
 src/mesa/state_tracker/st_context.c          |  2 +-
 28 files changed, 155 insertions(+), 35 deletions(-)



More information about the mesa-dev mailing list