Author: greatlrd
Date: Sun Apr 13 06:47:04 2008
New Revision: 32941
URL:
http://svn.reactos.org/svn/reactos?rev=32941&view=rev
Log:
add more dump output for win3kdxtest
fixed crash for texture.
Modified:
trunk/rostests/dxtest/win32kdxtest/NtGdiDdQueryDirectDrawObject.c
trunk/rostests/dxtest/win32kdxtest/dump.c
trunk/rostests/dxtest/win32kdxtest/test.h
Modified: trunk/rostests/dxtest/win32kdxtest/NtGdiDdQueryDirectDrawObject.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/win32kdxtest/NtGdi…
==============================================================================
--- trunk/rostests/dxtest/win32kdxtest/NtGdiDdQueryDirectDrawObject.c [iso-8859-1]
(original)
+++ trunk/rostests/dxtest/win32kdxtest/NtGdiDdQueryDirectDrawObject.c [iso-8859-1] Sun Apr
13 06:47:04 2008
@@ -339,53 +339,50 @@
dump_CallBackFlags(pCallBackFlags,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal,
pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL,
...)");
dump_D3dCallbacks(puD3dCallbacks,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal,
pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL,
...)");
dump_D3dDriverData(puD3dDriverData,
"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...)");
- /* FIXME dump D3dBufferCallbacks */
-
+ dump_D3dBufferCallbacks(puD3dBufferCallbacks,
"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...)");
}
/* testing OsThunkDdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData, D3dBufferCallbacks, puD3dTextureFormats, NULL, */
- //printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData, D3dBufferCallbacks, puD3dTextureFormats, NULL,
....)\n");
-
- //pHalInfo = &HalInfo;
- //pCallBackFlags = CallBackFlags;
- //puD3dCallbacks = &D3dCallbacks;
- //puD3dDriverData = &D3dDriverData;
- //puD3dBufferCallbacks = &D3dBufferCallbacks;
-
- //RtlZeroMemory(pHalInfo,sizeof(DD_HALINFO));
- //RtlZeroMemory(pCallBackFlags,sizeof(DWORD)*3);
- //RtlZeroMemory(puD3dCallbacks,sizeof(D3DNTHAL_CALLBACKS));
- ////RtlZeroMemory(puD3dDriverData,sizeof(D3DNTHAL_CALLBACKS));
- //RtlZeroMemory(&D3dBufferCallbacks,sizeof(D3DNTHAL_CALLBACKS));
-
- //if (puD3dDriverData)
- //{
- // puD3dTextureFormats = malloc (puD3dDriverData->dwNumTextureFormats *
sizeof(DDSURFACEDESC2));
- // if (!puD3dTextureFormats)
- // printf("Waring Out of memory\n");
-
- // RtlZeroMemory(puD3dTextureFormats, puD3dDriverData->dwNumTextureFormats *
sizeof(DDSURFACEDESC2));
- //}
-
- //retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
- // pCallBackFlags, puD3dCallbacks,
- // puD3dDriverData, puD3dBufferCallbacks,
- // puD3dTextureFormats, puNumHeaps,
- // puvmList, puNumFourCC,
- // puFourCC);
-
-// testing_noteq(retValue,FALSE,fails,"69.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
-// testing_eq(pHalInfo,NULL,fails,"70.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
-// testing_eq(pCallBackFlags,NULL,fails,"71.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
-//
-// /* does not work nice in xp */
-// //
testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"72.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
-//
-//
testing_noteq(puD3dDriverData->dwSize,sizeof(D3DNTHAL_GLOBALDRIVERDATA),fails,"73.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
-//
-// testing_noteq(puNumFourCC,NULL,fails,"74.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
-// testing_noteq(puFourCC,NULL,fails,"75.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
-//
+ printf("testing DdQueryDirectDrawObject( hDD, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData, D3dBufferCallbacks, puD3dTextureFormats, NULL,
....)\n");
+
+ pHalInfo = &HalInfo;
+ pCallBackFlags = CallBackFlags;
+ puD3dCallbacks = &D3dCallbacks;
+ puD3dDriverData = &D3dDriverData;
+ puD3dBufferCallbacks = &D3dBufferCallbacks;
+
+ if (puD3dDriverData)
+ {
+ puD3dTextureFormats = malloc (puD3dDriverData->dwNumTextureFormats *
sizeof(DDSURFACEDESC2));
+ if (!puD3dTextureFormats)
+ printf("Waring Out of memory\n");
+
+ RtlZeroMemory(puD3dTextureFormats, puD3dDriverData->dwNumTextureFormats *
sizeof(DDSURFACEDESC2));
+ }
+
+ retValue = OsThunkDdQueryDirectDrawObject( hDirectDrawLocal, pHalInfo,
+ pCallBackFlags, puD3dCallbacks,
+ puD3dDriverData, puD3dBufferCallbacks,
+ puD3dTextureFormats, puNumHeaps,
+ puvmList, puNumFourCC,
+ puFourCC);
+
+
+
+
+
+ testing_noteq(retValue,FALSE,fails,"69.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
+ testing_eq(pHalInfo,NULL,fails,"70.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
+ testing_eq(pCallBackFlags,NULL,fails,"71.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
+
+ /* does not work nice in xp */
+ // testing_noteq(puD3dCallbacks->dwSize,sizeof(D3DNTHAL_CALLBACKS),fails,"72.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
+
+
testing_noteq(puD3dDriverData->dwSize,sizeof(D3DNTHAL_GLOBALDRIVERDATA),fails,"73.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
+
+ testing_noteq(puNumFourCC,NULL,fails,"74.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
+ testing_noteq(puFourCC,NULL,fails,"75.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL, ...);\0");
+
// /*
// if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) &&
// (pHalInfo->dwSize != sizeof(DD_HALINFO_V4)))
@@ -395,32 +392,32 @@
// }
// */
//
-// if (puD3dBufferCallbacks)
-// {
-// /* does not work nice in xp */
-// //
testing_noteq(puD3dBufferCallbacks->dwSize,sizeof(DD_D3DBUFCALLBACKS),fails,"76.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL...);\0");
-// }
-//
-// if (puD3dTextureFormats)
-// {
-// /* fixme test case for it */
-// }
-//
-// if (dumping_on == TRUE)
-// {
-// dump_halinfo(pHalInfo,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal,
pHalInfo, pCallBackFlags, NULL, ...)");
-//
dump_CallBackFlags(pCallBackFlags,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal,
pHalInfo, pCallBackFlags, NULL, ...)");
-// /* FIXME dump puD3dCallbacks */
-// /* FIXME dump puD3dDriverData */
-// /* FIXME dump D3dBufferCallbacks */
-// /* FIXME dump puD3dTextureFormats */
-// }
-//
-//
-//
-//
-//
-// if (puD3dTextureFormats)
-// free (puD3dTextureFormats);
+ if (puD3dBufferCallbacks)
+ {
+
+
testing_noteq(puD3dBufferCallbacks->dwSize,sizeof(DD_D3DBUFCALLBACKS),fails,"76.
NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags, puD3dCallbacks,
puD3dDriverData, puD3dBufferCallbacks, puD3dTextureFormats, NULL...);\0");
+ }
+
+ if (puD3dTextureFormats)
+ {
+ /* fixme test case for it */
+ }
+
+ if (dumping_on == TRUE)
+ {
+ dump_halinfo(pHalInfo,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal,
pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL,
...)");
+
dump_CallBackFlags(pCallBackFlags,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal,
pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL,
...)");
+
dump_D3dCallbacks(puD3dCallbacks,"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal,
pHalInfo, pCallBackFlags, puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL,
...)");
+ dump_D3dDriverData(puD3dDriverData,
"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...)");
+ dump_D3dBufferCallbacks(puD3dBufferCallbacks,
"NtGdiDdQueryDirectDrawObject(hDirectDrawLocal, pHalInfo, pCallBackFlags,
puD3dCallbacks, puD3dDriverData, puD3dBufferCallbacks, NULL, ...)");
+ /* FIXME dump puD3dTextureFormats */
+ }
+
+
+
+
+
+ if (puD3dTextureFormats)
+ free (puD3dTextureFormats);
show_status(fails, "NtGdiDdQueryDirectDrawObject\0");
-}
+}
Modified: trunk/rostests/dxtest/win32kdxtest/dump.c
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/win32kdxtest/dump.…
==============================================================================
--- trunk/rostests/dxtest/win32kdxtest/dump.c [iso-8859-1] (original)
+++ trunk/rostests/dxtest/win32kdxtest/dump.c [iso-8859-1] Sun Apr 13 06:47:04 2008
@@ -1120,3 +1120,40 @@
printf("none puD3dDriverData from the driver
0x%08lx\n",puD3dDriverData->dwSize);
}
}
+
+
+void
+dump_D3dBufferCallbacks(DD_D3DBUFCALLBACKS *puD3dBufferCallbacks, char *text)
+{
+ int count = 0;
+ DWORD flag = 0;
+
+ if (puD3dBufferCallbacks->dwSize == sizeof(DD_D3DBUFCALLBACKS))
+ {
+ printf(" puD3dBufferCallbacks->dwSize :
0x%08lx\n",(long)puD3dBufferCallbacks->dwSize);
+ printf(" puD3dBufferCallbacks->dwFlags :
");
+
+ /* rember this flags are not in msdn only in ms ddk */
+ count = 0;
+ flag = puD3dBufferCallbacks->dwFlags;
+
checkflag(flag,DDHAL_D3DBUFCB32_CANCREATED3DBUF,"DDHAL_D3DBUFCB32_CANCREATED3DBUF");
+
checkflag(flag,DDHAL_D3DBUFCB32_CREATED3DBUF,"DDHAL_D3DBUFCB32_CREATED3DBUF");
+
+
checkflag(flag,DDHAL_D3DBUFCB32_DESTROYD3DBUF,"DDHAL_D3DBUFCB32_DESTROYD3DBUF");
+
+
checkflag(flag,DDHAL_D3DBUFCB32_LOCKD3DBUF,"DDHAL_D3DBUFCB32_LOCKD3DBUF");
+
checkflag(flag,DDHAL_D3DBUFCB32_UNLOCKD3DBUF,"DDHAL_D3DBUFCB32_UNLOCKD3DBUF");
+ endcheckflag(flag,"ppuD3dBufferCallbacks->dwFlags");
+
+ printf(" puD3dBufferCallbacks->CanCreateD3DBuffer :
0x%08lx\n",(long)puD3dBufferCallbacks->CanCreateD3DBuffer);
+ printf(" puD3dBufferCallbacks->CreateD3DBuffer :
0x%08lx\n",(long)puD3dBufferCallbacks->CreateD3DBuffer);
+ printf(" puD3dBufferCallbacks->DestroyD3DBuffer :
0x%08lx\n",(long)puD3dBufferCallbacks->DestroyD3DBuffer);
+ printf(" puD3dBufferCallbacks->LockD3DBuffer :
0x%08lx\n",(long)puD3dBufferCallbacks->LockD3DBuffer);
+ printf(" puD3dBufferCallbacks->UnlockD3DBuffer :
0x%08lx\n",(long)puD3dBufferCallbacks->UnlockD3DBuffer);
+ }
+ else
+ {
+ printf("none puD3dBufferCallbacks from the driver
0x%08lx\n",puD3dBufferCallbacks->dwSize);
+ }
+
+}
Modified: trunk/rostests/dxtest/win32kdxtest/test.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/dxtest/win32kdxtest/test.…
==============================================================================
--- trunk/rostests/dxtest/win32kdxtest/test.h [iso-8859-1] (original)
+++ trunk/rostests/dxtest/win32kdxtest/test.h [iso-8859-1] Sun Apr 13 06:47:04 2008
@@ -12,6 +12,11 @@
void dump_CallBackFlags(DWORD *pCallBackFlags, char *text);
void dump_D3dCallbacks(D3DNTHAL_CALLBACKS *puD3dCallbacks, char *text);
void dump_D3dDriverData(D3DNTHAL_GLOBALDRIVERDATA *puD3dDriverData, char *text);
+void dump_D3dBufferCallbacks(DD_D3DBUFCALLBACKS *puD3dCallbacks, char *text);
+
+
+
+