DXGL r601 - Code Review

Jump to navigation Jump to search
Repository:DXGL
Revision:r600‎ | r601 | r602 >
Date:16:18, 8 March 2015
Author:admin
Status:new
Tags:
Comment:
Sync when queue gets full.
Fix depth fills.
Modified paths:
  • /ddraw/glRenderer.cpp (modified) (history)
  • /dxglcfg2 (modified) (history)

Diff [purge]

Index: dxglcfg2
Property changes on: dxglcfg2
___________________________________________________________________
Modified: svn:ignore
## -1,3 +1,4 ##
11 dxglcfg2.vcxproj.user
22 Release
33 Debug
 4+Debug no DXGL
Index: ddraw/glRenderer.cpp
@@ -128,7 +128,7 @@
129129 }
130130 if (This->queuesize - This->queue_write < size)
131131 {
132 - if (This->queue_read < size)
 132+/* if (This->queue_read < size)
133133 {
134134 if (mode == 1)
135135 {
@@ -143,7 +143,10 @@
144144 LeaveCriticalSection(&This->queuecs);
145145 glRenderer_Sync(This, size);
146146 EnterCriticalSection(&This->queuecs);
147 - }
 147+ }*/
 148+ LeaveCriticalSection(&This->queuecs);
 149+ glRenderer_Sync(This, 0);
 150+ EnterCriticalSection(&This->queuecs);
148151 }
149152 if (This->queue_write < This->queue_read)
150153 {
@@ -817,7 +820,7 @@
818821 RECT emptyrect = nullrect;
819822 if (!lpDestRect) lpDestRect = &emptyrect;
820823 glRenderer_AddQueue(This, OP_DEPTHFILL, 0, 6 + (sizeof(RECT) / 4) + (sizeof(DDBLTFX) / 4),
821 - 3, 4, dest, sizeof(RECT), lpDestRect, sizeof(DDBLTFX), lpDDBltFx);
 824+ 3, 4, &dest, sizeof(RECT), lpDestRect, sizeof(DDBLTFX), lpDDBltFx);
822825 LeaveCriticalSection(&This->commandcs);
823826 }
824827
@@ -1100,11 +1103,11 @@
11011104 glRenderer__UpdateClipper(This, (glDirectDrawSurface7*)This->queue[This->queue_read + 3]);
11021105 break;
11031106 case OP_DEPTHFILL:
1104 - if (This->queue[This->queue_read + 1] != (4 + (sizeof(RECT) / 4) + (sizeof(DDBLTFX) / 4))) break;
 1107+ if (This->queue[This->queue_read + 1] != (6 + (sizeof(RECT) / 4) + (sizeof(DDBLTFX) / 4))) break;
11051108 r1 = (RECT*)&This->queue[This->queue_read + 5];
11061109 if (!memcmp(r1, &nullrect, sizeof(RECT))) r1 = NULL;
11071110 glRenderer__DepthFill(This, r1, (glDirectDrawSurface7*)This->queue[This->queue_read + 3],
1108 - (LPDDBLTFX)&This->queue[This->queue_read + 4 + sizeof(RECT)]);
 1111+ (LPDDBLTFX)&This->queue[This->queue_read + 6 + (sizeof(RECT) / 4)]);
11091112 break;
11101113 case OP_SETRENDERSTATE:
11111114 if (This->queue[This->queue_read + 1] != 6) break;