Changeset 98141 in vbox for trunk/src/VBox/Additions/WINNT/Graphics
- Timestamp:
- Jan 19, 2023 2:25:46 PM (2 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/disp
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/Makefile.kmk
r98128 r98141 242 242 endif #ifdef VBOX_WITH_WDDM 243 243 244 ifdef VBOXVIDEOWINDBG 244 245 ifdef VBOX_WITH_VBOXVIDEOWINDBG 246 # 247 # A windbg extension and a few test programs. 248 # 249 245 250 DLLS += vbvdbg 246 vbvdbg_TEMPLATE = VB OXR3STATIC251 vbvdbg_TEMPLATE = VBoxR3StaticDll 247 252 vbvdbg_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH) 248 253 vbvdbg_DEFS = UNICODE _UNICODE … … 252 257 253 258 PROGRAMS += tstMvWnd 254 tstMvWnd_TEMPLATE = VBoxR3 Exe259 tstMvWnd_TEMPLATE = VBoxR3Static 255 260 tstMvWnd_DEFS = UNICODE _UNICODE 256 tstMvWnd_SOURCES = \ 257 wddm/dbg/tstMvWnd.cpp 258 tstMvWnd_LIBS = $(VBOX_LIB_IPRT_GUEST_R3) 259 tstMvWnd_LDFLAGS.win = /SUBSYSTEM:windows 261 tstMvWnd_SOURCES = wddm/dbg/tstMvWnd.cpp 262 #tstMvWnd_LIBS = $(VBOX_LIB_IPRT_GUEST_R3) - Use guest template if this is wanted! duh! 263 #tstMvWnd_LDFLAGS = /SUBSYSTEM:windows 260 264 261 265 PROGRAMS += DumpD3DCaps9 … … 263 267 DumpD3DCaps9_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH) 264 268 DumpD3DCaps9_DEFS = UNICODE _UNICODE 265 DumpD3DCaps9_SOURCES = \ 266 wddm/dbg/DumpD3DCaps9.cpp 269 DumpD3DCaps9_SOURCES = wddm/dbg/DumpD3DCaps9.cpp 267 270 DumpD3DCaps9_LIBS = d3d9.lib 268 DumpD3DCaps9_LDFLAGS.win = /SUBSYSTEM:CONSOLE269 271 270 272 PROGRAMS += D3DFeatureLevel 271 D3DFeatureLevel_TEMPLATE = VB OXR3STATIC273 D3DFeatureLevel_TEMPLATE = VBoxR3Static 272 274 D3DFeatureLevel_SDKS = ReorderCompilerIncs $(VBOX_WINDDK_GST_WLH) 273 D3DFeatureLevel_SOURCES = \274 wddm/dbg/D3DFeatureLevel.cpp 275 D3DFeatureLevel_LIBS = $(VBOX_LIB_IPRT_GUEST_R3) d3d11.lib 276 D3DFeatureLevel_LDFLAGS.win = /SUBSYSTEM:CONSOLE277 278 endif # VBOXVIDEOWINDBG275 D3DFeatureLevel_SOURCES = wddm/dbg/D3DFeatureLevel.cpp 276 D3DFeatureLevel_LIBS = d3d11.lib 277 #D3DFeatureLevel_LIBS = $(VBOX_LIB_IPRT_GUEST_R3) d3d11.lib - Use guest template if this is wanted! duh! 278 #D3DFeatureLevel_LDFLAGS.win = /SUBSYSTEM:CONSOLE 279 280 endif # VBOX_WITH_VBOXVIDEOWINDBG 279 281 280 282 include $(FILE_KBUILD_SUB_FOOTER) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dbg/D3DFeatureLevel.cpp
r98103 r98141 31 31 */ 32 32 33 #include <iprt/win/windows.h> 34 #include <D3D11.h> 35 #include <stdio.h> 33 #include <iprt/win/d3d11.h> 34 #include <iprt/stream.h> 36 35 37 int main(int argc, char * argv[])36 int main(int argc, char **argv) 38 37 { 39 (void)argc, argv;38 RT_NOREF(argc, argv); 40 39 41 40 D3D_FEATURE_LEVEL iFeatureLevelMax = static_cast<D3D_FEATURE_LEVEL>(0); 42 41 43 42 /* The list of feature levels we're selecting from. */ 44 const D3D_FEATURE_LEVEL aiFeatureLevels[] = { 43 const D3D_FEATURE_LEVEL aiFeatureLevels[] = 44 { 45 D3D_FEATURE_LEVEL_11_1, 45 46 D3D_FEATURE_LEVEL_11_0, 46 47 D3D_FEATURE_LEVEL_10_1, … … 52 53 53 54 HRESULT rc = D3D11CreateDevice(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, 0, aiFeatureLevels, 54 ARRAYSIZE(aiFeatureLevels), D3D11_SDK_VERSION, NULL, &iFeatureLevelMax, NULL);55 ARRAYSIZE(aiFeatureLevels), D3D11_SDK_VERSION, NULL, &iFeatureLevelMax, NULL); 55 56 56 printf("Maximum supported feature level: 0x%X, hr=0x%X.\n", iFeatureLevelMax, (unsigned int)rc);57 RTPrintf("Maximum supported feature level: 0x%X, hr=0x%X.\n", iFeatureLevelMax, (unsigned int)rc); 57 58 58 59 return rc; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dbg/DumpD3DCaps9.cpp
r98103 r98141 37 37 #define MISSING_FLAGS(_dw1, _dw2) ((_dw2) & ((_dw1) ^ (_dw2))) 38 38 39 #define Log(_m) do { printf _m ; } while (0)39 #define MyLog(_m) do { printf _m ; } while (0) 40 40 41 41 #define DUMP_STRCASE(_t) \ 42 case _t: { Log(("%s", #_t"")); break; }43 #define DUMP_STRCASE_DEFAULT_ DWORD(_dw) \44 default: { Log(("0x%08x", (_dw))); break; }42 case _t: { MyLog(("%s", #_t"")); break; } 43 #define DUMP_STRCASE_DEFAULT_INT(_dw) \ 44 default: { MyLog(("0x%08x", (_dw))); break; } 45 45 46 46 #define DUMP_STRIF_INIT(_ps, _t) \ … … 52 52 if ((_v) & _t) { \ 53 53 if (_fSep) { \ 54 Log(("%s%s", _pSep ,#_t"")); \54 MyLog(("%s%s", _pSep ,#_t"")); \ 55 55 } \ 56 56 else { \ 57 Log(("%s", #_t"")); \57 MyLog(("%s", #_t"")); \ 58 58 _fSep = !!_pSep; \ 59 59 } \ … … 66 66 if (_fFlags) { \ 67 67 if (_fSep) { \ 68 Log(("%s0x%08x", _pSep, (_fFlags))); \68 MyLog(("%s0x%08lx", _pSep, (_fFlags))); \ 69 69 } \ 70 70 else { \ 71 Log(("0x%08x", (_fFlags))); \71 MyLog(("0x%08lx", (_fFlags))); \ 72 72 _fSep = !!_pSep; \ 73 73 } \ … … 94 94 95 95 #define DUMP_DIFF_VAL(_field, _format) do { \ 96 if (pCaps1->_field != pCaps2->_field) { Log(("pCaps->" #_field " = " _format "; // " _format " \n", pCaps2->_field, pCaps1->_field)); } \96 if (pCaps1->_field != pCaps2->_field) { MyLog(("pCaps->" #_field " = " _format "; // " _format " \n", pCaps2->_field, pCaps1->_field)); } \ 97 97 } while (0) 98 98 99 99 static void printDeviceType(const char* pszPrefix, D3DDEVTYPE DeviceType, const char* pszSuffix) 100 100 { 101 Log(("%s", pszPrefix));101 MyLog(("%s", pszPrefix)); 102 102 switch(DeviceType) 103 103 { … … 106 106 DUMP_STRCASE(D3DDEVTYPE_SW) 107 107 DUMP_STRCASE(D3DDEVTYPE_NULLREF) 108 DUMP_STRCASE_DEFAULT_ DWORD(DeviceType)109 } 110 Log(("%s", pszSuffix));108 DUMP_STRCASE_DEFAULT_INT(DeviceType) 109 } 110 MyLog(("%s", pszSuffix)); 111 111 } 112 112 … … 114 114 { 115 115 DUMP_STRIF_INIT(pszSeparator, DWORD); 116 Log(("%s", pszPrefix));116 MyLog(("%s", pszPrefix)); 117 117 // DUMP_STRIF(Caps, D3DCAPS_OVERLAY); 118 118 DUMP_STRIF(Caps, D3DCAPS_READ_SCANLINE); 119 119 DUMP_STRIF_MISSED(Caps); 120 Log(("%s", pszSuffix));120 MyLog(("%s", pszSuffix)); 121 121 } 122 122 … … 125 125 { 126 126 DUMP_STRIF_INIT(pszSeparator, DWORD); 127 Log(("%s", pszPrefix));127 MyLog(("%s", pszPrefix)); 128 128 DUMP_STRIF(Caps2, D3DCAPS2_FULLSCREENGAMMA); 129 129 DUMP_STRIF(Caps2, D3DCAPS2_CANCALIBRATEGAMMA); … … 134 134 DUMP_STRIF(Caps2, D3DCAPS2_CANSHARERESOURCE); 135 135 DUMP_STRIF_MISSED(Caps2); 136 Log(("%s", pszSuffix));136 MyLog(("%s", pszSuffix)); 137 137 } 138 138 … … 140 140 { 141 141 DUMP_STRIF_INIT(pszSeparator, DWORD); 142 Log(("%s", pszPrefix));142 MyLog(("%s", pszPrefix)); 143 143 DUMP_STRIF(Caps3, D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD); 144 144 DUMP_STRIF(Caps3, D3DCAPS3_LINEAR_TO_SRGB_PRESENTATION); … … 147 147 // DUMP_STRIF(Caps3, D3DCAPS3_DXVAHD); 148 148 DUMP_STRIF_MISSED(Caps3); 149 Log(("%s", pszSuffix));149 MyLog(("%s", pszSuffix)); 150 150 } 151 151 … … 153 153 { 154 154 DUMP_STRIF_INIT(pszSeparator, DWORD); 155 Log(("%s", pszPrefix));155 MyLog(("%s", pszPrefix)); 156 156 DUMP_STRIF(Caps, D3DPRESENT_INTERVAL_ONE); 157 157 DUMP_STRIF(Caps, D3DPRESENT_INTERVAL_TWO); … … 160 160 DUMP_STRIF(Caps, D3DPRESENT_INTERVAL_IMMEDIATE); 161 161 DUMP_STRIF_MISSED(Caps); 162 Log(("%s", pszSuffix));162 MyLog(("%s", pszSuffix)); 163 163 } 164 164 … … 166 166 { 167 167 DUMP_STRIF_INIT(pszSeparator, DWORD); 168 Log(("%s", pszPrefix));168 MyLog(("%s", pszPrefix)); 169 169 DUMP_STRIF(Caps, D3DCURSORCAPS_COLOR); 170 170 DUMP_STRIF(Caps, D3DCURSORCAPS_LOWRES); 171 171 DUMP_STRIF_MISSED(Caps); 172 Log(("%s", pszSuffix));172 MyLog(("%s", pszSuffix)); 173 173 } 174 174 … … 176 176 { 177 177 DUMP_STRIF_INIT(pszSeparator, DWORD); 178 Log(("%s", pszPrefix));178 MyLog(("%s", pszPrefix)); 179 179 DUMP_STRIF(Caps, D3DDEVCAPS_EXECUTESYSTEMMEMORY); 180 180 DUMP_STRIF(Caps, D3DDEVCAPS_EXECUTEVIDEOMEMORY); … … 198 198 DUMP_STRIF(Caps, D3DDEVCAPS_NPATCHES); 199 199 DUMP_STRIF_MISSED(Caps); 200 Log(("%s", pszSuffix));200 MyLog(("%s", pszSuffix)); 201 201 } 202 202 … … 204 204 { 205 205 DUMP_STRIF_INIT(pszSeparator, DWORD); 206 Log(("%s", pszPrefix));206 MyLog(("%s", pszPrefix)); 207 207 DUMP_STRIF(Caps, D3DPMISCCAPS_MASKZ); 208 208 DUMP_STRIF(Caps, D3DPMISCCAPS_CULLNONE); … … 224 224 DUMP_STRIF(Caps, D3DPMISCCAPS_POSTBLENDSRGBCONVERT); 225 225 DUMP_STRIF_MISSED(Caps); 226 Log(("%s", pszSuffix));226 MyLog(("%s", pszSuffix)); 227 227 } 228 228 … … 230 230 { 231 231 DUMP_STRIF_INIT(pszSeparator, DWORD); 232 Log(("%s", pszPrefix));232 MyLog(("%s", pszPrefix)); 233 233 DUMP_STRIF(Caps, D3DPRASTERCAPS_DITHER); 234 234 DUMP_STRIF(Caps, D3DPRASTERCAPS_ZTEST); … … 248 248 DUMP_STRIF(Caps, D3DPRASTERCAPS_MULTISAMPLE_TOGGLE); 249 249 DUMP_STRIF_MISSED(Caps); 250 Log(("%s", pszSuffix));250 MyLog(("%s", pszSuffix)); 251 251 } 252 252 … … 254 254 { 255 255 DUMP_STRIF_INIT(pszSeparator, DWORD); 256 Log(("%s", pszPrefix));256 MyLog(("%s", pszPrefix)); 257 257 DUMP_STRIF(Caps, D3DPCMPCAPS_NEVER); 258 258 DUMP_STRIF(Caps, D3DPCMPCAPS_LESS); … … 264 264 DUMP_STRIF(Caps, D3DPCMPCAPS_ALWAYS); 265 265 DUMP_STRIF_MISSED(Caps); 266 Log(("%s", pszSuffix));266 MyLog(("%s", pszSuffix)); 267 267 } 268 268 … … 270 270 { 271 271 DUMP_STRIF_INIT(pszSeparator, DWORD); 272 Log(("%s", pszPrefix));272 MyLog(("%s", pszPrefix)); 273 273 DUMP_STRIF(Caps, D3DPBLENDCAPS_ZERO); 274 274 DUMP_STRIF(Caps, D3DPBLENDCAPS_ONE); … … 288 288 DUMP_STRIF(Caps, D3DPBLENDCAPS_INVSRCCOLOR2); 289 289 DUMP_STRIF_MISSED(Caps); 290 Log(("%s", pszSuffix));290 MyLog(("%s", pszSuffix)); 291 291 } 292 292 … … 294 294 { 295 295 DUMP_STRIF_INIT(pszSeparator, DWORD); 296 Log(("%s", pszPrefix));296 MyLog(("%s", pszPrefix)); 297 297 DUMP_STRIF(Caps, D3DPSHADECAPS_COLORGOURAUDRGB); 298 298 DUMP_STRIF(Caps, D3DPSHADECAPS_SPECULARGOURAUDRGB); … … 300 300 DUMP_STRIF(Caps, D3DPSHADECAPS_FOGGOURAUD); 301 301 DUMP_STRIF_MISSED(Caps); 302 Log(("%s", pszSuffix));302 MyLog(("%s", pszSuffix)); 303 303 } 304 304 … … 306 306 { 307 307 DUMP_STRIF_INIT(pszSeparator, DWORD); 308 Log(("%s", pszPrefix));308 MyLog(("%s", pszPrefix)); 309 309 DUMP_STRIF(Caps, D3DPTEXTURECAPS_PERSPECTIVE); 310 310 DUMP_STRIF(Caps, D3DPTEXTURECAPS_POW2); … … 324 324 DUMP_STRIF(Caps, D3DPTEXTURECAPS_NOPROJECTEDBUMPENV); 325 325 DUMP_STRIF_MISSED(Caps); 326 Log(("%s", pszSuffix));326 MyLog(("%s", pszSuffix)); 327 327 } 328 328 … … 330 330 { 331 331 DUMP_STRIF_INIT(pszSeparator, DWORD); 332 Log(("%s", pszPrefix));332 MyLog(("%s", pszPrefix)); 333 333 DUMP_STRIF(Caps, D3DPTFILTERCAPS_MINFPOINT); 334 334 DUMP_STRIF(Caps, D3DPTFILTERCAPS_MINFLINEAR); … … 345 345 DUMP_STRIF(Caps, D3DPTFILTERCAPS_MAGFGAUSSIANQUAD); 346 346 DUMP_STRIF_MISSED(Caps); 347 Log(("%s", pszSuffix));347 MyLog(("%s", pszSuffix)); 348 348 } 349 349 … … 351 351 { 352 352 DUMP_STRIF_INIT(pszSeparator, DWORD); 353 Log(("%s", pszPrefix));353 MyLog(("%s", pszPrefix)); 354 354 DUMP_STRIF(Caps, D3DPTADDRESSCAPS_WRAP); 355 355 DUMP_STRIF(Caps, D3DPTADDRESSCAPS_MIRROR); … … 359 359 DUMP_STRIF(Caps, D3DPTADDRESSCAPS_MIRRORONCE); 360 360 DUMP_STRIF_MISSED(Caps); 361 Log(("%s", pszSuffix));361 MyLog(("%s", pszSuffix)); 362 362 } 363 363 … … 365 365 { 366 366 DUMP_STRIF_INIT(pszSeparator, DWORD); 367 Log(("%s", pszPrefix));367 MyLog(("%s", pszPrefix)); 368 368 DUMP_STRIF(Caps, D3DLINECAPS_TEXTURE); 369 369 DUMP_STRIF(Caps, D3DLINECAPS_ZTEST); … … 373 373 DUMP_STRIF(Caps, D3DLINECAPS_ANTIALIAS); 374 374 DUMP_STRIF_MISSED(Caps); 375 Log(("%s", pszSuffix));375 MyLog(("%s", pszSuffix)); 376 376 } 377 377 … … 379 379 { 380 380 DUMP_STRIF_INIT(pszSeparator, DWORD); 381 Log(("%s", pszPrefix));381 MyLog(("%s", pszPrefix)); 382 382 DUMP_STRIF(Caps, D3DSTENCILCAPS_KEEP); 383 383 DUMP_STRIF(Caps, D3DSTENCILCAPS_ZERO); … … 390 390 DUMP_STRIF(Caps, D3DSTENCILCAPS_TWOSIDED); 391 391 DUMP_STRIF_MISSED(Caps); 392 Log(("%s", pszSuffix));392 MyLog(("%s", pszSuffix)); 393 393 } 394 394 … … 396 396 { 397 397 DUMP_STRIF_INIT(pszSeparator, DWORD); 398 Log(("%s", pszPrefix));398 MyLog(("%s", pszPrefix)); 399 399 DUMP_STRIF(Caps, D3DFVFCAPS_TEXCOORDCOUNTMASK); 400 400 DUMP_STRIF(Caps, D3DFVFCAPS_DONOTSTRIPELEMENTS); 401 401 DUMP_STRIF(Caps, D3DFVFCAPS_PSIZE); 402 402 DUMP_STRIF_MISSED(Caps); 403 Log(("%s", pszSuffix));403 MyLog(("%s", pszSuffix)); 404 404 } 405 405 … … 407 407 { 408 408 DUMP_STRIF_INIT(pszSeparator, DWORD); 409 Log(("%s", pszPrefix));409 MyLog(("%s", pszPrefix)); 410 410 DUMP_STRIF(Caps, D3DTEXOPCAPS_DISABLE); 411 411 DUMP_STRIF(Caps, D3DTEXOPCAPS_SELECTARG1); … … 435 435 DUMP_STRIF(Caps, D3DTEXOPCAPS_LERP); 436 436 DUMP_STRIF_MISSED(Caps); 437 Log(("%s", pszSuffix));437 MyLog(("%s", pszSuffix)); 438 438 } 439 439 … … 441 441 { 442 442 DUMP_STRIF_INIT(pszSeparator, DWORD); 443 Log(("%s", pszPrefix));443 MyLog(("%s", pszPrefix)); 444 444 DUMP_STRIF(Caps, D3DVTXPCAPS_TEXGEN); 445 445 DUMP_STRIF(Caps, D3DVTXPCAPS_MATERIALSOURCE7); … … 451 451 DUMP_STRIF(Caps, D3DVTXPCAPS_NO_TEXGEN_NONLOCALVIEWER); 452 452 DUMP_STRIF_MISSED(Caps); 453 Log(("%s", pszSuffix));453 MyLog(("%s", pszSuffix)); 454 454 } 455 455 … … 457 457 { 458 458 DUMP_STRIF_INIT(pszSeparator, DWORD); 459 Log(("%s", pszPrefix));459 MyLog(("%s", pszPrefix)); 460 460 DUMP_STRIF(Caps, D3DDEVCAPS2_STREAMOFFSET); 461 461 DUMP_STRIF(Caps, D3DDEVCAPS2_DMAPNPATCH); … … 466 466 DUMP_STRIF(Caps, D3DDEVCAPS2_VERTEXELEMENTSCANSHARESTREAMOFFSET); 467 467 DUMP_STRIF_MISSED(Caps); 468 Log(("%s", pszSuffix));468 MyLog(("%s", pszSuffix)); 469 469 } 470 470 … … 472 472 { 473 473 DUMP_STRIF_INIT(pszSeparator, DWORD); 474 Log(("%s", pszPrefix));474 MyLog(("%s", pszPrefix)); 475 475 DUMP_STRIF(Caps, D3DDTCAPS_UBYTE4); 476 476 DUMP_STRIF(Caps, D3DDTCAPS_UBYTE4N); … … 484 484 DUMP_STRIF(Caps, D3DDTCAPS_FLOAT16_4); 485 485 DUMP_STRIF_MISSED(Caps); 486 Log(("%s", pszSuffix));486 MyLog(("%s", pszSuffix)); 487 487 } 488 488 … … 491 491 { 492 492 DUMP_STRIF_INIT(pszSeparator, DWORD); 493 Log(("%s", pszPrefix));494 DUMP_STRIF(Caps, ); 495 DUMP_STRIF(Caps, ); 496 DUMP_STRIF(Caps, ); 497 DUMP_STRIF(Caps, ); 498 DUMP_STRIF(Caps, ); 499 DUMP_STRIF(Caps, ); 500 DUMP_STRIF(Caps, ); 501 DUMP_STRIF(Caps, ); 502 DUMP_STRIF(Caps, ); 503 DUMP_STRIF(Caps, ); 504 DUMP_STRIF(Caps, ); 505 DUMP_STRIF(Caps, ); 506 DUMP_STRIF(Caps, ); 507 DUMP_STRIF(Caps, ); 508 DUMP_STRIF(Caps, ); 509 DUMP_STRIF(Caps, ); 510 DUMP_STRIF_MISSED(Caps); 511 Log(("%s", pszSuffix));493 MyLog(("%s", pszPrefix)); 494 DUMP_STRIF(Caps, ); 495 DUMP_STRIF(Caps, ); 496 DUMP_STRIF(Caps, ); 497 DUMP_STRIF(Caps, ); 498 DUMP_STRIF(Caps, ); 499 DUMP_STRIF(Caps, ); 500 DUMP_STRIF(Caps, ); 501 DUMP_STRIF(Caps, ); 502 DUMP_STRIF(Caps, ); 503 DUMP_STRIF(Caps, ); 504 DUMP_STRIF(Caps, ); 505 DUMP_STRIF(Caps, ); 506 DUMP_STRIF(Caps, ); 507 DUMP_STRIF(Caps, ); 508 DUMP_STRIF(Caps, ); 509 DUMP_STRIF(Caps, ); 510 DUMP_STRIF_MISSED(Caps); 511 MyLog(("%s", pszSuffix)); 512 512 } 513 513 #endif … … 517 517 if (!memcmp(pCaps1, pCaps2, sizeof (D3DCAPS9))) 518 518 { 519 Log(("caps are identical!\n"));519 MyLog(("caps are identical!\n")); 520 520 return; 521 521 } 522 522 523 Log(("caps differ, doing detailed diff..\n"));523 MyLog(("caps differ, doing detailed diff..\n")); 524 524 525 525 if (pCaps1->DeviceType != pCaps2->DeviceType) … … 552 552 553 553 /* non-caps */ 554 DUMP_DIFF_VAL(MaxTextureWidth, "% d");555 DUMP_DIFF_VAL(MaxTextureHeight, "% d");556 DUMP_DIFF_VAL(MaxVolumeExtent, "% d");557 DUMP_DIFF_VAL(MaxTextureRepeat, "% d");558 DUMP_DIFF_VAL(MaxTextureAspectRatio, "% d");559 DUMP_DIFF_VAL(MaxAnisotropy, "% d");554 DUMP_DIFF_VAL(MaxTextureWidth, "%ld"); 555 DUMP_DIFF_VAL(MaxTextureHeight, "%ld"); 556 DUMP_DIFF_VAL(MaxVolumeExtent, "%ld"); 557 DUMP_DIFF_VAL(MaxTextureRepeat, "%ld"); 558 DUMP_DIFF_VAL(MaxTextureAspectRatio, "%ld"); 559 DUMP_DIFF_VAL(MaxAnisotropy, "%ld"); 560 560 DUMP_DIFF_VAL(MaxVertexW, "%f"); 561 561 DUMP_DIFF_VAL(GuardBandLeft, "%f"); … … 571 571 572 572 /* non-caps */ 573 DUMP_DIFF_VAL(MaxTextureBlendStages, "% d");574 DUMP_DIFF_VAL(MaxSimultaneousTextures, "% d");573 DUMP_DIFF_VAL(MaxTextureBlendStages, "%ld"); 574 DUMP_DIFF_VAL(MaxSimultaneousTextures, "%ld"); 575 575 576 576 /* caps */ … … 578 578 579 579 /* non-caps */ 580 DUMP_DIFF_VAL(MaxActiveLights, "% d");581 DUMP_DIFF_VAL(MaxUserClipPlanes, "% d");582 DUMP_DIFF_VAL(MaxVertexBlendMatrices, "% d");583 DUMP_DIFF_VAL(MaxVertexBlendMatrixIndex, "% d");580 DUMP_DIFF_VAL(MaxActiveLights, "%ld"); 581 DUMP_DIFF_VAL(MaxUserClipPlanes, "%ld"); 582 DUMP_DIFF_VAL(MaxVertexBlendMatrices, "%ld"); 583 DUMP_DIFF_VAL(MaxVertexBlendMatrixIndex, "%ld"); 584 584 DUMP_DIFF_VAL(MaxPointSize, "%f"); 585 DUMP_DIFF_VAL(MaxPrimitiveCount, "% d");586 DUMP_DIFF_VAL(MaxVertexIndex, "% d");587 DUMP_DIFF_VAL(MaxStreams, "% d");588 DUMP_DIFF_VAL(MaxStreamStride, "% d");589 DUMP_DIFF_VAL(VertexShaderVersion, "0x% x");590 DUMP_DIFF_VAL(MaxVertexShaderConst, "% d");591 DUMP_DIFF_VAL(PixelShaderVersion, "0x% x");585 DUMP_DIFF_VAL(MaxPrimitiveCount, "%ld"); 586 DUMP_DIFF_VAL(MaxVertexIndex, "%ld"); 587 DUMP_DIFF_VAL(MaxStreams, "%ld"); 588 DUMP_DIFF_VAL(MaxStreamStride, "%ld"); 589 DUMP_DIFF_VAL(VertexShaderVersion, "0x%lx"); 590 DUMP_DIFF_VAL(MaxVertexShaderConst, "%ld"); 591 DUMP_DIFF_VAL(PixelShaderVersion, "0x%lx"); 592 592 DUMP_DIFF_VAL(PixelShader1xMaxValue, "%f"); 593 593 … … 598 598 /* non-caps */ 599 599 DUMP_DIFF_VAL(MaxNpatchTessellationLevel, "%f"); 600 DUMP_DIFF_VAL(Reserved5, "% d");600 DUMP_DIFF_VAL(Reserved5, "%ld"); 601 601 DUMP_DIFF_VAL(MasterAdapterOrdinal, "%d"); 602 602 DUMP_DIFF_VAL(AdapterOrdinalInGroup, "%d"); … … 607 607 608 608 /* non-caps */ 609 DUMP_DIFF_VAL(NumSimultaneousRTs, "% d");609 DUMP_DIFF_VAL(NumSimultaneousRTs, "%ld"); 610 610 611 611 /* caps */ … … 613 613 614 614 /* non-caps */ 615 DUMP_DIFF_VAL(VS20Caps.Caps, "0x% x");615 DUMP_DIFF_VAL(VS20Caps.Caps, "0x%lx"); 616 616 DUMP_DIFF_VAL(VS20Caps.DynamicFlowControlDepth, "%d"); 617 617 DUMP_DIFF_VAL(VS20Caps.NumTemps, "%d"); 618 618 DUMP_DIFF_VAL(VS20Caps.StaticFlowControlDepth, "%d"); 619 619 620 DUMP_DIFF_VAL(PS20Caps.Caps, "0x% x");620 DUMP_DIFF_VAL(PS20Caps.Caps, "0x%lx"); 621 621 DUMP_DIFF_VAL(PS20Caps.DynamicFlowControlDepth, "%d"); 622 622 DUMP_DIFF_VAL(PS20Caps.NumTemps, "%d"); … … 625 625 626 626 DUMP_DIFF_CAPS(printFilterCaps, VertexTextureFilterCaps); 627 DUMP_DIFF_VAL(MaxVShaderInstructionsExecuted, "% d");628 DUMP_DIFF_VAL(MaxPShaderInstructionsExecuted, "% d");629 DUMP_DIFF_VAL(MaxVertexShader30InstructionSlots, "% d");630 DUMP_DIFF_VAL(MaxPixelShader30InstructionSlots, "% d");627 DUMP_DIFF_VAL(MaxVShaderInstructionsExecuted, "%ld"); 628 DUMP_DIFF_VAL(MaxPShaderInstructionsExecuted, "%ld"); 629 DUMP_DIFF_VAL(MaxVertexShader30InstructionSlots, "%ld"); 630 DUMP_DIFF_VAL(MaxPixelShader30InstructionSlots, "%ld"); 631 631 } 632 632 … … 693 693 } while (1); 694 694 695 Log(("WARNING: should NOT be here!\n"));695 MyLog(("WARNING: should NOT be here!\n")); 696 696 return NULL; 697 697 } … … 726 726 if (!newStr) 727 727 { 728 Log(("malloc failed!\n"));728 MyLog(("malloc failed!\n")); 729 729 return NULL; 730 730 } … … 740 740 if (!newStr) 741 741 { 742 Log(("malloc failed!\n"));742 MyLog(("malloc failed!\n")); 743 743 return NULL; 744 744 } … … 755 755 if (!pNewStr) 756 756 { 757 Log(("malloc failed!\n"));757 MyLog(("malloc failed!\n")); 758 758 return NULL; 759 759 } … … 788 788 if (pPrevCmp) 789 789 { 790 i nt iCmp = strncmp(pCur, pPrevCmp, MIN(cCur, cPrevLength));790 iCmp = strncmp(pCur, pPrevCmp, MIN(cCur, cPrevLength)); 791 791 if (!iCmp) 792 792 iCmp = cCur - cPrevLength; … … 826 826 #define DUMP_DIFF_STR_ADDED(_pStr) do { \ 827 827 char * pszCopy = strDupCur(_pStr, ' '); \ 828 Log(("+ %s\n", pszCopy)); \828 MyLog(("+ %s\n", pszCopy)); \ 829 829 if (pszCopy) free(pszCopy); \ 830 830 } while (0) … … 832 832 #define DUMP_DIFF_STR_REMOVED(_pStr) do { \ 833 833 char * pszCopy = strDupCur(_pStr, ' '); \ 834 Log(("- %s\n", pszCopy)); \834 MyLog(("- %s\n", pszCopy)); \ 835 835 if (pszCopy) free(pszCopy); \ 836 836 } while (0) … … 882 882 if (!strcmp(pcszExts1, pcszExts2)) 883 883 { 884 Log(("GL Exts identical!\n"));885 Log(("%s\n", pcszExts1));884 MyLog(("GL Exts identical!\n")); 885 MyLog(("%s\n", pcszExts1)); 886 886 return; 887 887 } 888 888 889 Log(("%s\n", pcszExts1));890 891 Log(("Diffing GL Exts..\n"));889 MyLog(("%s\n", pcszExts1)); 890 891 MyLog(("Diffing GL Exts..\n")); 892 892 diffStrOrderedLists(pcszExts1, pcszExts2); 893 893 } … … 969 969 if (FAILED(hr)) 970 970 { 971 Log(("Direct3DCreate9Ex failed hr 0x%x\n", hr));971 MyLog(("Direct3DCreate9Ex failed hr 0x%lx\n", hr)); 972 972 return NULL; 973 973 } … … 981 981 if (FAILED(hr)) 982 982 { 983 Log(("GetDeviceCaps failed hr 0x%x\n", hr));983 MyLog(("GetDeviceCaps failed hr 0x%lx\n", hr)); 984 984 return NULL; 985 985 } … … 989 989 case D3DCAPSSOURCE_TYPE_FILE: 990 990 { 991 Log(("Loading caps from file not implemented yet!"));991 MyLog(("Loading caps from file not implemented yet!")); 992 992 return NULL; 993 993 } … … 996 996 default: 997 997 { 998 Log(("Unsupported type %d", enmCapsType));998 MyLog(("Unsupported type %d", enmCapsType)); 999 999 } 1000 1000 } … … 1013 1013 dw3 = *pvData++; 1014 1014 dw4 = *pvData++; 1015 sprintf(aBuf, "0x%08 x, 0x%08x, 0x%08x, 0x%08x,\n", dw1, dw2, dw3, dw4);1016 Log(("%s", aBuf));1015 sprintf(aBuf, "0x%08lx, 0x%08lx, 0x%08lx, 0x%08lx,\n", dw1, dw2, dw3, dw4); 1016 MyLog(("%s", aBuf)); 1017 1017 } 1018 1018 … … 1024 1024 dw2 = *pvData++; 1025 1025 dw3 = *pvData++; 1026 sprintf(aBuf, "0x%08 x, 0x%08x, 0x%08x\n", dw1, dw2, dw3);1027 Log(("%s", aBuf));1026 sprintf(aBuf, "0x%08lx, 0x%08lx, 0x%08lx\n", dw1, dw2, dw3); 1027 MyLog(("%s", aBuf)); 1028 1028 break; 1029 1029 case 2: 1030 1030 dw1 = *pvData++; 1031 1031 dw2 = *pvData++; 1032 sprintf(aBuf, "0x%08 x, 0x%08x\n", dw1, dw2);1033 Log(("%s", aBuf));1032 sprintf(aBuf, "0x%08lx, 0x%08lx\n", dw1, dw2); 1033 MyLog(("%s", aBuf)); 1034 1034 break; 1035 1035 case 1: 1036 1036 dw1 = *pvData++; 1037 sprintf(aBuf, "0x%8 x\n", dw1);1038 Log(("%s", aBuf));1037 sprintf(aBuf, "0x%8lx\n", dw1); 1038 MyLog(("%s", aBuf)); 1039 1039 break; 1040 1040 default: … … 1049 1049 if (sizeof (g_aCaps1) != sizeof (D3DCAPS9)) 1050 1050 { 1051 Log(("incorrect caps 1 size (%d), expected(%d)\n", sizeof (g_aCaps1), sizeof (D3DCAPS9)));1051 MyLog(("incorrect caps 1 size (%zd), expected(%zd)\n", sizeof (g_aCaps1), sizeof (D3DCAPS9))); 1052 1052 return 1; 1053 1053 } … … 1055 1055 if (sizeof (g_aCaps2) != sizeof (D3DCAPS9)) 1056 1056 { 1057 Log(("incorrect caps 2 size (%d), expected(%d)\n", sizeof (g_aCaps2), sizeof (D3DCAPS9)));1057 MyLog(("incorrect caps 2 size (%zd), expected(%zd)\n", sizeof (g_aCaps2), sizeof (D3DCAPS9))); 1058 1058 return 1; 1059 1059 } … … 1067 1067 if (!pCaps1) 1068 1068 { 1069 Log(("Failed to select Caps1"));1069 MyLog(("Failed to select Caps1")); 1070 1070 return 1; 1071 1071 } … … 1076 1076 if (!pCaps2) 1077 1077 { 1078 Log(("Failed to select Caps2"));1078 MyLog(("Failed to select Caps2")); 1079 1079 return 1; 1080 1080 } -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dbg/VBoxVideoWinDbg.cpp
r98103 r98141 26 26 */ 27 27 28 #define IPRT_NO_CRT_FOR_3RD_PARTY /* lazy */ 28 29 #include <iprt/win/windows.h> 29 30 #define KDEXT_64BIT 30 #include < wdbgexts.h>31 #include <iprt/win/wdbgexts.h> 31 32 32 33 #define VBOXVWD_VERSION_MAJOR 1 … … 43 44 * DLL entry point. 44 45 */ 45 BOOL WINAPI DllMain(HINSTANCE hInstance, 46 DWORD dwReason, 47 LPVOID lpReserved) 48 { 49 BOOL bOk = TRUE; 50 51 switch (dwReason) 52 { 53 case DLL_PROCESS_ATTACH: 54 { 55 break; 56 } 57 58 case DLL_PROCESS_DETACH: 59 { 60 break; 61 } 62 63 default: 64 break; 65 } 66 return bOk; 46 BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved) 47 { 48 RT_NOREF(hInstance, dwReason, lpReserved); 49 return TRUE; 67 50 } 68 51 … … 102 85 DECLARE_API(help) 103 86 { 87 RT_NOREF(args, dwProcessor, dwCurrentPc, hCurrentThread, hCurrentProcess); 104 88 dprintf("**** VirtualBox Video Driver debugging extension ****\n" 105 89 " The following commands are supported: \n" … … 118 102 ULONG64 u64DefaultPitch; 119 103 PCSTR pExpr = args; 104 RT_NOREF(dwProcessor, dwCurrentPc, hCurrentThread, hCurrentProcess); 120 105 121 106 /* address */ … … 203 188 break; 204 189 } 205 elseif (cbRead != u64DefaultPitch)190 if (cbRead != u64DefaultPitch) 206 191 { 207 192 dprintf("WARNING!!! the actual number of bytes read(%d) not equal the requested size(%d), chunk(%d)\n", (UINT)cbRead, (UINT)u64DefaultPitch, (UINT)i); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/dbg/tstMvWnd.cpp
r98103 r98141 27 27 28 28 #include <iprt/win/windows.h> 29 #include <iprt/cdefs.h> 29 30 31 #undef Assert 30 32 #define Assert(_m) do {} while (0) 31 33 #define vboxVDbgPrint(_m) do {} while (0) … … 80 82 if (!RegisterClass(&wc)) 81 83 { 82 DWORD winErr = GetLastError(); 83 vboxVDbgPrint((__FUNCTION__": RegisterClass failed, winErr(%d)\n", winErr)); 84 vboxVDbgPrint((__FUNCTION__": RegisterClass failed, winErr(%d)\n", GetLastError())); 84 85 hr = E_FAIL; 85 86 } … … 88 89 if (hr == S_OK) 89 90 { 90 HWND hWnd = CreateWindowEx 91 92 93 94 95 96 97 98 91 HWND hWnd = CreateWindowEx(0 /*WS_EX_CLIENTEDGE*/, 92 VBOXDISPWND_NAME, VBOXDISPWND_NAME, 93 WS_OVERLAPPEDWINDOW, 94 0, 0, 95 w, h, 96 GetDesktopWindow() /* hWndParent */, 97 NULL /* hMenu */, 98 hInstance, 99 NULL /* lpParam */); 99 100 Assert(hWnd); 100 101 if (hWnd) … … 104 105 else 105 106 { 106 DWORD winErr = GetLastError(); 107 vboxVDbgPrint((__FUNCTION__": CreateWindowEx failed, winErr(%d)\n", winErr)); 107 vboxVDbgPrint((__FUNCTION__": CreateWindowEx failed, winErr(%d)\n", GetLastError())); 108 108 hr = E_FAIL; 109 109 } … … 114 114 static int g_Width = 400; 115 115 static int g_Height = 300; 116 static DWORD WINAPI tstMvWndThread(void *pvUser) 116 static DWORD WINAPI tstMvWndThread(void *pvUser) RT_NOEXCEPT 117 117 { 118 118 HWND hWnd = (HWND)pvUser; … … 161 161 int main(int argc, char **argv, char **envp) 162 162 { 163 RT_NOREF(argc, argv, envp); 163 164 HWND hWnd; 164 165 HRESULT hr = tstMvWndCreate(200, 200, &hWnd); … … 166 167 if (hr == S_OK) 167 168 { 168 HANDLE hThread = CreateThread( 169 NULL /* LPSECURITY_ATTRIBUTES lpThreadAttributes */, 170 0 /* SIZE_T dwStackSize */, 171 tstMvWndThread, 172 hWnd, 173 0 /* DWORD dwCreationFlags */, 174 NULL /* pThreadId */); 169 HANDLE hThread = CreateThread(NULL /* LPSECURITY_ATTRIBUTES lpThreadAttributes */, 170 0 /* SIZE_T dwStackSize */, 171 tstMvWndThread, 172 hWnd, 173 0 /* DWORD dwCreationFlags */, 174 NULL /* pThreadId */); 175 175 Assert(hThread); 176 176 if (hThread) … … 189 189 } 190 190 191 #ifndef IPRT_NO_CRT 191 192 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) 192 193 { 193 // NOREF(hInstance); NOREF(hPrevInstance); NOREF(lpCmdLine); NOREF(nCmdShow); 194 194 RT_NOREF(hInstance, hPrevInstance, lpCmdLine, nCmdShow); 195 195 return main(__argc, __argv, environ); 196 196 } 197 #endif
Note:
See TracChangeset
for help on using the changeset viewer.