rpcsx-gpu: add multiprocess support

This commit is contained in:
DH 2024-09-01 17:43:45 +03:00
parent f77376c1e3
commit 2c781626d3
14 changed files with 746 additions and 450 deletions

View file

@ -7,7 +7,14 @@ struct AuthInfo {
uint64_t unk0;
uint64_t caps[4];
uint64_t attrs[4];
uint64_t unk[8];
uint64_t ucred[8];
bool hasUseHp3dPipeCapability() const {
return ucred[2] == 0x3800000000000009;
}
bool hasMmapSelfCapability() const { return ((ucred[4] >> 0x3a) & 1) != 1; }
bool hasSystemCapability() const { return ((ucred[3] >> 0x3e) & 1) != 0; }
bool hasSceProgramAttribute() const { return ((ucred[3] >> 0x1f) & 1) != 0; }
};
static_assert(sizeof(AuthInfo) == 136);

View file

@ -51,6 +51,7 @@ struct Process final {
ProcessState state = ProcessState::NEW;
Process *parentProcess = nullptr;
shared_mutex mtx;
int vmId = -1;
void (*onSysEnter)(Thread *thread, int id, uint64_t *args,
int argsCount) = nullptr;
void (*onSysExit)(Thread *thread, int id, uint64_t *args, int argsCount,