pix3_win.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*==========================================================================;
  2. *
  3. * Copyright (C) Microsoft Corporation. All Rights Reserved.
  4. *
  5. * File: PIX3_win.h
  6. * Content: PIX include file
  7. * Don't include this file directly - use pix3.h
  8. *
  9. ****************************************************************************/
  10. #pragma once
  11. #ifndef _PIX3_H_
  12. #error "Don't include this file directly - use pix3.h"
  13. #endif
  14. #ifndef _PIX3_WIN_H_
  15. #define _PIX3_WIN_H_
  16. struct PIXEventsBlockInfo
  17. {
  18. };
  19. struct PIXEventsThreadInfo
  20. {
  21. PIXEventsBlockInfo* block;
  22. UINT64* biasedLimit;
  23. UINT64* destination;
  24. UINT64* limit;
  25. UINT64 id;
  26. };
  27. // The following defines denote the different metadata values that have been used
  28. // by tools to denote how to parse pix marker event data. The first two values
  29. // are legacy values.
  30. #define WINPIX_EVENT_UNICODE_VERSION 0
  31. #define WINPIX_EVENT_ANSI_VERSION 1
  32. #define WINPIX_EVENT_PIX3BLOB_VERSION 2
  33. #define D3D12_EVENT_METADATA WINPIX_EVENT_PIX3BLOB_VERSION
  34. __forceinline UINT64 PIXGetTimestampCounter()
  35. {
  36. LARGE_INTEGER time = {};
  37. QueryPerformanceCounter(&time);
  38. return time.QuadPart;
  39. }
  40. #define PIXSetCPUMarkerOnContext(context, metadata, ...) MakeCPUSetMarkerForContext(metadata, context, __VA_ARGS__)
  41. #define PIXBeginCPUEventOnContext(context, metadata, ...) MakeCPUBeginEventForContext(metadata, context, __VA_ARGS__)
  42. #define PIXEndCPUEventOnContext(context) MakeCPUEndEventForContext(context)
  43. #endif //_PIX3_WIN_H_