Skip to content

Commit

Permalink
gpu: compute: stub acquire mem
Browse files Browse the repository at this point in the history
bugfixes
  • Loading branch information
DHrpcs3 committed Oct 15, 2024
1 parent 7a7f317 commit 524e973
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
19 changes: 12 additions & 7 deletions rpcsx/gpu/Pipe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ ComputePipe::ComputePipe(int index)
commandHandlers[gnm::IT_WAIT_REG_MEM] = &ComputePipe::waitRegMem;
commandHandlers[gnm::IT_WRITE_DATA] = &ComputePipe::writeData;
commandHandlers[gnm::IT_INDIRECT_BUFFER] = &ComputePipe::indirectBuffer;
commandHandlers[gnm::IT_ACQUIRE_MEM] = &ComputePipe::acquireMem;
}

bool ComputePipe::processAllRings() {
Expand Down Expand Up @@ -169,6 +170,8 @@ bool ComputePipe::processRing(Ring &ring) {
if (ring.rptrReportLocation != nullptr) {
*ring.rptrReportLocation = ring.rptr - ring.base;
}

break;
}

return true;
Expand Down Expand Up @@ -197,8 +200,8 @@ void ComputePipe::mapQueue(int queueId, Ring ring,
waitForIdle(queueId, lock);
}

std::println("mapQueue: {}, {}, {}", (void *)ring.base, (void *)ring.wptr,
ring.size);
std::println("mapQueue: {}, {}, {}, {}", (void *)ring.base, (void *)ring.wptr,
ring.size, (void *)ring.doorbell);

queues[1 - ring.indirectLevel][queueId] = ring;
}
Expand Down Expand Up @@ -414,15 +417,17 @@ bool ComputePipe::indirectBuffer(Ring &ring) {
auto ibSize = ring.rptr[3] & ((1 << 20) - 1);
auto address = addressLo | (static_cast<std::uint64_t>(addressHi) << 32);

if (ring.indirectLevel != 0) {
vmId = ring.vmId;
}
vmId = ring.vmId;

auto rptr = RemoteMemory{vmId}.getPointer<std::uint32_t>(address);
setIndirectRing(currentQueueId, ring.indirectLevel + 1,
Ring::createFromRange(vmId, rptr, ibSize));
auto indirectRing = Ring::createFromRange(vmId, rptr, ibSize);
indirectRing.doorbell = ring.doorbell;
setIndirectRing(currentQueueId, ring.indirectLevel + 1, indirectRing);
return true;
}

bool ComputePipe::acquireMem(Ring &ring) { return true; }

bool ComputePipe::unknownPacket(Ring &ring) {
auto op = rx::getBits(ring.rptr[0], 15, 8);

Expand Down
1 change: 1 addition & 0 deletions rpcsx/gpu/Pipe.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ struct ComputePipe {
bool waitRegMem(Ring &ring);
bool writeData(Ring &ring);
bool indirectBuffer(Ring &ring);
bool acquireMem(Ring &ring);
bool unknownPacket(Ring &ring);
bool handleNop(Ring &ring);

Expand Down

0 comments on commit 524e973

Please sign in to comment.