mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-21 03:16:54 +02:00
agc: implement async command buffer jump
This commit is contained in:
@@ -3241,6 +3241,27 @@ uint32_t KYTY_SYSV_ABI AgcAcbCondExecGetSize() {
|
||||
return AgcDcbCondExecGetSize();
|
||||
}
|
||||
|
||||
uint32_t* KYTY_SYSV_ABI AgcAcbJump(CommandBuffer* buf, uint8_t cache_policy,
|
||||
const uint32_t* target, uint32_t size_in_dwords) {
|
||||
if (buf == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto* cmd = buf->AllocateDW(4);
|
||||
if (cmd == nullptr) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto target_address = reinterpret_cast<uint64_t>(target);
|
||||
cmd[0] = KYTY_PM4(4, Pm4::IT_INDIRECT_BUFFER, 0u);
|
||||
cmd[1] = static_cast<uint32_t>(target_address) & ~0x3u;
|
||||
cmd[2] = static_cast<uint32_t>(target_address >> 32u);
|
||||
cmd[3] = 0x0f900000u | ((static_cast<uint32_t>(cache_policy) & 0x3u) << 28u) |
|
||||
(size_in_dwords & 0xfffffu);
|
||||
|
||||
return cmd;
|
||||
}
|
||||
|
||||
uint32_t KYTY_SYSV_ABI AgcAcbJumpGetSize() {
|
||||
return 0x10u;
|
||||
}
|
||||
|
||||
@@ -204,6 +204,8 @@ uint32_t KYTY_SYSV_ABI AgcAcbAcquireMemGetSize();
|
||||
uint32_t* KYTY_SYSV_ABI AgcAcbCondExec(CommandBuffer* buf, const volatile uint32_t* address,
|
||||
uint32_t num_dwords);
|
||||
uint32_t KYTY_SYSV_ABI AgcAcbCondExecGetSize();
|
||||
uint32_t* KYTY_SYSV_ABI AgcAcbJump(CommandBuffer* buf, uint8_t cache_policy,
|
||||
const uint32_t* target, uint32_t size_in_dwords);
|
||||
uint32_t KYTY_SYSV_ABI AgcAcbJumpGetSize();
|
||||
uint32_t* KYTY_SYSV_ABI AgcAcbWaitRegMem(CommandBuffer* buf, uint8_t size, uint8_t compare_function,
|
||||
uint8_t cache_policy, const volatile void* address,
|
||||
|
||||
@@ -73,6 +73,7 @@ LIB_DEFINE(InitAgcDriver_1) {
|
||||
LIB_FUNC("ewobAQeMo5k", Gen5::AgcAcbAcquireMemGetSize);
|
||||
LIB_FUNC("qyM2bxYFPAk", Gen5::AgcAcbCondExec);
|
||||
LIB_FUNC("ozKzBP4aki4", Gen5::AgcAcbCondExecGetSize);
|
||||
LIB_FUNC("e1DFTg+Sd8U", Gen5::AgcAcbJump);
|
||||
LIB_FUNC("b-oySn+G2tE", Gen5::AgcAcbJumpGetSize);
|
||||
LIB_FUNC("htn36gPnBk4", Gen5::AgcAcbWaitRegMem);
|
||||
LIB_FUNC("idlaArvdXEs", Gen5::AgcAcbWaitOnAddressGetSize);
|
||||
|
||||
Reference in New Issue
Block a user