freedreno/a6xx: Implement primitive count queries on GPU
authorKristian H. Kristensen <hoegsberg@google.com>
Thu, 5 Sep 2019 22:12:23 +0000 (15:12 -0700)
committerKristian H. Kristensen <hoegsberg@google.com>
Fri, 6 Sep 2019 16:53:28 +0000 (09:53 -0700)
commit30ab3e39fd4d9cceb8a1a7d06dc3d99b0f477a72
treeb5fa5095e8fe4828a7fa61f7b89c43b82b335225
parent1acf8d235494625e27fe0213e1a0771bba2368c3
freedreno/a6xx: Implement primitive count queries on GPU

The driver can't determine PIPE_QUERY_PRIMITIVES_GENERATED or
PIPE_QUERY_PRIMITIVES_EMITTED once we support geometry or
tessellation, since these stages add primitives at runtime.  Use the
WRITE_PRIMITIVE_COUNTS event to write back the primitive counts and
implement a hw query for this.

Reviewed-by: Rob Clark <robdclark@gmail.com>
15 files changed:
src/freedreno/registers/a6xx.xml
src/freedreno/registers/adreno_pm4.xml
src/gallium/drivers/freedreno/a2xx/fd2_query.c
src/gallium/drivers/freedreno/a5xx/fd5_query.c
src/gallium/drivers/freedreno/a6xx/fd6_query.c
src/gallium/drivers/freedreno/freedreno_batch.h
src/gallium/drivers/freedreno/freedreno_context.h
src/gallium/drivers/freedreno/freedreno_query.c
src/gallium/drivers/freedreno/freedreno_query.h
src/gallium/drivers/freedreno/freedreno_query_acc.c
src/gallium/drivers/freedreno/freedreno_query_acc.h
src/gallium/drivers/freedreno/freedreno_query_hw.c
src/gallium/drivers/freedreno/freedreno_query_hw.h
src/gallium/drivers/freedreno/freedreno_query_sw.c
src/gallium/drivers/freedreno/freedreno_query_sw.h