summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2021-01-09 12:36:08 -0800
committerMarge Bot <eric+marge@anholt.net>2021-01-13 18:32:47 +0000
commit668943e9f75c72d0d1f04f3b3da74427661c3cb7 (patch)
treebf9164e5eae40fd03b22c74b7ae58d88393cacd7
parent3e15ba5ccc4e7b8af80ea84a44906a2ffa895490 (diff)
downloadmesa-668943e9f75c72d0d1f04f3b3da74427661c3cb7.tar.gz
freedreno/ir3: Realign disasm shader stats
To better match up with what mesa shader-db stats look like, for easier comparision. Signed-off-by: Rob Clark <robdclark@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7997>
-rw-r--r--src/freedreno/.gitlab-ci/reference/glxgears-a420.log142
-rw-r--r--src/freedreno/common/disasm.h1
-rw-r--r--src/freedreno/ir3/disasm-a3xx.c65
3 files changed, 110 insertions, 98 deletions
diff --git a/src/freedreno/.gitlab-ci/reference/glxgears-a420.log b/src/freedreno/.gitlab-ci/reference/glxgears-a420.log
index c5ef966f48e..576aa98a301 100644
--- a/src/freedreno/.gitlab-ci/reference/glxgears-a420.log
+++ b/src/freedreno/.gitlab-ci/reference/glxgears-a420.log
@@ -1047,7 +1047,7 @@ t3 opcode: CP_LOAD_STATE4 (30) (131 dwords)
- output (full): 6-13 (cnt=8, max=13) (estimated)
- shaderdb: 74 instr, 27 nops, 47 non-nops, 7 mov, 1 cov
- - shaderdb: 0 last-baryf, 0 half, 4 full, 14 constlen
+ - shaderdb: 0 last-baryf, 0 half, 4 full, 13 constlen
- shaderdb: 28 cat0, 8 cat1, 15 cat2, 22 cat3, 1 cat4, 0 cat5, 0 cat6, 0 cat7
- shaderdb: 10 sstall, 1 (ss), 0 (sy)
109ce66c: 0000: c0813000 01200000 00000000 10000002 40700000 10030002 40700001 00001004
@@ -1091,7 +1091,7 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- shaderdb: 11 instr, 5 nops, 6 non-nops, 0 mov, 0 cov
- shaderdb: 5 last-baryf, 0 half, 1 full, 0 constlen
- shaderdb: 6 cat0, 0 cat1, 1 cat2, 0 cat3, 0 cat4, 0 cat5, 4 cat6, 0 cat7
- - shaderdb: 65531 sstall, 1 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 1 (ss), 0 (sy)
109ce878: 0000: c0213000 00700000 00000000 00000000 00000000 01c00000 c7c60000 01c00002
109ce898: 0020: c7c60001 01c00004 c7c60002 01c00006 c7c60003 00002000 473090fc 00000000
109ce8b8: 0040: 03000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
@@ -1679,7 +1679,7 @@ t3 opcode: CP_LOAD_STATE4 (30) (131 dwords)
- output (full): 10-17 (cnt=8, max=17) (estimated)
- shaderdb: 67 instr, 23 nops, 44 non-nops, 4 mov, 1 cov
- - shaderdb: 0 last-baryf, 0 half, 5 full, 14 constlen
+ - shaderdb: 0 last-baryf, 0 half, 5 full, 13 constlen
- shaderdb: 24 cat0, 5 cat1, 15 cat2, 22 cat3, 1 cat4, 0 cat5, 0 cat6, 0 cat7
- shaderdb: 10 sstall, 1 (ss), 0 (sy)
109cee34: 0000: c0813000 01200000 00000000 10000002 40700000 10030002 40700001 00001004
@@ -1716,13 +1716,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): 0-3 (cnt=4, max=3)
- input (half): (cnt=0, max=0)
- input (full): 0-3 (cnt=4, max=3)
- - max const: 0
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): (cnt=0, max=0) (estimated)
- - shaderdb: 11 instructions, 5 nops, 6 non-nops, (11 instlen), 5 last-baryf, 0 half, 1 full
+
+ - shaderdb: 11 instr, 5 nops, 6 non-nops, 0 mov, 0 cov
+ - shaderdb: 5 last-baryf, 0 half, 1 full, 0 constlen
- shaderdb: 6 cat0, 0 cat1, 1 cat2, 0 cat3, 0 cat4, 0 cat5, 4 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 1 (ss), 0 (sy)
109cf040: 0000: c0213000 00700000 00000000 00000000 00000000 01c00000 c7c60000 01c00002
109cf060: 0020: c7c60001 01c00004 c7c60002 01c00006 c7c60003 00002000 473090fc 00000000
109cf080: 0040: 03000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
@@ -2108,13 +2108,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (131 dwords)
- used (full): 0-8 10-17 (cnt=17, max=17)
- input (half): (cnt=0, max=0)
- input (full): 2-8 (cnt=7, max=8)
- - max const: 52
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 10-17 (cnt=8, max=17) (estimated)
- - shaderdb: 67 instructions, 23 nops, 44 non-nops, (56 instlen), 0 last-baryf, 0 half, 5 full
+
+ - shaderdb: 67 instr, 23 nops, 44 non-nops, 4 mov, 1 cov
+ - shaderdb: 0 last-baryf, 0 half, 5 full, 13 constlen
- shaderdb: 24 cat0, 5 cat1, 15 cat2, 22 cat3, 1 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 10 sstall, 1 (ss), 0 (sy)
109cf40c: 0000: c0813000 01200000 00000000 10000002 40700000 10030002 40700001 00001004
109cf42c: 0020: 63818000 00011007 63818001 00001008 63820000 0001100b 63820001 0000100c
109cf44c: 0040: 6382800a 10010002 40700000 0001100f 6382800d 00001005 63818000 00000010
@@ -2147,13 +2147,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): 0 2-5 (cnt=5, max=5)
- input (half): (cnt=0, max=0)
- input (full): 0 (cnt=1, max=0)
- - max const: 0
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 2-5 (cnt=4, max=5) (estimated)
- - shaderdb: 9 instructions, 4 nops, 5 non-nops, (9 instlen), 3 last-baryf, 0 half, 2 full
+
+ - shaderdb: 9 instr, 4 nops, 5 non-nops, 0 mov, 0 cov
+ - shaderdb: 3 last-baryf, 0 half, 2 full, 0 constlen
- shaderdb: 5 cat0, 0 cat1, 4 cat2, 0 cat3, 0 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 0 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 0 (ss), 0 (sy)
109cf618: 0000: c0213000 00700000 00000000 00002000 47300002 00002001 47300003 00002002
109cf638: 0020: 47300004 00002003 47308005 00000000 03000000 00000000 00000000 00000000
*
@@ -2502,13 +2502,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (131 dwords)
- used (full): 0-13 (cnt=14, max=13)
- input (half): (cnt=0, max=0)
- input (full): 2-5 (cnt=4, max=5)
- - max const: 52
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 6-13 (cnt=8, max=13) (estimated)
- - shaderdb: 74 instructions, 27 nops, 47 non-nops, (61 instlen), 0 last-baryf, 0 half, 4 full
+
+ - shaderdb: 74 instr, 27 nops, 47 non-nops, 7 mov, 1 cov
+ - shaderdb: 0 last-baryf, 0 half, 4 full, 13 constlen
- shaderdb: 28 cat0, 8 cat1, 15 cat2, 22 cat3, 1 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 10 sstall, 1 (ss), 0 (sy)
109cf96c: 0000: c0813000 01200000 00000000 10000002 40700000 10030002 40700001 00001004
109cf98c: 0020: 63818000 00011007 63818001 00001008 63820000 0001100b 63820001 0000100c
109cf9ac: 0040: 63828006 10010002 40700000 0001100f 63828009 00001005 63818000 00000010
@@ -2544,13 +2544,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): 0-3 (cnt=4, max=3)
- input (half): (cnt=0, max=0)
- input (full): 0-3 (cnt=4, max=3)
- - max const: 0
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): (cnt=0, max=0) (estimated)
- - shaderdb: 11 instructions, 5 nops, 6 non-nops, (11 instlen), 5 last-baryf, 0 half, 1 full
+
+ - shaderdb: 11 instr, 5 nops, 6 non-nops, 0 mov, 0 cov
+ - shaderdb: 5 last-baryf, 0 half, 1 full, 0 constlen
- shaderdb: 6 cat0, 0 cat1, 1 cat2, 0 cat3, 0 cat4, 0 cat5, 4 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 1 (ss), 0 (sy)
109cfb78: 0000: c0213000 00700000 00000000 00000000 00000000 01c00000 c7c60000 01c00002
109cfb98: 0020: c7c60001 01c00004 c7c60002 01c00006 c7c60003 00002000 473090fc 00000000
109cfbb8: 0040: 03000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
@@ -3057,13 +3057,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (131 dwords)
- used (full): 0-8 10-17 (cnt=17, max=17)
- input (half): (cnt=0, max=0)
- input (full): 2-8 (cnt=7, max=8)
- - max const: 52
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 10-17 (cnt=8, max=17) (estimated)
- - shaderdb: 67 instructions, 23 nops, 44 non-nops, (56 instlen), 0 last-baryf, 0 half, 5 full
+
+ - shaderdb: 67 instr, 23 nops, 44 non-nops, 4 mov, 1 cov
+ - shaderdb: 0 last-baryf, 0 half, 5 full, 13 constlen
- shaderdb: 24 cat0, 5 cat1, 15 cat2, 22 cat3, 1 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 10 sstall, 1 (ss), 0 (sy)
109d00b4: 0000: c0813000 01200000 00000000 10000002 40700000 10030002 40700001 00001004
109d00d4: 0020: 63818000 00011007 63818001 00001008 63820000 0001100b 63820001 0000100c
109d00f4: 0040: 6382800a 10010002 40700000 0001100f 6382800d 00001005 63818000 00000010
@@ -3098,13 +3098,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): 0-3 (cnt=4, max=3)
- input (half): (cnt=0, max=0)
- input (full): 0-3 (cnt=4, max=3)
- - max const: 0
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): (cnt=0, max=0) (estimated)
- - shaderdb: 11 instructions, 5 nops, 6 non-nops, (11 instlen), 5 last-baryf, 0 half, 1 full
+
+ - shaderdb: 11 instr, 5 nops, 6 non-nops, 0 mov, 0 cov
+ - shaderdb: 5 last-baryf, 0 half, 1 full, 0 constlen
- shaderdb: 6 cat0, 0 cat1, 1 cat2, 0 cat3, 0 cat4, 0 cat5, 4 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 1 (ss), 0 (sy)
109d02c0: 0000: c0213000 00700000 00000000 00000000 00000000 01c00000 c7c60000 01c00002
109d02e0: 0020: c7c60001 01c00004 c7c60002 01c00006 c7c60003 00002000 473090fc 00000000
109d0300: 0040: 03000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
@@ -3490,13 +3490,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (131 dwords)
- used (full): 0-8 10-17 (cnt=17, max=17)
- input (half): (cnt=0, max=0)
- input (full): 2-8 (cnt=7, max=8)
- - max const: 52
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 10-17 (cnt=8, max=17) (estimated)
- - shaderdb: 67 instructions, 23 nops, 44 non-nops, (56 instlen), 0 last-baryf, 0 half, 5 full
+
+ - shaderdb: 67 instr, 23 nops, 44 non-nops, 4 mov, 1 cov
+ - shaderdb: 0 last-baryf, 0 half, 5 full, 13 constlen
- shaderdb: 24 cat0, 5 cat1, 15 cat2, 22 cat3, 1 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 10 sstall, 1 (ss), 0 (sy)
109d068c: 0000: c0813000 01200000 00000000 10000002 40700000 10030002 40700001 00001004
109d06ac: 0020: 63818000 00011007 63818001 00001008 63820000 0001100b 63820001 0000100c
109d06cc: 0040: 6382800a 10010002 40700000 0001100f 6382800d 00001005 63818000 00000010
@@ -3529,13 +3529,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): 0 2-5 (cnt=5, max=5)
- input (half): (cnt=0, max=0)
- input (full): 0 (cnt=1, max=0)
- - max const: 0
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 2-5 (cnt=4, max=5) (estimated)
- - shaderdb: 9 instructions, 4 nops, 5 non-nops, (9 instlen), 3 last-baryf, 0 half, 2 full
+
+ - shaderdb: 9 instr, 4 nops, 5 non-nops, 0 mov, 0 cov
+ - shaderdb: 3 last-baryf, 0 half, 2 full, 0 constlen
- shaderdb: 5 cat0, 0 cat1, 4 cat2, 0 cat3, 0 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 0 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 0 (ss), 0 (sy)
109d0898: 0000: c0213000 00700000 00000000 00002000 47300002 00002001 47300003 00002002
109d08b8: 0020: 47300004 00002003 47308005 00000000 03000000 00000000 00000000 00000000
*
@@ -3884,13 +3884,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (131 dwords)
- used (full): 0-13 (cnt=14, max=13)
- input (half): (cnt=0, max=0)
- input (full): 2-5 (cnt=4, max=5)
- - max const: 52
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 6-13 (cnt=8, max=13) (estimated)
- - shaderdb: 74 instructions, 27 nops, 47 non-nops, (61 instlen), 0 last-baryf, 0 half, 4 full
+
+ - shaderdb: 74 instr, 27 nops, 47 non-nops, 7 mov, 1 cov
+ - shaderdb: 0 last-baryf, 0 half, 4 full, 13 constlen
- shaderdb: 28 cat0, 8 cat1, 15 cat2, 22 cat3, 1 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 10 sstall, 1 (ss), 0 (sy)
109d0bec: 0000: c0813000 01200000 00000000 10000002 40700000 10030002 40700001 00001004
109d0c0c: 0020: 63818000 00011007 63818001 00001008 63820000 0001100b 63820001 0000100c
109d0c2c: 0040: 63828006 10010002 40700000 0001100f 63828009 00001005 63818000 00000010
@@ -3926,13 +3926,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): 0-3 (cnt=4, max=3)
- input (half): (cnt=0, max=0)
- input (full): 0-3 (cnt=4, max=3)
- - max const: 0
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): (cnt=0, max=0) (estimated)
- - shaderdb: 11 instructions, 5 nops, 6 non-nops, (11 instlen), 5 last-baryf, 0 half, 1 full
+
+ - shaderdb: 11 instr, 5 nops, 6 non-nops, 0 mov, 0 cov
+ - shaderdb: 5 last-baryf, 0 half, 1 full, 0 constlen
- shaderdb: 6 cat0, 0 cat1, 1 cat2, 0 cat3, 0 cat4, 0 cat5, 4 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 1 (ss), 0 (sy)
109d0df8: 0000: c0213000 00700000 00000000 00000000 00000000 01c00000 c7c60000 01c00002
109d0e18: 0020: c7c60001 01c00004 c7c60002 01c00006 c7c60003 00002000 473090fc 00000000
109d0e38: 0040: 03000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
@@ -4439,13 +4439,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (131 dwords)
- used (full): 0-8 10-17 (cnt=17, max=17)
- input (half): (cnt=0, max=0)
- input (full): 2-8 (cnt=7, max=8)
- - max const: 52
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 10-17 (cnt=8, max=17) (estimated)
- - shaderdb: 67 instructions, 23 nops, 44 non-nops, (56 instlen), 0 last-baryf, 0 half, 5 full
+
+ - shaderdb: 67 instr, 23 nops, 44 non-nops, 4 mov, 1 cov
+ - shaderdb: 0 last-baryf, 0 half, 5 full, 13 constlen
- shaderdb: 24 cat0, 5 cat1, 15 cat2, 22 cat3, 1 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 10 sstall, 1 (ss), 0 (sy)
109d1334: 0000: c0813000 01200000 00000000 10000002 40700000 10030002 40700001 00001004
109d1354: 0020: 63818000 00011007 63818001 00001008 63820000 0001100b 63820001 0000100c
109d1374: 0040: 6382800a 10010002 40700000 0001100f 6382800d 00001005 63818000 00000010
@@ -4480,13 +4480,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): 0-3 (cnt=4, max=3)
- input (half): (cnt=0, max=0)
- input (full): 0-3 (cnt=4, max=3)
- - max const: 0
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): (cnt=0, max=0) (estimated)
- - shaderdb: 11 instructions, 5 nops, 6 non-nops, (11 instlen), 5 last-baryf, 0 half, 1 full
+
+ - shaderdb: 11 instr, 5 nops, 6 non-nops, 0 mov, 0 cov
+ - shaderdb: 5 last-baryf, 0 half, 1 full, 0 constlen
- shaderdb: 6 cat0, 0 cat1, 1 cat2, 0 cat3, 0 cat4, 0 cat5, 4 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 1 (ss), 0 (sy)
109d1540: 0000: c0213000 00700000 00000000 00000000 00000000 01c00000 c7c60000 01c00002
109d1560: 0020: c7c60001 01c00004 c7c60002 01c00006 c7c60003 00002000 473090fc 00000000
109d1580: 0040: 03000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
@@ -4872,13 +4872,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (131 dwords)
- used (full): 0-8 10-17 (cnt=17, max=17)
- input (half): (cnt=0, max=0)
- input (full): 2-8 (cnt=7, max=8)
- - max const: 52
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 10-17 (cnt=8, max=17) (estimated)
- - shaderdb: 67 instructions, 23 nops, 44 non-nops, (56 instlen), 0 last-baryf, 0 half, 5 full
+
+ - shaderdb: 67 instr, 23 nops, 44 non-nops, 4 mov, 1 cov
+ - shaderdb: 0 last-baryf, 0 half, 5 full, 13 constlen
- shaderdb: 24 cat0, 5 cat1, 15 cat2, 22 cat3, 1 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 1 (ss), 0 (sy)
+ - shaderdb: 10 sstall, 1 (ss), 0 (sy)
109d190c: 0000: c0813000 01200000 00000000 10000002 40700000 10030002 40700001 00001004
109d192c: 0020: 63818000 00011007 63818001 00001008 63820000 0001100b 63820001 0000100c
109d194c: 0040: 6382800a 10010002 40700000 0001100f 6382800d 00001005 63818000 00000010
@@ -4911,13 +4911,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): 0 2-5 (cnt=5, max=5)
- input (half): (cnt=0, max=0)
- input (full): 0 (cnt=1, max=0)
- - max const: 0
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 2-5 (cnt=4, max=5) (estimated)
- - shaderdb: 9 instructions, 4 nops, 5 non-nops, (9 instlen), 3 last-baryf, 0 half, 2 full
+
+ - shaderdb: 9 instr, 4 nops, 5 non-nops, 0 mov, 0 cov
+ - shaderdb: 3 last-baryf, 0 half, 2 full, 0 constlen
- shaderdb: 5 cat0, 0 cat1, 4 cat2, 0 cat3, 0 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 0 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 0 (ss), 0 (sy)
109d1b18: 0000: c0213000 00700000 00000000 00002000 47300002 00002001 47300003 00002002
109d1b38: 0020: 47300004 00002003 47308005 00000000 03000000 00000000 00000000 00000000
*
@@ -5216,13 +5216,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): (cnt=0, max=0)
- input (half): (cnt=0, max=0)
- input (full): (cnt=0, max=0)
- - max const: 0
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): (cnt=0, max=0) (estimated)
- - shaderdb: 5 instructions, 4 nops, 1 non-nops, (5 instlen), 0 last-baryf, 0 half, 0 full
+
+ - shaderdb: 5 instr, 4 nops, 1 non-nops, 0 mov, 0 cov
+ - shaderdb: 0 last-baryf, 0 half, 0 full, 0 constlen
- shaderdb: 5 cat0, 0 cat1, 0 cat2, 0 cat3, 0 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 0 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 0 (ss), 0 (sy)
108ce4b0: 0000: c0213000 00600000 00000000 00000000 03000000 00000000 00000000 00000000
*
t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
@@ -5242,13 +5242,13 @@ t3 opcode: CP_LOAD_STATE4 (30) (35 dwords)
- used (full): 0-3 (cnt=4, max=3)
- input (half): (cnt=0, max=0)
- input (full): (cnt=0, max=0)
- - max const: 3
-
- output (half): (cnt=0, max=0) (estimated)
- output (full): 0-3 (cnt=4, max=3) (estimated)
- - shaderdb: 9 instructions, 4 nops, 5 non-nops, (9 instlen), 0 last-baryf, 0 half, 1 full
+
+ - shaderdb: 9 instr, 4 nops, 5 non-nops, 4 mov, 0 cov
+ - shaderdb: 0 last-baryf, 0 half, 1 full, 1 constlen
- shaderdb: 5 cat0, 4 cat1, 0 cat2, 0 cat3, 0 cat4, 0 cat5, 0 cat6, 0 cat7
- - shaderdb: 0 (ss), 0 (sy)
+ - shaderdb: 0 sstall, 0 (ss), 0 (sy)
108ce53c: 0000: c0213000 00700000 00000000 00000000 20244000 00000001 20244001 00000002
108ce55c: 0020: 20244002 00000003 20244003 00000000 03000000 00000000 00000000 00000000
*
diff --git a/src/freedreno/common/disasm.h b/src/freedreno/common/disasm.h
index 00b6e7979be..82f2135fbe9 100644
--- a/src/freedreno/common/disasm.h
+++ b/src/freedreno/common/disasm.h
@@ -44,6 +44,7 @@ struct shader_stats {
int nops;
int ss, sy;
int constlen;
+ uint16_t sstall;
uint16_t mov_count;
uint16_t cov_count;
uint16_t last_baryf;
diff --git a/src/freedreno/ir3/disasm-a3xx.c b/src/freedreno/ir3/disasm-a3xx.c
index 64e5f78e6a2..184e814fb4c 100644
--- a/src/freedreno/ir3/disasm-a3xx.c
+++ b/src/freedreno/ir3/disasm-a3xx.c
@@ -91,12 +91,13 @@ struct disasm_ctx {
/* current instruction repeat indx/offset (for --expand): */
unsigned repeatidx;
+ int sfu_delay;
+
/* tracking for register usage */
struct {
regmask_t used;
regmask_t rbw; /* read before write */
regmask_t war; /* write after read */
- unsigned max_const;
} regs;
};
@@ -260,14 +261,13 @@ static void print_reg_stats(struct disasm_ctx *ctx)
fprintf(ctx->out, "%s- input (full):", levels[ctx->level]);
print_regs(ctx, &ctx->regs.rbw, true);
fprintf(ctx->out, "\n");
- fprintf(ctx->out, "%s- max const: %u\n", levels[ctx->level], ctx->regs.max_const);
- fprintf(ctx->out, "\n");
fprintf(ctx->out, "%s- output (half):", levels[ctx->level]);
print_regs(ctx, &ctx->regs.war, false);
fprintf(ctx->out, " (estimated)\n");
fprintf(ctx->out, "%s- output (full):", levels[ctx->level]);
print_regs(ctx, &ctx->regs.war, true);
fprintf(ctx->out, " (estimated)\n");
+ fprintf(ctx->out, "\n");
/* convert to vec4, which is the granularity that registers are
* assigned to shader:
@@ -275,15 +275,21 @@ static void print_reg_stats(struct disasm_ctx *ctx)
fullreg = (fullreg + 3) / 4;
halfreg = ctx->regs.used.mergedregs ? 0 : (halfreg + 3) / 4;
- // Note this count of instructions includes rptN, which matches
- // up to how mesa prints this:
- fprintf(ctx->out, "%s- shaderdb: %d instructions, %d nops, %d non-nops, "
- "(%d instlen), %u last-baryf, %d half, %d full\n",
- levels[ctx->level], ctx->stats->instructions, ctx->stats->nops,
- ctx->stats->instructions - ctx->stats->nops, ctx->stats->instlen,
- ctx->stats->last_baryf, halfreg, fullreg);
- fprintf(ctx->out, "%s- shaderdb: %u cat0, %u cat1, %u cat2, %u cat3, "
- "%u cat4, %u cat5, %u cat6, %u cat7\n",
+ fprintf(ctx->out, "%s- shaderdb: %u instr, %u nops, %u non-nops, %u mov, %u cov\n",
+ levels[ctx->level],
+ ctx->stats->instructions,
+ ctx->stats->nops,
+ ctx->stats->instructions - ctx->stats->nops,
+ ctx->stats->mov_count, ctx->stats->cov_count);
+
+ fprintf(ctx->out, "%s- shaderdb: %u last-baryf, %d half, %d full, %u constlen\n",
+ levels[ctx->level],
+ ctx->stats->last_baryf,
+ halfreg,
+ fullreg,
+ ctx->stats->constlen);
+
+ fprintf(ctx->out, "%s- shaderdb: %u cat0, %u cat1, %u cat2, %u cat3, %u cat4, %u cat5, %u cat6, %u cat7\n",
levels[ctx->level],
ctx->stats->instrs_per_cat[0],
ctx->stats->instrs_per_cat[1],
@@ -293,8 +299,12 @@ static void print_reg_stats(struct disasm_ctx *ctx)
ctx->stats->instrs_per_cat[5],
ctx->stats->instrs_per_cat[6],
ctx->stats->instrs_per_cat[7]);
- fprintf(ctx->out, "%s- shaderdb: %d (ss), %d (sy)\n", levels[ctx->level],
- ctx->stats->ss, ctx->stats->sy);
+
+ fprintf(ctx->out, "%s- shaderdb: %u sstall, %u (ss), %u (sy)\n",
+ levels[ctx->level],
+ ctx->stats->sstall,
+ ctx->stats->ss,
+ ctx->stats->sy);
}
static void process_reg_dst(struct disasm_ctx *ctx)
@@ -364,19 +374,11 @@ static void print_src(struct disasm_ctx *ctx, struct reginfo *info)
break;
}
} else if (info->c) {
- int i, num = regidx(reg);
- for (i = 0; i <= ctx->repeat; i++) {
- unsigned src = num + i;
-
- ctx->regs.max_const = MAX2(ctx->regs.max_const, src);
-
- if (!info->r)
- break;
- }
-
- unsigned max = (num + ctx->repeat + 1 + 3) / 4;
- if (max > ctx->stats->constlen)
- ctx->stats->constlen = max;
+ unsigned num = regidx(reg);
+ if (info->r)
+ num += ctx->repeat;
+ num = DIV_ROUND_UP(num, 4);
+ ctx->stats->constlen = MAX2(ctx->stats->constlen, num);
}
if (info->r)
@@ -1639,6 +1641,8 @@ static bool print_instr(struct disasm_ctx *ctx, uint32_t *dwords, int n)
if (instr->ss && ((instr->opc_cat <= 4) || (instr->opc_cat == 7))) {
fprintf(ctx->out, "(ss)");
ctx->stats->ss++;
+ ctx->stats->sstall += ctx->sfu_delay;
+ ctx->sfu_delay = 0;
}
if (instr->jmp_tgt)
fprintf(ctx->out, "(jp)");
@@ -1660,6 +1664,13 @@ static bool print_instr(struct disasm_ctx *ctx, uint32_t *dwords, int n)
if (instr->ul && ((2 <= instr->opc_cat) && (instr->opc_cat <= 4)))
fprintf(ctx->out, "(ul)");
+ if (instr->opc_cat == 4) {
+ ctx->sfu_delay = 10;
+ } else {
+ int n = MIN2(ctx->sfu_delay, 1 + ctx->repeat + nop);
+ ctx->sfu_delay -= n;
+ }
+
ctx->stats->instructions += nop;
ctx->stats->nops += nop;
if (opc == OPC_NOP) {