Merge pull request #6450 from unknownbrackets/gpu-blocktransfer

Clear framebuffers/textures upon sceKernelLoadExec()
This commit is contained in:
Henrik Rydgård committed 2014-06-29 01:48:34 +02:00
commit b379109380
4 files changed
+20 -4

No files matched your search

+1 -4
View File
@@ -324,7 +324,6 @@ void __IoAsyncNotify(u64 userdata, int cyclesLate) {
u32 address = __KernelGetWaitValue(threadID, error);
if (HLEKernel::VerifyWait(threadID, WAITTYPE_ASYNCIO, f->GetUID())) {
HLEKernel::ResumeFromWait(threadID, WAITTYPE_ASYNCIO, f->GetUID(), 0);
__KernelReSchedule("async io completed");
// Someone woke up, so it's no longer got one.
f->hasAsyncResult = false;
@@ -361,9 +360,7 @@ void __IoSyncNotify(u64 userdata, int cyclesLate) {
ERROR_LOG(SCEIO, "Unable to complete IO operation on %s", f->GetName());
}
if (HLEKernel::ResumeFromWait(threadID, WAITTYPE_IO, fd, result)) {
__KernelReSchedule("io completed");
}
HLEKernel::ResumeFromWait(threadID, WAITTYPE_IO, fd, result);
}
void __IoAsyncBeginCallback(SceUID threadID, SceUID prevCallbackId) {
+16
View File
@@ -503,6 +503,18 @@ void GLES_GPU::InitClear() {
ScheduleEvent(GPU_EVENT_INIT_CLEAR);
}
void GLES_GPU::Reinitialize() {
GPUCommon::Reinitialize();
ScheduleEvent(GPU_EVENT_REINITIALIZE);
}
void GLES_GPU::ReinitializeInternal() {
textureCache_.Clear(true);
depalShaderCache_.Clear();
framebufferManager_.DestroyAllFBOs();
framebufferManager_.Resized();
}
void GLES_GPU::InitClearInternal() {
bool useNonBufferedRendering = g_Config.iRenderingMode == FB_NON_BUFFERED_MODE;
if (useNonBufferedRendering) {
@@ -689,6 +701,10 @@ void GLES_GPU::ProcessEvent(GPUEvent ev) {
PerformStencilUploadInternal(ev.fb_stencil_upload.dst, ev.fb_stencil_upload.size);
break;
case GPU_EVENT_REINITIALIZE:
ReinitializeInternal();
break;
default:
GPUCommon::ProcessEvent(ev);
}
+2
View File
@@ -36,6 +36,7 @@ public:
GLES_GPU();
~GLES_GPU();
virtual void InitClear();
virtual void Reinitialize();
virtual void PreExecuteOp(u32 op, u32 diff);
void ExecuteOpInternal(u32 op, u32 diff);
virtual void ExecuteOp(u32 op, u32 diff);
@@ -161,6 +162,7 @@ private:
void PerformMemorySetInternal(u32 dest, u8 v, int size);
void PerformStencilUploadInternal(u32 dest, int size);
void InvalidateCacheInternal(u32 addr, int size, GPUInvalidationType type);
void ReinitializeInternal();
inline void UpdateVsyncInterval(bool force);
static CommandInfo cmdInfo_[256];
+1
View File
@@ -166,6 +166,7 @@ enum GPUEventType {
GPU_EVENT_FB_MEMCPY,
GPU_EVENT_FB_MEMSET,
GPU_EVENT_FB_STENCIL_UPLOAD,
GPU_EVENT_REINITIALIZE,
};
struct GPUEvent {