gallium: add CAPs to support HW atomic counters. (v3)

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

This looks like an evergreen specific feature, but with atomic counters AMD have hw specific counters they use instead of operating on buffers directly. These are separate to the buffer atomics, so require different limits and code paths.

I've left the CAP for atomic type extensible in case someone else has a variant on this sort of thing (freedreno maybe?) and needs to change it.

This adds all the CAPs required to add support for those atomic counters, along with a related CAP for limiting the number of output resources.

I'd like to land this and the st patch then I can start to upstream the evergreen support for these and other GL4.x features.

v2: drop the ATOMIC_COUNTER_MODE cap, just use the return from the HW counters. If 0 we use the current mode.
v3: fix some rebase errors (Gert Wollny)

2a06423c00 gallium: add CAPs to support HW atomic counters. (v3)
src/gallium/auxiliary/gallivm/lp_bld_limits.h | 2 ++
src/gallium/auxiliary/tgsi/tgsi_exec.h | 2 ++
src/gallium/docs/source/screen.rst | 5 ++++-
src/gallium/drivers/etnaviv/etnaviv_screen.c | 2 ++
src/gallium/drivers/freedreno/freedreno_screen.c | 2 ++
src/gallium/drivers/nouveau/nv30/nv30_screen.c | 2 ++
src/gallium/drivers/nouveau/nv50/nv50_screen.c | 2 ++
src/gallium/drivers/nouveau/nvc0/nvc0_screen.c | 2 ++
src/gallium/drivers/r300/r300_screen.c | 2 ++
src/gallium/drivers/r600/r600_pipe.c | 2 ++
src/gallium/drivers/radeonsi/si_pipe.c | 2 ++
src/gallium/drivers/svga/svga_screen.c | 4 ++++
src/gallium/drivers/vc4/vc4_screen.c | 2 ++
src/gallium/drivers/virgl/virgl_screen.c | 2 ++
src/gallium/include/pipe/p_defines.h | 2 ++
15 files changed, 34 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share