mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-12 00:59:41 +01:00
Merge pull request #10138 from unknownbrackets/headless
Headless: Fix crashes with Vulkan or no GPU
This commit is contained in:
2 files changed
+16
-2
No files matched your search
+12
-2
@@ -15,7 +15,7 @@
|
||||
// Official git repository and contact information can be found at
|
||||
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
|
||||
|
||||
|
||||
#include "GPU/Common/DrawEngineCommon.h"
|
||||
#include "GPU/Null/NullGpu.h"
|
||||
#include "GPU/GPUState.h"
|
||||
#include "GPU/ge_constants.h"
|
||||
@@ -25,7 +25,17 @@
|
||||
#include "Core/HLE/sceKernelInterrupt.h"
|
||||
#include "Core/HLE/sceGe.h"
|
||||
|
||||
NullGPU::NullGPU() : GPUCommon(nullptr, nullptr) { }
|
||||
class NullDrawEngine : public DrawEngineCommon {
|
||||
public:
|
||||
void DispatchFlush() override {
|
||||
}
|
||||
void DispatchSubmitPrim(void *verts, void *inds, GEPrimitiveType prim, int vertexCount, u32 vertType, int *bytesRead) override {
|
||||
}
|
||||
};
|
||||
|
||||
NullGPU::NullGPU() : GPUCommon(nullptr, nullptr) {
|
||||
drawEngineCommon_ = new NullDrawEngine();
|
||||
}
|
||||
NullGPU::~NullGPU() { }
|
||||
|
||||
void NullGPU::FastRunLoop(DisplayList &list) {
|
||||
|
||||
@@ -161,6 +161,8 @@ bool RunAutoTest(HeadlessHost *headlessHost, CoreParameter &coreParameter, bool
|
||||
Core_UpdateDebugStats(g_Config.bShowDebugStats || g_Config.bLogFrameDrops);
|
||||
|
||||
PSP_BeginHostFrame();
|
||||
if (coreParameter.thin3d)
|
||||
coreParameter.thin3d->BeginFrame();
|
||||
|
||||
coreState = CORE_RUNNING;
|
||||
while (coreState == CORE_RUNNING)
|
||||
@@ -185,6 +187,8 @@ bool RunAutoTest(HeadlessHost *headlessHost, CoreParameter &coreParameter, bool
|
||||
}
|
||||
}
|
||||
|
||||
if (coreParameter.thin3d)
|
||||
coreParameter.thin3d->EndFrame();
|
||||
PSP_EndHostFrame();
|
||||
|
||||
PSP_Shutdown();
|
||||
|
||||
Reference in new issue
Block a user