summaryrefslogtreecommitdiff
path: root/pcr/reicast-git/wait_if_two_frames_already_in_flight.patch
blob: 56e7741383a161d950e3405ab4041bff034b7082 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
diff -Nur a/core/hw/pvr/Renderer_if.cpp b/core/hw/pvr/Renderer_if.cpp
--- a/core/hw/pvr/Renderer_if.cpp	2015-08-23 00:16:33.916598479 -0300
+++ b/core/hw/pvr/Renderer_if.cpp	2015-08-23 02:25:28.932602664 -0300
@@ -187,6 +187,7 @@
 
 bool rend_frame(TA_context* ctx, bool draw_osd) {
 	bool proc = renderer->Process(ctx);
+	FinishRender(_pvrrc);
 #if !defined(TARGET_NO_THREADS)
 	re.Set();
 #endif
@@ -213,7 +214,7 @@
 	bool do_swp = rend_frame(_pvrrc, true);
 
 	//clear up & free data ..
-	FinishRender(_pvrrc);
+	tactx_Recycle(_pvrrc);
 	_pvrrc=0;
 
 	return do_swp;
@@ -267,6 +268,7 @@
 #endif
 
 bool pend_rend = false;
+extern TA_context* rqueue;
 
 void rend_resize(int width, int height) {
 	renderer->Resize(width, height);
@@ -275,6 +277,10 @@
 
 void rend_start_render()
 {
+	if (rqueue) {
+		rend_end_render();
+	}
+
 	pend_rend = false;
 	bool is_rtt=(FB_W_SOF1& 0x1000000)!=0;
 	TA_context* ctx = tactx_Pop(CORE_CURRENT_CTX);
diff -Nur a/core/hw/pvr/ta_ctx.cpp b/core/hw/pvr/ta_ctx.cpp
--- a/core/hw/pvr/ta_ctx.cpp	2015-08-23 00:16:33.917598487 -0300
+++ b/core/hw/pvr/ta_ctx.cpp	2015-08-23 02:26:47.189293717 -0300
@@ -127,8 +127,6 @@
 	mtx_rqueue.Lock();
 	rqueue = 0;
 	mtx_rqueue.Unlock();
-
-	tactx_Recycle(ctx);
 }
 
 cMutex mtx_pool;