Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

568 lines
22 KiB

  1. /******************************Module*Header***********************************\
  2. *
  3. * *******************
  4. * * GDI SAMPLE CODE *
  5. * *******************
  6. *
  7. * Module Name: drvexts.cxx
  8. *
  9. * Contains all the driver debugger extension functions
  10. *
  11. * Copyright (C) 1994-1998 3Dlabs Inc. Ltd. All rights reserved.
  12. * Copyright (C) 1995-1999 Microsoft Corporation. All rights reserved.
  13. ******************************************************************************/
  14. #include "dbgext.hxx"
  15. #include "gdi.h"
  16. #define TMP_BUFSIZE 512
  17. /**********************************Public*Routine******************************\
  18. *
  19. * Dump Permedia 2 display driver's Surf obj
  20. *
  21. ******************************************************************************/
  22. DECLARE_API(surf)
  23. {
  24. Surf tempSurf;
  25. FLAGDEF* pfd;
  26. //
  27. // Check if there is a "-?" in the command. If yes, show the help
  28. //
  29. PARSE_POINTER(surf_help);
  30. move(tempSurf, (Surf*)arg);
  31. dprintf("----Permedia2 Surf Structure-------------\n");
  32. dprintf("SurfFlags flags 0x%x\n", tempSurf.flags);
  33. //
  34. // Print the detail info of the Surface info
  35. //
  36. for ( pfd = afdSURF; pfd->psz; ++pfd )
  37. {
  38. if ( tempSurf.flags & pfd->fl )
  39. {
  40. dprintf("\t\t\t%s\n", pfd->psz);
  41. }
  42. }
  43. dprintf("PDev* ppdev 0x%x\n", tempSurf.ppdev);
  44. dprintf("struct _Surf* psurfNext 0x%x\n", tempSurf.psurfNext);
  45. dprintf("struct _Surf* psurfPrev 0x%x\n", tempSurf.psurfPrev);
  46. dprintf("ULONG cBlt %ld\n", tempSurf.cBlt);
  47. dprintf("ULONG iUniq %ld\n", tempSurf.iUniq);
  48. dprintf("LONG cx(Surf Width) %ld pixels\n", tempSurf.cx);
  49. dprintf("LONG cy(Surf Height) %ld pixels\n", tempSurf.cy);
  50. if ( tempSurf.flags & SF_VM )
  51. {
  52. dprintf("ULONG ulByteOffset %ld\n", tempSurf.ulByteOffset);
  53. }
  54. else
  55. {
  56. dprintf("VOID* pvScan0 0x%x\n", tempSurf.pvScan0);
  57. }
  58. dprintf("LONG lDelta 0x%x\n", tempSurf.lDelta);
  59. dprintf("VIDEOMEMORY* pvmHeap 0x%x\n", tempSurf.pvmHeap);
  60. dprintf("HSURF hsurf 0x%x\n", tempSurf.hsurf);
  61. dprintf("ULONG ulPackedPP 0x%x\n", tempSurf.ulPackedPP);
  62. dprintf("ULONG ulPixOffset 0x%x\n", tempSurf.ulPixOffset);
  63. dprintf("ULONG ulPixDelta 0x%x\n", tempSurf.ulPixDelta);
  64. dprintf("ULONG ulChecksum 0x%x\n", tempSurf.ulChecksum);
  65. return;
  66. surf_help:
  67. dprintf("Usage: surf [-?] SURF_PTR\n");
  68. }// surf
  69. /**********************************Public*Routine******************************\
  70. *
  71. * Dump Permedia 2 display driver's PDev obj
  72. *
  73. ******************************************************************************/
  74. DECLARE_API(pdev)
  75. {
  76. PDev tempPDev;
  77. char tempStr[TMP_BUFSIZE];
  78. FLAGDEF* pfd;
  79. BOOL bAll = FALSE;
  80. BOOL bGeneral = FALSE;
  81. BOOL bHeap = FALSE;
  82. BOOL bBase = FALSE;
  83. BOOL bGDI = FALSE;
  84. BOOL bPalette = FALSE;
  85. BOOL bCursor = FALSE;
  86. BOOL bBrush = FALSE;
  87. BOOL bDDraw = FALSE;
  88. //
  89. // Check if there is a "-?" in the command. If yes, show the help
  90. //
  91. PARSE_POINTER(pdev_help);
  92. move(tempPDev, (PDev*)arg);
  93. if( iParseiFindSwitch(tokens, ntok, 'a')!= -1 )
  94. {
  95. bAll = TRUE;
  96. goto Start_Dump;
  97. }
  98. if( iParseiFindSwitch(tokens, ntok, 'g') != -1 )
  99. {
  100. bGeneral = TRUE;
  101. }
  102. if( iParseiFindSwitch(tokens, ntok, 'h')!= -1 )
  103. {
  104. bHeap = TRUE;
  105. }
  106. if( iParseiFindSwitch(tokens, ntok, 'b')!= -1 )
  107. {
  108. bBase = TRUE;
  109. }
  110. if( iParseiFindSwitch(tokens, ntok, 'i')!= -1 )
  111. {
  112. bGDI = TRUE;
  113. }
  114. if( iParseiFindSwitch(tokens, ntok, 'p')!= -1 )
  115. {
  116. bPalette = TRUE;
  117. }
  118. if( iParseiFindSwitch(tokens, ntok, 'c')!= -1 )
  119. {
  120. bCursor = TRUE;
  121. }
  122. if( iParseiFindSwitch(tokens, ntok, 'r')!= -1 )
  123. {
  124. bBrush = TRUE;
  125. }
  126. if( iParseiFindSwitch(tokens, ntok, 'd')!= -1 )
  127. {
  128. bDDraw = TRUE;
  129. }
  130. if( !(bGeneral || bHeap || bBase || bGDI || bPalette || bCursor || bBrush
  131. ||bBrush || bDDraw ) )
  132. {
  133. bAll = TRUE;
  134. }
  135. Start_Dump:
  136. dprintf("----------------PDev Structure----------------\n");
  137. if ( bAll || bGeneral )
  138. {
  139. dprintf("*************General Information**************\n");
  140. dprintf("BOOL bEnabled %ld %s\n",tempPDev.bEnabled,
  141. tempPDev.bEnabled? "(Graphics Mode)":"(Full Screen Mode)");
  142. dprintf("DWORD dwAccelLevel %ld\n", tempPDev.dwAccelLevel);
  143. switch ( tempPDev.dwAccelLevel )
  144. {
  145. case 0:
  146. dprintf("%s\n","\t\t\tAll HW accelerations are enabled");
  147. break;
  148. case 1:
  149. dprintf("%s\n", "\t\t\tDrvMovePointer,");
  150. dprintf("%s\n", "\t\t\tDrvCreateDeviceBitmap");
  151. dprintf("%s\n", "are disabled");
  152. break;
  153. case 2:
  154. dprintf("%s\n", "\t\t\tDrvAlphaBlend,");
  155. dprintf("%s\n", "\t\t\tDrvCreateDeviceBitmap,");
  156. dprintf("%s\n", "\t\t\tDrvFillPath,");
  157. dprintf("%s\n", "\t\t\tDrvGradientFill,");
  158. dprintf("%s\n", "\t\t\tDrvLineTo,");
  159. dprintf("%s\n", "\t\t\tDrvMovePointer,");
  160. dprintf("%s\n", "\t\t\tDrvPlgBlt,");
  161. dprintf("%s\n", "\t\t\tDrvStretchBlt,");
  162. dprintf("%s\n", "\t\t\tDrvStretchBltROP,");
  163. dprintf("%s\n", "\t\t\tDrvStrokeAndFillPath,");
  164. dprintf("%s\n", "\t\t\tDrvTransparentBlt");
  165. dprintf("%s\n", "are disabled");
  166. break;
  167. case 3:
  168. dprintf("%s\n", "\t\t\tDrvAlphaBlend,");
  169. dprintf("%s\n", "\t\t\tDrvCreateDeviceBitmap,");
  170. dprintf("%s\n", "\t\t\tDrvFillPath,");
  171. dprintf("%s\n", "\t\t\tDrvGradientFill,");
  172. dprintf("%s\n", "\t\t\tDrvLineTo,");
  173. dprintf("%s\n", "\t\t\tDrvMovePointer,");
  174. dprintf("%s\n", "\t\t\tDrvPlgBlt,");
  175. dprintf("%s\n", "\t\t\tDrvStretchBlt,");
  176. dprintf("%s\n", "\t\t\tDrvStretchBltROP,");
  177. dprintf("%s\n", "\t\t\tDrvStrokeAndFillPath,");
  178. dprintf("%s\n", "\t\t\tDrvTransparentBlt");
  179. dprintf("%s\n", "\t\t\tAnd all DDraw and D3D accelerations");
  180. dprintf("%s\n", "are disabled");
  181. break;
  182. case 4:
  183. dprintf("%s\n", "\t\t\tOnly following HW accelerated functions");
  184. dprintf(" are enabled");
  185. dprintf("%s\n", "\t\t\tDrvBitBlt,");
  186. dprintf("%s\n", "\t\t\tDrvCopyBits,");
  187. dprintf("%s\n", "\t\t\tDrvStrokePath,");
  188. dprintf("%s\n", "\t\t\tDrvTextOut");
  189. break;
  190. case 5:
  191. dprintf("%s\n","\t\t\tAll HW accelerations are disabled");
  192. break;
  193. default:
  194. dprintf("%s\n", "\t\t\tUNKNOWN HW accelerations level");
  195. break;
  196. }
  197. dprintf("ULONG iBitmapFormat %ld\n", tempPDev.iBitmapFormat);
  198. switch ( tempPDev.iBitmapFormat )
  199. {
  200. case BMF_32BPP:
  201. strcpy(tempStr, "\t\t\tBMF_32BPP");
  202. break;
  203. case BMF_16BPP:
  204. strcpy(tempStr, "\t\t\tBMF_16BPP");
  205. break;
  206. case BMF_8BPP:
  207. strcpy(tempStr, "\t\t\tBMF_8BPP");
  208. break;
  209. default:
  210. strcpy(tempStr, "\t\t\tUNKNOWN BMP format");
  211. break;
  212. }
  213. dprintf("%s\n", tempStr);
  214. dprintf("LONG cjPelSize %ld\n", tempPDev.cjPelSize);
  215. switch ( tempPDev.cjPelSize )
  216. {
  217. case 4:
  218. strcpy(tempStr, "\t\t\t32BPP Mode");
  219. break;
  220. case 2:
  221. strcpy(tempStr, "\t\t\t16BPP Mode");
  222. break;
  223. case 1:
  224. strcpy(tempStr, "\t\t\t8BPP Mode");
  225. break;
  226. default:
  227. strcpy(tempStr, "\t\t\tUNKNOWN color depth");
  228. break;
  229. }
  230. dprintf("%s\n", tempStr);
  231. dprintf("LONG cPelSize %ld\n", tempPDev.cPelSize);
  232. dprintf("LONG cBitsPerPel %ld\n", tempPDev.cBitsPerPel);
  233. dprintf("DWORD bPixShift %ld\n", tempPDev.bPixShift);
  234. dprintf("DWORD bBppShift %ld\n", tempPDev.bBppShift);
  235. dprintf("DWORD dwBppMask %ld\n", tempPDev.dwBppMask);
  236. dprintf("CAPS flCaps 0x%x\n", tempPDev.flCaps);
  237. //
  238. // Print the detail info of the CAPS
  239. //
  240. for ( pfd = afdCAPS; pfd->psz; ++pfd )
  241. {
  242. if ( tempPDev.flCaps & pfd->fl )
  243. {
  244. dprintf("\t\t\t%s\n", pfd->psz);
  245. }
  246. }
  247. dprintf("Status flStatus 0x%x\n", tempPDev.flStatus);
  248. //
  249. // Print the detail info of the STATUS
  250. //
  251. for ( pfd = afdSTATUS; pfd->psz; ++pfd )
  252. {
  253. if ( tempPDev.flStatus & pfd->fl )
  254. {
  255. dprintf("\t\t\t%s\n", pfd->psz);
  256. }
  257. }
  258. dprintf("FLONG flHooks 0x%x\n", tempPDev.flHooks);
  259. //
  260. // Print the detail info of the HOOKS
  261. //
  262. for ( pfd = afdHOOK; pfd->psz; ++pfd )
  263. {
  264. if ( tempPDev.flHooks & pfd->fl )
  265. {
  266. dprintf("\t\t\t%s\n", pfd->psz);
  267. }
  268. }
  269. dprintf("Surf* pdsurfScreen 0x%x\n", tempPDev.pdsurfScreen);
  270. dprintf("Surf* pdsurfOffScreen 0x%x\n", tempPDev.pdsurfOffScreen);
  271. dprintf("LONG cxScreen %-6ld (Screen Width)\n",
  272. tempPDev.cxScreen);
  273. dprintf("LONG cyScreen %-6ld (Screen Height)\n",
  274. tempPDev.cyScreen);
  275. dprintf("ULONG ulPermFormat %ld\n", tempPDev.ulPermFormat);
  276. dprintf("ULONG ulPermFormatEx %ld\n", tempPDev.ulPermFormatEx);
  277. dprintf("POINTL ptlOrigin (%ld, %ld)\n",
  278. tempPDev.ptlOrigin.x, tempPDev.ptlOrigin.y);
  279. }// General Info
  280. if ( bAll || bHeap )
  281. {
  282. dprintf("\n*************Heap Manager Information*********\n");
  283. dprintf("VIDEOMEMORY* pvmList 0x%x\n", tempPDev.pvmList);
  284. dprintf("ULONG cHeaps; %ld\n", tempPDev.cHeaps);
  285. dprintf("LONG cxMemory %-6ld (Video RAM Width)\n",
  286. tempPDev.cxMemory);
  287. dprintf("LONG cyMemory %-6ld (Video RAM Height)\n",
  288. tempPDev.cyMemory);
  289. dprintf("LONG lDelta %ld\n", tempPDev.lDelta);
  290. dprintf("Surf* psurfListHead 0x%x\n", tempPDev.psurfListHead);
  291. dprintf("Surf* psurfListTail 0x%x\n", tempPDev.psurfListTail);
  292. }// Heap Info
  293. if ( bAll || bBase )
  294. {
  295. dprintf("\n*************Base Information*****************\n");
  296. dprintf("BYTE* pjScreen 0x%x\n", tempPDev.pjScreen);
  297. dprintf("ULONG ulMode %ld\n", tempPDev.ulMode);
  298. dprintf("ULONG* pulCtrlBase[2] 0x%x, 0x%x\n",
  299. tempPDev.pulCtrlBase[0], tempPDev.pulCtrlBase[1]);
  300. dprintf("ULONG* pulDenseCtrlBase 0x%x\n",
  301. tempPDev.pulDenseCtrlBase);
  302. dprintf("ULONG* pulRamdacBase 0x%x\n", tempPDev.pulRamdacBase);
  303. dprintf("VOID* pvTmpBuffer 0x%x\n", tempPDev.pvTmpBuffer);
  304. dprintf("LONG lVidMemHeight %ld\n", tempPDev.lVidMemHeight);
  305. dprintf("LONG lVidMemWidth %ld\n", tempPDev.lVidMemWidth);
  306. dprintf("UCHAR* pjIoBase %ld\n", tempPDev.pjIoBase);
  307. dprintf("HwDataPtr permediaInfo 0x%x\n", tempPDev.permediaInfo);
  308. dprintf("LONG FrameBufferLength %ld\n",
  309. tempPDev.FrameBufferLength);
  310. dprintf("UINT_PTR dwScreenStart %ld\n", tempPDev.dwScreenStart);
  311. dprintf("P2DMA* pP2dma 0x%x\n", tempPDev.pP2dma);
  312. dprintf("DDPIXELFORMAT ddpfDisplay %ld\n", tempPDev.ddpfDisplay);
  313. dprintf("DWORD dwChipConfig %ld\n", tempPDev.dwChipConfig);
  314. dprintf("ULONG* pCtrlBase 0x%x\n", tempPDev.pCtrlBase);
  315. dprintf("ULONG* pCoreBase 0x%x\n", tempPDev.pCoreBase);
  316. dprintf("ULONG* pGPFifo 0x%x\n", tempPDev.pGPFifo);
  317. dprintf("PULONG pulInFifoPtr 0x%x\n", tempPDev.pulInFifoPtr);
  318. dprintf("PULONG pulInFifoStart 0x%x\n", tempPDev.pulInFifoStart);
  319. dprintf("PULONG pulInFifoEnd 0x%x\n", tempPDev.pulInFifoEnd);
  320. dprintf("ULONG* dmaBufferVirtualAddress 0x%x\n",
  321. tempPDev.dmaBufferVirtualAddress);
  322. dprintf("LARGE_INTEGER dmaBufferPhysicalAddress 0x%x\n",
  323. tempPDev.dmaBufferPhysicalAddress);
  324. dprintf("ULONG dmaCurrentBufferOffset 0x%x\n",
  325. tempPDev.dmaCurrentBufferOffset);
  326. dprintf("ULONG dmaActiveBufferOffset %ld\n",
  327. tempPDev.dmaActiveBufferOffset);
  328. dprintf("ULONG* pulInputDmaCount 0x%x\n",
  329. tempPDev.pulInputDmaCount);
  330. dprintf("ULONG* pulInputDmaAddress 0x%x\n",
  331. tempPDev.pulInputDmaAddress);
  332. dprintf("ULONG* pulFifo 0x%x\n", tempPDev.pulFifo);
  333. dprintf("ULONG* pulOutputFifoCount 0x%x\n",
  334. tempPDev.pulOutputFifoCount);
  335. dprintf("ULONG* pulInputFifoCount 0x%x\n",
  336. tempPDev.pulInputFifoCount);
  337. dprintf("BOOL bGdiContext %ld\n", tempPDev.bGdiContext);
  338. dprintf("BOOL bNeedSync %ld\n", tempPDev.bNeedSync);
  339. dprintf("BOOL bForceSwap %ld\n", tempPDev.bForceSwap);
  340. dprintf("SURFOBJ* psoScreen 0x%x\n", tempPDev.psoScreen);
  341. }// Base Info
  342. if ( bAll || bGDI )
  343. {
  344. dprintf("\n*************GDI Runtime Information**********\n");
  345. dprintf("HANDLE hDriver 0x%x\n", tempPDev.hDriver);
  346. dprintf("HDEV hdevEng 0x%x\n", tempPDev.hdevEng);
  347. dprintf("HSURF hsurfScreen 0x%x\n", tempPDev.hsurfScreen);
  348. dprintf("ULONG iHeapUniq %ld\n", tempPDev.iHeapUniq);
  349. }// GDI Runtime Info
  350. if ( bAll || bPalette )
  351. {
  352. dprintf("\n*************Palette Information**************\n");
  353. dprintf("ULONG ulWhite; 0x%x\n", tempPDev.ulWhite);
  354. dprintf("PALETTEENTRY* pPal 0x%x\n", tempPDev.pPal);
  355. dprintf("HPALETTE hpalDefault 0x%x\n", tempPDev.hpalDefault);
  356. dprintf("FLONG flRed 0x%x\n", tempPDev.flRed);
  357. dprintf("FLONG flGreen 0x%x\n", tempPDev.flGreen);
  358. dprintf("FLONG flBlue 0x%x\n", tempPDev.flBlue);
  359. }// Palette Info
  360. if ( bAll || bCursor )
  361. {
  362. dprintf("\n*************Cursor Information***************\n");
  363. dprintf("LONG xPointerHot %ld\n", tempPDev.xPointerHot);
  364. dprintf("LONG yPointerHot %ld\n", tempPDev.yPointerHot);
  365. dprintf("ULONG ulHwGraphicsCursorModeRegister_45 %ld\n",
  366. tempPDev.ulHwGraphicsCursorModeRegister_45);
  367. dprintf("PtrFlags flPointer %ld %s\n", tempPDev.flPointer,
  368. (tempPDev.flPointer == PTR_HW_ACTIVE)? "(HW Pointer)":"(SW Pointer)");
  369. dprintf("VOID* pvPointerData 0x%x\n", tempPDev.pvPointerData);
  370. dprintf("BYTE ajPointerData 0x%x\n", tempPDev.ajPointerData);
  371. dprintf("BOOL bPointerInitialized %ld\n",
  372. tempPDev.bPointerInitialized);
  373. dprintf("HWPointerCache HWPtrCache %ld\n", tempPDev.HWPtrCache);
  374. dprintf("LONG HWPtrLastCursor %ld\n", tempPDev.HWPtrLastCursor);
  375. dprintf("LONG HWPtrPos_X %ld\n", tempPDev.HWPtrPos_X);
  376. dprintf("LONG HWPtrPos_Y %ld\n", tempPDev.HWPtrPos_Y);
  377. }// Cursor Info
  378. if ( bAll || bBrush )
  379. {
  380. dprintf("\n*************Brush Information****************\n");
  381. dprintf("BOOL bRealizeTransparent %ld\n",
  382. tempPDev.bRealizeTransparent);
  383. dprintf("LONG cPatterns %ld\n", tempPDev.cPatterns);
  384. dprintf("LONG lNextCachedBrush %ld\n",
  385. tempPDev.lNextCachedBrush);
  386. dprintf("LONG cBrushCache %ld\n", tempPDev.cBrushCache);
  387. dprintf("BrushEntry abeMono 0x%x, %ld\n",
  388. tempPDev.abeMono.prbVerify,
  389. tempPDev.abeMono.ulPixelOffset);
  390. dprintf("BrushEntry abe[%d] 0x%x\n", TOTAL_BRUSH_COUNT,
  391. tempPDev.abe);
  392. dprintf("HBITMAP ahbmPat[%d] 0x%x\n",
  393. HS_DDI_MAX, tempPDev.ahbmPat);
  394. dprintf("ULONG ulBrushPackedPP 0x%x\n",
  395. tempPDev.ulBrushPackedPP);
  396. dprintf("VIDEOMEMORY* pvmBrushHeap 0x%x\n", tempPDev.pvmBrushHeap);
  397. dprintf("ULONG ulBrushVidMem 0x%x\n", tempPDev.ulBrushVidMem);
  398. }// Brush Info
  399. if ( bAll || bDDraw )
  400. {
  401. dprintf("\n*************DDRAW/D3D Information************\n");
  402. dprintf("P2CtxtPtr pDDContext 0x%x\n", tempPDev.pDDContext);
  403. dprintf("DDHAL_DDCALLBACKS DDHALCallbacks 0x%x\n",
  404. tempPDev.DDHALCallbacks);
  405. dprintf("DDHAL_DDSURFACECALLBACKS DDSurfCallbacks 0x%x\n",
  406. tempPDev.DDSurfCallbacks);
  407. dprintf("DWORD dwNewDDSurfaceOffset %ld\n",
  408. tempPDev.dwNewDDSurfaceOffset);
  409. dprintf("BOOL bDdExclusiveMode %ld\n",
  410. tempPDev.bDdExclusiveMode);
  411. dprintf("BOOL bDdStereoMode %ld\n", tempPDev.bDdStereoMode);
  412. dprintf("BOOL bCanDoStereo %ld\n", tempPDev.bCanDoStereo);
  413. dprintf("UINT_PTR pD3DDriverData32 0x%x\n",
  414. tempPDev.pD3DDriverData32);
  415. dprintf("UINT_PTR pD3DHALCallbacks32 0x%x\n",
  416. tempPDev.pD3DHALCallbacks32);
  417. dprintf("UINT_PTR dwGARTLin %ld\n", tempPDev.dwGARTLin);
  418. dprintf("UINT_PTR dwGARTDev %ld\n", tempPDev.dwGARTDev);
  419. dprintf("UINT_PTR dwGARTLinBase %ld\n", tempPDev.dwGARTLinBase);
  420. dprintf("UINT_PTR dwGARTDevBase %ld\n", tempPDev.dwGARTDevBase);
  421. dprintf("DDHALINFO ddhi32 0x%x\n", tempPDev.ddhi32);
  422. dprintf("PFND3DPARSEUNKNOWNCOMMAND pD3DParseUnknownCommand 0x%x\n",
  423. tempPDev.pD3DParseUnknownCommand);
  424. }// DDRAW/D3D Info
  425. return;
  426. pdev_help:
  427. dprintf("Usage: pdev [-?] [-a] [-g] [-h] [-b] [-i] [-p] [-c] [-r]");
  428. dprintf(" [-d] PDEV_PTR\n");
  429. dprintf("-a dump the whole PDev info\n");
  430. dprintf("-g dump General info from the PDev\n");
  431. dprintf("-h dump Heap Manager info from the PDev\n");
  432. dprintf("-b dump Base info from the PDev\n");
  433. dprintf("-i dump GDI Runtime info from the PDev\n");
  434. dprintf("-p dump Palette info from the PDev\n");
  435. dprintf("-c dump Cursor info from the PDev\n");
  436. dprintf("-r dump Brush info from the PDev\n");
  437. dprintf("-d dump DDRAW/D3D info from the PDev\n");
  438. return;
  439. }// pdev
  440. /**********************************Public*Routine******************************\
  441. *
  442. * Dump Permedia 2 display driver's function block
  443. *
  444. ******************************************************************************/
  445. DECLARE_API(fb)
  446. {
  447. GFNPB tempFB;
  448. FLAGDEF* pfd;
  449. //
  450. // Check if there is a "-?" in the command. If yes, show the help
  451. //
  452. PARSE_POINTER(fb_help);
  453. move(tempFB, (GFNPB*)arg);
  454. dprintf("----Permedia2 GFNPB Structure-------------\n");
  455. dprintf("VOID (*pgfn)(struct _GFNPB*) 0x%x\n", tempFB.pgfn);
  456. dprintf("PDev* ppdev 0x%x\n", tempFB.ppdev);
  457. dprintf("Surf* psurfDst 0x%x\n", tempFB.psurfDst);
  458. dprintf("RECTL* prclDst 0x%x\n", tempFB.prclDst);
  459. dprintf("Surf* psurfSrc 0x%x\n", tempFB.psurfSrc);
  460. dprintf("RECTL* prclSrc 0x%x\n", tempFB.prclSrc);
  461. dprintf("POINTL* pptlSrc 0x%x\n", tempFB.pptlSrc);
  462. dprintf("LONG lNumRects %ld\n", tempFB.lNumRects);
  463. dprintf("RECTL* pRects 0x%x\n", tempFB.pRects);
  464. dprintf("ULONG colorKey 0x%x\n", tempFB.colorKey);
  465. dprintf("ULONG solidColor 0x%x\n", tempFB.solidColor);
  466. dprintf("RBrush* prbrush 0x%x\n", tempFB.prbrush);
  467. dprintf("POINTL* pptlBrush 0x%x\n", tempFB.pptlBrush);
  468. dprintf("CLIPOBJ* pco 0x%x\n", tempFB.pco);
  469. dprintf("XLATEOBJ* pxlo 0x%x\n", tempFB.pxlo);
  470. dprintf("POINTL* pptlMask 0x%x\n", tempFB.pptlMask);
  471. dprintf("ULONG ulRop4 0x%x\n", tempFB.ulRop4);
  472. dprintf("UCHAR ucAlpha 0x%x\n", tempFB.ucAlpha);
  473. dprintf("TRIVERTEX* ptvrt 0x%x\n", tempFB.ptvrt);
  474. dprintf("ULONG ulNumTvrt %ld\n", tempFB.ulNumTvrt);
  475. dprintf("PVOID pvMesh 0x%x\n", tempFB.pvMesh);
  476. dprintf("ULONG ulNumMesh %ld\n", tempFB.ulNumMesh);
  477. dprintf("ULONG ulMode 0x%x\n", tempFB.ulMode);
  478. dprintf("SURFOBJ* psoSrc 0x%x\n", tempFB.psoSrc);
  479. dprintf("SURFOBJ* psoDst 0x%x\n", tempFB.psoDst);
  480. return;
  481. fb_help:
  482. dprintf("Usage: fb [-?] GFNPB_PTR\n");
  483. }// fb