summaryrefslogtreecommitdiffstats
path: root/src/freedreno
diff options
context:
space:
mode:
authorKristian H. Kristensen <[email protected]>2019-09-05 15:12:23 -0700
committerKristian H. Kristensen <[email protected]>2019-09-06 09:53:28 -0700
commit30ab3e39fd4d9cceb8a1a7d06dc3d99b0f477a72 (patch)
treeb5fa5095e8fe4828a7fa61f7b89c43b82b335225 /src/freedreno
parent1acf8d235494625e27fe0213e1a0771bba2368c3 (diff)
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 <[email protected]>
Diffstat (limited to 'src/freedreno')
-rw-r--r--src/freedreno/registers/a6xx.xml4
-rw-r--r--src/freedreno/registers/adreno_pm4.xml1
2 files changed, 5 insertions, 0 deletions
diff --git a/src/freedreno/registers/a6xx.xml b/src/freedreno/registers/a6xx.xml
index 6868ed5528b..13c3dcd5a01 100644
--- a/src/freedreno/registers/a6xx.xml
+++ b/src/freedreno/registers/a6xx.xml
@@ -2394,6 +2394,10 @@ to upconvert to 32b float internally?
<bitfield name="B_OFF" low="14" high="22" shr="2" type="uint"/>
<bitfield name="B_EN" pos="23" type="boolean"/>
</reg32>
+
+ <reg32 offset="0x9218" name="VPC_SO_STREAM_COUNTS_LO"/>
+ <reg32 offset="0x9219" name="VPC_SO_STREAM_COUNTS_HI"/>
+
<array offset="0x921a" name="VPC_SO" stride="7" length="4">
<reg32 offset="0" name="BUFFER_BASE_LO"/>
<reg32 offset="1" name="BUFFER_BASE_HI"/>
diff --git a/src/freedreno/registers/adreno_pm4.xml b/src/freedreno/registers/adreno_pm4.xml
index 06175d3e1ad..efadcd9a3fa 100644
--- a/src/freedreno/registers/adreno_pm4.xml
+++ b/src/freedreno/registers/adreno_pm4.xml
@@ -15,6 +15,7 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
<value name="VIZQUERY_START" value="7"/> <!-- on a2xx (??) -->
<value name="VIZQUERY_END" value="8"/>
<value name="SC_WAIT_WC" value="9"/>
+ <value name="WRITE_PRIMITIVE_COUNTS" value="9" variants="A6XX"/>
<value name="RST_PIX_CNT" value="13"/>
<value name="RST_VTX_CNT" value="14"/>
<value name="TILE_FLUSH" value="15"/>