r600: add support for hw atomic counters. (v3)

Graphics / Mesa 3D Graphics Library / Mesa - Dave Airlie [redhat.com] - 9 November 2017 22:39 EST

This adds support for the evergreen/cayman atomic counters.

These are implemented using GDS append/consume counters. The values for each counter are loaded before drawing and saved after each draw using special CP packets.

v2: move hw atomic assignment into driver.
v3: fix messing up caps (Gert Wollny), only store ranges in driver, drop buffers.

06993e4ee3 r600: add support for hw atomic counters. (v3)
src/gallium/drivers/r600/evergreen_state.c | 159 ++++++++++++++++++
src/gallium/drivers/r600/r600_pipe.c | 15 ++
src/gallium/drivers/r600/r600_pipe.h | 22 +++
src/gallium/drivers/r600/r600_shader.c | 239 ++++++++++++++++++++++++---
src/gallium/drivers/r600/r600_shader.h | 19 +++
src/gallium/drivers/r600/r600_state_common.c | 46 ++++++
src/gallium/drivers/r600/r600d_common.h | 2 +
7 files changed, 480 insertions(+), 22 deletions(-)

Upstream: cgit.freedesktop.org


  • Share