Move from ptrace to junction branching and make kernel multithreaded

This commit is a huge step in the direction of better performance, as we move from ptrace to junction branching and have kernel call overhead similar to that of a native kernel call! In addition, this sets the base for the kernel to go fully multi-threaded. However, the kernel is currently not thread-safe and therefore this commit currently causes a crash.
This commit is contained in:
◱ PixelyIon
2020-01-07 08:06:08 +05:30
committed by ◱ PixelyIon
parent b84859d352
commit 970dde8c27
28 changed files with 1296 additions and 822 deletions

View File

@ -24,7 +24,7 @@ namespace skyline::gpu {
void GPU::Loop() {
if (surfaceUpdate) {
if (state.jvmManager->CheckNull(Surface))
if (Surface == nullptr)
return;
window = ANativeWindow_fromSurface(state.jvmManager->GetEnv(), Surface);
ANativeWindow_acquire(window);
@ -33,7 +33,7 @@ namespace skyline::gpu {
format = ANativeWindow_getFormat(window);
surfaceUpdate = true;
} else
surfaceUpdate = state.jvmManager->CheckNull(Surface);
surfaceUpdate = (Surface == nullptr);
if (!bufferQueue.displayQueue.empty()) {
auto &buffer = bufferQueue.displayQueue.front();
bufferQueue.displayQueue.pop();