Source code of Windows XP (NT5)
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.

56 lines
1.4 KiB

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // Copyright (C) Microsoft Corporation, 2000.
  3. //
  4. // rddmon.hpp
  5. //
  6. // Reference Device Debug Monitor
  7. //
  8. ///////////////////////////////////////////////////////////////////////////////
  9. #ifndef _RDDMON_HPP
  10. #define _RDDMON_HPP
  11. #include "debugmon.hpp"
  12. #define D3DDM_IMAGE_MAX 16
  13. typedef struct _ShMemImage
  14. {
  15. D3DSharedMem* pSM;
  16. UINT W;
  17. UINT H;
  18. UINT BPP;
  19. RDSurfaceFormat SF;
  20. void* pBits;
  21. } ShMemImage;
  22. class RDDebugMonitor : public D3DDebugMonitor
  23. {
  24. protected:
  25. RefDev* m_pRD;
  26. // shared memory image - dumps surface buffers for image viewer tool
  27. UINT m_NumShMemI;
  28. ShMemImage m_ShMemI[D3DDM_IMAGE_MAX];
  29. void GrowShMemArray( UINT ShMemI );
  30. void ShMemIRenderTarget( DWORD Flags, UINT iSM );
  31. void ShMemISurface2D( RDSurface2D* pRS, INT32 iLOD, DWORD Flags, UINT iSM );
  32. public:
  33. RDDebugMonitor( RefDev* pRD, BOOL bDbgMonConnectionEnabled );
  34. ~RDDebugMonitor( void );
  35. // x,y render grid mask
  36. DWORD m_ScreenMask[2];
  37. inline BOOL ScreenMask( UINT iX, UINT iY )
  38. {
  39. return
  40. !((1L<<(iX%32)) & m_ScreenMask[0]) ||
  41. !((1L<<(iY%32)) & m_ScreenMask[1]) ;
  42. }
  43. void NextEvent( UINT32 EventType );
  44. HRESULT ProcessMonitorCommand( void );
  45. };
  46. ///////////////////////////////////////////////////////////////////////////////
  47. #endif // _DEBUGMON_HPP