mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-07 19:41:38 +12:00
Add thread logger, split renderer from PICA
This commit is contained in:
parent
672a893938
commit
9f792c2cf5
5 changed files with 28 additions and 25 deletions
|
@ -11,7 +11,7 @@ void Kernel::switchThread(int newThreadIndex) {
|
|||
auto& oldThread = threads[currentThreadIndex];
|
||||
auto& newThread = threads[newThreadIndex];
|
||||
newThread.status = ThreadStatus::Running;
|
||||
printf("Switching from thread %d to %d\n", currentThreadIndex, newThreadIndex);
|
||||
logThread("Switching from thread %d to %d\n", currentThreadIndex, newThreadIndex);
|
||||
|
||||
// Bail early if the new thread is actually the old thread
|
||||
if (currentThreadIndex == newThreadIndex) [[unlikely]] {
|
||||
|
@ -70,8 +70,6 @@ std::optional<int> Kernel::getNextThread() {
|
|||
if (canThreadRun(t)) {
|
||||
return index;
|
||||
}
|
||||
|
||||
// TODO: Check timeouts here
|
||||
}
|
||||
|
||||
// No thread was found
|
||||
|
|
|
@ -191,8 +191,8 @@ void GPU::drawVertices(OpenGL::Primitives primType, Vertex* vertices, u32 count)
|
|||
f24 depthOffset = f24::fromRaw(regs[PICAInternalRegs::DepthOffset] & 0xffffff);
|
||||
printf("Depth enable: %d, func: %d, writeEnable: %d\n", depthEnable, depthFunc, depthWriteEnable);
|
||||
|
||||
if (depthScale.toFloat32() != -1.0 || depthOffset.toFloat32() != 0.0)
|
||||
Helpers::panic("TODO: Implement depth scale/offset. Remove the depth *= -1.0 from vertex shader");
|
||||
//if (depthScale.toFloat32() != -1.0 || depthOffset.toFloat32() != 0.0)
|
||||
// Helpers::panic("TODO: Implement depth scale/offset. Remove the depth *= -1.0 from vertex shader");
|
||||
|
||||
// TODO: Actually use this
|
||||
float viewportWidth = f24::fromRaw(regs[PICAInternalRegs::ViewportWidth] & 0xffffff).toFloat32() * 2.0;
|
Loading…
Add table
Add a link
Reference in a new issue