Skip to content

radv,aco: dump VGPRs from the trap handler shader

Samuel Pitoiset requested to merge hakzsam/mesa:radv_aco_dump_vgprs_trap into main

The output looks like:


Hardware registers:
        SQ_WAVE_MODE <- 448 (0x000001c0)
                        FP_ROUND = 0
                        FP_DENORM = 12 (0xc)
                        DX10_CLAMP = 1
                        IEEE = 0
                        LOD_CLAMPED = 0
                        EXCP_EN = 0
                        FP16_OVFL = 0
                        DISABLE_PERF = 0
        SQ_WAVE_STATUS <- 0x00018060
                          SCC = 0
                          SPI_PRIO = 0
                          USER_PRIO = 0
                          PRIV = 1
                          TRAP_EN = 1
                          TTRACE_EN = 0
                          EXPORT_RDY = 0
                          EXECZ = 0
                          VCCZ = 0
                          IN_TG = 0
                          IN_BARRIER = 0
                          HALT = 0
                          TRAP = 0
                          TTRACE_SIMD_EN = 1
                          VALID = 1
                          ECC_ERR = 0
                          SKIP_EXPORT = 0
                          PERF_EN = 0
                          FATAL_HALT = 0
                          MUST_EXPORT = 0
        SQ_WAVE_TRAPSTS <- 2.0f (0x40000000)
                           EXCP = 0
                           SAVECTX = 0
                           ILLEGAL_INST = 0
                           EXCP_HI = 0
                           BUFFER_OOB = 0
                           EXCP_CYCLE = 0
                           EXCP_GROUP_MASK = 0
                           EXCP_WAVE64HI = 0
                           UTC_ERROR = 0
                           DP_RATE = 2
        SQ_WAVE_HW_ID1 <- 0
                          WAVE_ID = 0
                          SIMD_ID = 0
                          WGP_ID = 0
                          SA_ID = 0
                          SE_ID = 0
        SQ_WAVE_GPR_ALLOC <- 0x0f000100
                             VGPR_BASE = 0
                             VGPR_SIZE = 1
                             SGPR_BASE = 0
                             SGPR_SIZE = 15 (0xf)
        SQ_WAVE_LDS_ALLOC <- 0
                             LDS_BASE = 0
                             LDS_SIZE = 0
                             VGPR_SHARED_SIZE = 0
        SQ_WAVE_IB_STS <- 0x18000000
                          VM_CNT = 0
                          EXP_CNT = 0
                          LGKM_CNT_BIT4 = 0
                          LGKM_CNT = 0
                          VALU_CNT = 0
                          VM_CNT_HI = 0
                          LGKM_CNT_BIT5 = 0
                          VS_CNT = 6



Shader registers:
m0: 0xc3691e4f
exec_lo: 0xffffffff
exec_hi: 0xffffffff

SGPRS:
s[0-3] = { 3f800000, f7e4f2cc, 000d1000, ffff8000 }
s[4-7] = { 3f800000, 00000000, 00000000, 00000000 }
s[8-11] = { 00040000, 00008001, 00000008, 31016fac }
s[12-15] = { f7f3fbef, efdffde9, 9bfdda36, d7be6bef }
s[16-19] = { 58341718, 008002c6, 81280e01, 80401501 }
s[20-23] = { 100206a0, 80088380, 44f04c92, c3024500 }
s[24-27] = { e000000a, 00804a20, 1100c402, 41901882 }
s[28-31] = { 8164a428, c0110273, 504e0130, 12840050 }
s[32-35] = { 4f8bbdff, 5fab9edf, 197eff9b, bf0edf7f }
s[36-39] = { 57fb97cc, d7f953a4, dfda6ffd, befb9cff }
s[40-43] = { f577bffa, c602ebff, b7dffdff, dffdf7df }
s[44-47] = { b76befbf, ebe73fba, ebe6a77f, 7f6cafd7 }
s[48-51] = { c02410a0, 25a42902, 21021108, 66510503 }
s[52-55] = { 08e1c4c2, 8460c118, 90002027, 2c42600c }
s[56-59] = { 49122056, ca812409, 1927000a, 04810742 }
s[60-63] = { 85088131, 10431540, 80401a24, 44858442 }
s[64-67] = { f5da7fe7, f7cfff7b, ddfab73f, d1f3c5b6 }
s[68-71] = { fd9bf7af, 91f79bfd, 95fdfbf7, 153e08df }
s[72-75] = { 7ced4fe5, e7c7fdbb, b3e6f6df, 7e2c35be }
s[76-79] = { ffccdf56, 3ffface6, 7ef6beef, 12ddcffc }
s[80-83] = { 038d4012, 25c18501, 02a02100, 48044900 }
s[84-87] = { 61892010, 40460480, 42060402, 080d6472 }
s[88-91] = { 28110850, 0dc07b50, 94041d9d, 88080003 }
s[92-95] = { 40e00001, 84318d6c, 60881406, 82c8702e }
s[96-99] = { eaefbe6f, f5fef3bf, b7bfebbb, fef3c67f }
s[100-103] = { e79bde7b, 2ff7fbaa, efabdbbb, fbc5de57 }
s[104-107] = { df31e7fc, f752558a, e75becd7, 9df75eff }


VGPRS:
 t00      t01      t02      t03      t04      t05      t06      t07      t08      t09      t10      t11      t12      t13      t14      t15      t16      t17      t18      t19      t20      t21      t22      t23      t24      t25      t26      t27      t28      t29      t30      t31      t32      t33      t34      t35      t36      t37      t38      t39      t40      t41      t42      t43      t44      t45      t46      t47      t48      t49      t50      t51      t52      t53      t54      t55      t56      t57      t58      t59      t60      t61      t62      t63     
    [  0] = { 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 42280000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 }
    [  1] = { 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 3f800000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 }
    [  2] = { f5af6ee7 476f8e76 04208250 1c840814 dd7efbe7 a31e0bf9 18224c10 40800102 dafbfdb5 fefe9fde 004100e1 20905125 ac6edaef bd0ffa36 57120280 20540122 f7fadffd d9767fc1 15304401 80002400 ffdefcef df94e759 204a8072 41230706 5aa27c9a b3fc3f62 000280b0 90b60402 fbdee79e bfed5bdd 040018a0 008c1181 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 }
    [  3] = { bfdb3f9f 5cbbe887 60821124 68303248 ffde5acb 056bd7d7 0000b405 0049a63c bad9febe bfcb1d7c 60000013 04ca4982 fbf9b5bf 986765f9 30c00848 7a15c8a8 74f4def8 d8b6362f 41404408 0432b002 4d7d79be fbcbd3ae a4091512 c0281002 fb6bac4e 79fdad3f 28128010 c108a625 f46e174f 8d5ff77e 07474000 700c4568 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 }
    [  4] = { 1a46063a 08504011 bff4f87f f1b3b416 0d80c830 851a2c80 f6b7de77 79de75bb 10248c28 ce080000 3ef87ab9 3e66bdf6 01008d00 f8003444 03d7cc73 6dfbceb7 30a84100 090421a2 7f61cfff b6fbac7f 00102880 42533c05 7bdc73bf e96fbf7f 638110c0 a02e5200 d7b0966e 8394b837 50011489 5060022e 75ddb97b f379debd 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 }
    [  5] = { 02000000 11c90008 5977effa ce9fe557 80205a00 02d81601 6ffa819c 7bb2fc56 80088030 0048404c 5a3bfffe eefa2b8a 05c0c041 24070043 cb577f6e e7f7ffea 40da0000 c0022300 24ea9b5d 6fbabdec 6b000d01 70966020 1af04eff f78ec55e 24423922 e6800827 bedfecff dfffe69c c0000120 09140040 aef7f7ed adbfd6a7 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 }
    [  6] = { 1020a250 82241008 bfddef6e e8edaeed 80028208 2a480500 3d7e6e0f fe7b359f 042040b2 42900047 bdf8ffbf f9aa6ed5 4450c981 c1004212 7ff7fbe5 f7ab7bde 21208100 1c022060 db12cdf7 d77cfef9 40144c80 45410e00 b38f4fef a7a3fedd 884a1020 22804210 f7bf57ff ef079fdb 9c2021e0 03904941 5b4d456e cffbf7df 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 }
    [  7] = { 20804350 01440060 fbf4fff2 afafede9 009201a6 1c010081 ef3cef74 536fef4c 10287112 000a0000 d47bddff 9f5d6bbc 80645005 8b21c448 a2eda2b6 9b366ab8 40088981 06400c71 b6f7d1e4 69b7a7ee 28006154 b01c0941 ff7bb71d e67aeef4 01145050 4cb2c084 fffdebf1 fbef9afd 22080806 1451c409 faff2f33 73d7de96 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 }


PC=0x80000007be30, trapID=1, HT=0, PC_rewind=0
Faulty shader found VA=[0x80000007be00-0x80000007be74], instr_offset=48
	s_mov_b32 s0, s3                                            ; be800303 [PC=0x80000007be00, off=0, size=4]
	s_movk_i32 s3, 0x8000                                       ; b0038000 [PC=0x80000007be04, off=4, size=4]
	s_load_dwordx4 s[8:11], s[2:3], null                        ; f4080201 fa000000 [PC=0x80000007be08, off=8, size=8]
	v_mul_f32_e64 v1, s4, s4                                    ; d5080001 00000804 [PC=0x80000007be10, off=16, size=8]
	v_rcp_f32_e32 v0, s0                                        ; 7e005400 [PC=0x80000007be18, off=24, size=4]
	v_mul_f32_e32 v0, 0x42280000, v0                            ; 100000ff 42280000 [PC=0x80000007be1c, off=28, size=8]
	s_waitcnt lgkmcnt(0)                                        ; bf8cc07f [PC=0x80000007be24, off=36, size=4]
	buffer_store_dwordx2 v[0:1], off, s[8:11], 0                ; e0740000 80020080 [PC=0x80000007be28, off=40, size=8]

!!! Faulty instruction below !!!
	s_trap 1                                                    ; bf920001 [PC=0x80000007be30, off=48, size=4]

	s_cmp_eq_i32 s5, 1                                          ; bf008105 [PC=0x80000007be34, off=52, size=4]
	s_cbranch_scc0 BB3                                          ; bf840008 [PC=0x80000007be38, off=56, size=4]
	s_mov_b64 s[0:1], 0x800004                                  ; be8004ff 00800004 [PC=0x80000007be3c, off=60, size=8]
	s_load_dword s0, s[0:1], null                               ; f4000000 fa000000 [PC=0x80000007be44, off=68, size=8]
	s_waitcnt lgkmcnt(0)                                        ; bf8cc07f [PC=0x80000007be4c, off=76, size=4]
	v_mov_b32_e32 v0, s0                                        ; 7e000200 [PC=0x80000007be50, off=80, size=4]
	buffer_store_dword v0, off, s[8:11], 0 offset:4             ; e0700004 80020080 [PC=0x80000007be54, off=84, size=8]
	s_endpgm                                                    ; bf810000 [PC=0x80000007be5c, off=92, size=4]

Tested on polaris10 and navi21.

Based on !32109 (merged)

Edited by Samuel Pitoiset

Merge request reports

Loading