mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-16 05:30:07 +01:00
gpu: handle compute me 2
This commit is contained in:
parent
7e7a56f0e2
commit
5ce8d5147a
|
|
@ -172,10 +172,18 @@ void DeviceCtl::mapComputeQueue(int vmId, std::uint32_t meId,
|
|||
orbis::uint64_t readPtrAddress,
|
||||
orbis::uint64_t doorbell,
|
||||
orbis::uint64_t ringSize) {
|
||||
if (meId != 1) {
|
||||
if (meId != 1 && meId != 2) {
|
||||
rx::die("unexpected ME %d", meId);
|
||||
}
|
||||
|
||||
if (meId == 2) {
|
||||
pipeId += 4;
|
||||
}
|
||||
|
||||
if (queueId >= ComputePipe::kQueueCount) {
|
||||
rx::die("unexpected queueId %d", queueId);
|
||||
}
|
||||
|
||||
auto &pipe = mDevice->computePipes[pipeId];
|
||||
auto lock = pipe.lockQueue(queueId);
|
||||
auto memory = RemoteMemory{vmId};
|
||||
|
|
@ -201,10 +209,18 @@ void DeviceCtl::mapComputeQueue(int vmId, std::uint32_t meId,
|
|||
void DeviceCtl::submitComputeQueue(std::uint32_t meId, std::uint32_t pipeId,
|
||||
std::uint32_t queueId,
|
||||
std::uint64_t offset) {
|
||||
if (meId != 1) {
|
||||
if (meId != 1 && meId != 2) {
|
||||
rx::die("unexpected ME %d", meId);
|
||||
}
|
||||
|
||||
if (queueId >= ComputePipe::kQueueCount) {
|
||||
rx::die("unexpected queueId %d", queueId);
|
||||
}
|
||||
|
||||
if (meId == 2) {
|
||||
pipeId += 4;
|
||||
}
|
||||
|
||||
auto &pipe = mDevice->computePipes[pipeId];
|
||||
pipe.submit(queueId, offset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,15 +35,17 @@ struct Ring {
|
|||
};
|
||||
|
||||
struct ComputePipe {
|
||||
static constexpr auto kRingsPerQueue = 2;
|
||||
static constexpr auto kQueueCount = 8;
|
||||
Device *device;
|
||||
Scheduler scheduler;
|
||||
|
||||
using CommandHandler = bool (ComputePipe::*)(Ring &);
|
||||
CommandHandler commandHandlers[255];
|
||||
orbis::shared_mutex queueMtx[8];
|
||||
orbis::shared_mutex queueMtx[kQueueCount];
|
||||
int index;
|
||||
int currentQueueId;
|
||||
Ring queues[2][8];
|
||||
Ring queues[kRingsPerQueue][kQueueCount];
|
||||
std::uint64_t drawIndexIndirPatchBase = 0;
|
||||
|
||||
ComputePipe(int index);
|
||||
|
|
|
|||
Loading…
Reference in a new issue