mirror of
https://github.com/izzy2lost/ppsspp.git
synced 2026-03-10 12:43:04 -07:00
Add support for multithreading in softgpu.
This commit is contained in:
@@ -212,6 +212,11 @@ void CopyToCurrentFboFromRam(u8* data, int srcwidth, int srcheight, int dstwidth
|
||||
}
|
||||
|
||||
void SoftGPU::CopyDisplayToOutput()
|
||||
{
|
||||
ScheduleEvent(GPU_EVENT_COPY_DISPLAY_TO_OUTPUT);
|
||||
}
|
||||
|
||||
void SoftGPU::CopyDisplayToOutputInternal()
|
||||
{
|
||||
// TODO: How to get the correct dimensions?
|
||||
CopyToCurrentFboFromRam(fb, gstate.fbwidth & 0x3C0, FB_HEIGHT, PSP_CoreParameter().renderWidth, PSP_CoreParameter().renderHeight);
|
||||
@@ -227,6 +232,17 @@ u32 SoftGPU::DrawSync(int mode)
|
||||
return GPUCommon::DrawSync(mode);
|
||||
}
|
||||
|
||||
void SoftGPU::ProcessEvent(GPUEvent ev) {
|
||||
switch (ev.type) {
|
||||
case GPU_EVENT_COPY_DISPLAY_TO_OUTPUT:
|
||||
CopyDisplayToOutputInternal();
|
||||
break;
|
||||
|
||||
default:
|
||||
GPUCommon::ProcessEvent(ev);
|
||||
}
|
||||
}
|
||||
|
||||
void SoftGPU::FastRunLoop(DisplayList &list) {
|
||||
for (; downcount > 0; --downcount) {
|
||||
u32 op = Memory::ReadUnchecked_U32(list.pc);
|
||||
|
||||
@@ -49,4 +49,8 @@ public:
|
||||
|
||||
protected:
|
||||
virtual void FastRunLoop(DisplayList &list);
|
||||
virtual void ProcessEvent(GPUEvent ev);
|
||||
|
||||
private:
|
||||
void CopyDisplayToOutputInternal();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user