Add gfx11 blit/trap shaders

David Yat Sin:
   Rebased to amd-staging branch
   Changed MSG_GET_DOORBELL to MSG_RTN_GET_DOORBELL

Change-Id: I6015e54c4d8897f4c796f58c7fbc298758c6d76d
This commit is contained in:
Jay Cornwall
2021-10-19 15:31:32 -05:00
committed by David Yat Sin
parent 9d2fe1ac2a
commit 710adcc252
5 changed files with 75 additions and 3 deletions
@@ -46,8 +46,8 @@ cmake_minimum_required ( VERSION 3.7 )
find_package(Clang REQUIRED HINTS ${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm )
find_package(LLVM REQUIRED HINTS ${CMAKE_PREFIX_PATH}/llvm PATHS /opt/rocm/llvm )
set (TARGET_DEVS "gfx900;gfx1010;gfx1030")
set (POSTFIX "9;1010;10")
set (TARGET_DEVS "gfx900;gfx1010;gfx1030;gfx1100")
set (POSTFIX "9;1010;10;11")
if(${CMAKE_VERBOSE_MAKEFILE})
get_property(clang_path TARGET clang PROPERTY LOCATION)
@@ -99,7 +99,7 @@
// ttmp1 = 0[0], PCRewind[5:0], HostTrap[0], TrapId[7:0], PC[47:32]
// gfx1010:
// ttmp11 = SQ_WAVE_IB_STS[25], SQ_WAVE_IB_STS[21:15], DebugEnabled[0], 0[15:0], NoScratch[0], WaveIdInWG[5:0]
// gfx1030:
// gfx1030/gfx1100:
// ttmp11 = 0[7:0], DebugEnabled[0], 0[15:0], NoScratch[0], WaveIdInWG[5:0]
trap_entry:
@@ -136,12 +136,17 @@ trap_entry:
// Fetch doorbell id for our queue.
s_mov_b32 ttmp2, exec_lo
s_mov_b32 ttmp3, exec_hi
.if .amdgcn.gfx_generation_number < 11
s_mov_b32 exec_lo, 0x80000000
s_sendmsg sendmsg(MSG_GET_DOORBELL)
.wait_sendmsg:
s_nop 0x7
s_bitcmp0_b32 exec_lo, 0x1F
s_cbranch_scc0 .wait_sendmsg
.else
s_sendmsg_rtn_b32 exec_lo, sendmsg(MSG_RTN_GET_DOORBELL)
s_waitcnt lgkmcnt(0)
.endif
s_mov_b32 exec_hi, ttmp3
// Restore exec_lo, move the doorbell_id into ttmp3