Index: ddraw/ddraw.vcxproj |
— | — | @@ -191,7 +191,7 @@ |
192 | 192 | <SubSystem>Windows</SubSystem>
|
193 | 193 | <GenerateDebugInformation>true</GenerateDebugInformation>
|
194 | 194 | <ModuleDefinitionFile>ddraw.def</ModuleDefinitionFile>
|
195 | | - <AdditionalDependencies>$(OutDir)libMinHook.x86.lib;$(OutDir)cfgmgr.lib;glu32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
| 195 | + <AdditionalDependencies>$(OutDir)..\Debug\libMinHook.x86.lib;$(OutDir)cfgmgr.lib;glu32.lib;opengl32.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
196 | 196 | <ImportLibrary>$(OutDir)ddraw.lib</ImportLibrary>
|
197 | 197 | </Link>
|
198 | 198 | <PostBuildEvent />
|
Index: ddraw/glDirectDrawSurface.cpp |
— | — | @@ -401,6 +401,7 @@ |
402 | 402 | glDirectDrawSurface7::~glDirectDrawSurface7()
|
403 | 403 | {
|
404 | 404 | TRACE_ENTER(1,14,this);
|
| 405 | + glRenderer_Sync(ddInterface->renderer, 0);
|
405 | 406 | AddRef();
|
406 | 407 | if (dds1) delete dds1;
|
407 | 408 | if (dds2) delete dds2;
|
Index: ddraw/glRenderer.cpp |
— | — | @@ -816,7 +816,7 @@ |
817 | 817 | EnterCriticalSection(&This->commandcs);
|
818 | 818 | RECT emptyrect = nullrect;
|
819 | 819 | if (!lpDestRect) lpDestRect = &emptyrect;
|
820 | | - glRenderer_AddQueue(This, OP_DEPTHFILL, 0, 4 + (sizeof(RECT) / 4) + (sizeof(DDBLTFX) / 4),
|
| 820 | + glRenderer_AddQueue(This, OP_DEPTHFILL, 0, 6 + (sizeof(RECT) / 4) + (sizeof(DDBLTFX) / 4),
|
821 | 821 | 3, 4, dest, sizeof(RECT), lpDestRect, sizeof(DDBLTFX), lpDDBltFx);
|
822 | 822 | LeaveCriticalSection(&This->commandcs);
|
823 | 823 | }
|
Index: dxgltest/Tests2D.cpp |
— | — | @@ -39,7 +39,8 @@ |
40 | 40 | static HWND hWnd;
|
41 | 41 | static int testnum;
|
42 | 42 | static unsigned int randnum;
|
43 | | -static int testtypes[] = {0,1,0,1,0,1,2};
|
| 43 | +static int testtypes[] = {0,1,0,1,0,1,2,2,2,1};
|
| 44 | +static DWORD counter;
|
44 | 45 |
|
45 | 46 | static DDSPRITE sprites[16];
|
46 | 47 |
|
— | — | @@ -678,6 +679,17 @@ |
679 | 680 | ddinterface->CreateSurface(&sprites[0].ddsd, &sprites[0].surface, NULL);
|
680 | 681 | DrawRotatedBlt(ddsrender, sprites);
|
681 | 682 | break;
|
| 683 | + case 9:
|
| 684 | + ddsrender->GetSurfaceDesc(&ddsd);
|
| 685 | + sprites[0].ddsd.dwFlags = DDSD_CAPS | DDSD_HEIGHT | DDSD_WIDTH;
|
| 686 | + sprites[0].ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN;
|
| 687 | + if (ddver > 3) sprites[0].ddsd.dwSize = sizeof(DDSURFACEDESC2);
|
| 688 | + else sprites[0].ddsd.dwSize = sizeof(DDSURFACEDESC);
|
| 689 | + sprites[0].ddsd.dwWidth = sprites[0].ddsd.dwHeight =
|
| 690 | + sprites[0].rect.right = sprites[0].rect.bottom = 255;
|
| 691 | + ddinterface->CreateSurface(&sprites[0].ddsd, &sprites[0].surface, NULL);
|
| 692 | + counter = 0;
|
| 693 | + break;
|
682 | 694 | }
|
683 | 695 | }
|
684 | 696 |
|
— | — | @@ -737,6 +749,7 @@ |
738 | 750 | error = ddsrender->GetSurfaceDesc(&ddsd);
|
739 | 751 | MultiDirectDrawSurface *temp1 = NULL;
|
740 | 752 | DDSCAPS2 ddscaps;
|
| 753 | + DWORD bitmask;
|
741 | 754 | ZeroMemory(&ddscaps,sizeof(DDSCAPS2));
|
742 | 755 | ddscaps.dwCaps = DDSCAPS_BACKBUFFER;
|
743 | 756 | int op;
|
— | — | @@ -852,6 +865,52 @@ |
853 | 866 | if(ddsurface && ddsrender)error = ddsurface->Blt(&destrect,ddsrender,&srcrect,DDBLT_WAIT,NULL);
|
854 | 867 | }
|
855 | 868 | break;
|
| 869 | + case 9:
|
| 870 | + bltfx.dwSize = sizeof(DDBLTFX);
|
| 871 | + switch (bpp)
|
| 872 | + {
|
| 873 | + case 8:
|
| 874 | + bitmask = 0xFF;
|
| 875 | + break;
|
| 876 | + case 15:
|
| 877 | + bitmask = 0x7FFF;
|
| 878 | + break;
|
| 879 | + case 16:
|
| 880 | + bitmask = 0xFFFF;
|
| 881 | + break;
|
| 882 | + case 24:
|
| 883 | + bitmask = 0xFFFFFF;
|
| 884 | + break;
|
| 885 | + case 32:
|
| 886 | + default:
|
| 887 | + bitmask = 0xFFFFFFFF;
|
| 888 | + break;
|
| 889 | + }
|
| 890 | + for (int y = 0; y < 255; y++)
|
| 891 | + {
|
| 892 | + for (int x = 0; x < 255; x++)
|
| 893 | + {
|
| 894 | + bltfx.dwFillColor = counter & bitmask;
|
| 895 | + destrect.left = x;
|
| 896 | + destrect.right = x + 1;
|
| 897 | + destrect.top = y;
|
| 898 | + destrect.bottom = y + 1;
|
| 899 | + counter++;
|
| 900 | + sprites[0].surface->Blt(&destrect, NULL, NULL, DDBLT_COLORFILL, &bltfx);
|
| 901 | + }
|
| 902 | + }
|
| 903 | + ddsrender->Blt(NULL, sprites[0].surface, NULL, DDBLT_WAIT, NULL);
|
| 904 | + if (!fullscreen)
|
| 905 | + {
|
| 906 | + p.x = 0;
|
| 907 | + p.y = 0;
|
| 908 | + ClientToScreen(hWnd, &p);
|
| 909 | + GetClientRect(hWnd, &destrect);
|
| 910 | + OffsetRect(&destrect, p.x, p.y);
|
| 911 | + SetRect(&srcrect, 0, 0, width, height);
|
| 912 | + if (ddsurface && ddsrender)error = ddsurface->Blt(&destrect, ddsrender, &srcrect, DDBLT_WAIT, NULL);
|
| 913 | + }
|
| 914 | + break;
|
856 | 915 | }
|
857 | 916 | if(temp1) temp1->Release();
|
858 | 917 | }
|
Index: dxgltest/dxgltest.cpp |
— | — | @@ -227,7 +227,8 @@ |
228 | 228 | {1, 7, 0, 0, false, 0.0, false, false, _T("Random color fill Blt() paterns")},
|
229 | 229 | {1, 7, 0, 0, false, 0.0, false, false, _T("Mouse pointer event test")},
|
230 | 230 | {1, 7, 1, 1, true, 1.0, false, false, _T("Raster Operation Blt() test")},
|
231 | | - {1, 7, 0, 0, false, 0.0, false, false, _T("Mirrored and Rotated Blt() test")}
|
| 231 | + {1, 7, 0, 0, false, 0.0, false, false, _T("Mirrored and Rotated Blt() test")},
|
| 232 | + {1, 7, 0, 1, false, 0.0, false, false, _T("Large batch color fill Blt() operations")}
|
232 | 233 | };
|
233 | 234 | const int END_2D = __LINE__ - 4;
|
234 | 235 | const int numtests2d = END_2D - START_2D;
|