v3d: add shader-db stat to count SFU stalls
authorJose Maria Casanova Crespo <jmcasanova@igalia.com>
Tue, 2 Jul 2019 16:31:09 +0000 (18:31 +0200)
committerJose Maria Casanova Crespo <jmcasanova@igalia.com>
Mon, 22 Jul 2019 01:00:50 +0000 (03:00 +0200)
commitc341ab7ffbac822d3d3cbb3d3ae9d2a19ea3cc9a
tree70eba195aec80c8ba4d6f0f721fd957b386e933f
parentf7224014df0d366453739356b9968ca94ad43979
v3d: add shader-db stat to count SFU stalls

SFU operations have a latency of 2 cicles, so if their results
are used in the following cycle to a SFU instruction, the GPU
stalls for an extra cycle until the result is available.

This adds the number of stalls to the shader-db debug mode and
sum of instruction + stalls to evaluate optimizations to schedule
instructions that avoid generating sfu-stalls.

v2: Rename v3d_qpu_generates_sfu_stalls to v3d_qpu_instr_is_sfu (Eric)

Reviewed-by: Eric Anholt <eric@anholt.net>
src/broadcom/compiler/qpu_schedule.c
src/broadcom/compiler/v3d_compiler.h
src/broadcom/compiler/vir.c
src/broadcom/qpu/qpu_instr.c
src/broadcom/qpu/qpu_instr.h