Advertisement
MagicAndre1981

WDDM 2.1 with HDR support in Windows 10 Redstone

Mar 29th, 2016
369
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Windows 10 Redstone comes with WDDM 2.1 with HDR support:
  2.  
  3.  
  4. //
  5. // WDDM DDI Interface Version
  6. //
  7.  
  8.  
  9. #define DXGKDDI_INTERFACE_VERSION_WDDM2_1    0x6000
  10.  
  11.  
  12.  
  13. #define IS_OFFICIAL_DDI_INTERFACE_VERSION(version)                 \
  14.             (((version) == DXGKDDI_INTERFACE_VERSION_VISTA) ||     \
  15.              ((version) == DXGKDDI_INTERFACE_VERSION_VISTA_SP1) || \
  16.              ((version) == DXGKDDI_INTERFACE_VERSION_WIN7) ||      \
  17.              ((version) == DXGKDDI_INTERFACE_VERSION_WIN8) ||      \
  18.              ((version) == DXGKDDI_INTERFACE_VERSION_WDDM1_3) ||   \
  19.              ((version) == DXGKDDI_INTERFACE_VERSION_WDDM1_3_PATH_INDEPENDENT_ROTATION) || \
  20.              ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_0) ||   \
  21.              ((version) == DXGKDDI_INTERFACE_VERSION_WDDM2_1)      \
  22.             )
  23.  
  24. #if !defined(DXGKDDI_INTERFACE_VERSION)
  25. #define DXGKDDI_INTERFACE_VERSION           DXGKDDI_INTERFACE_VERSION_WDDM2_1
  26. #endif // !defined(DXGKDDI_INTERFACE_VERSION)
  27.  
  28.  
  29. #define D3D_UMD_INTERFACE_VERSION_WDDM2_0       0x5002
  30.  
  31. #define D3D_UMD_INTERFACE_VERSION_WDDM2_1_1     0x6000
  32. #define D3D_UMD_INTERFACE_VERSION_WDDM2_1       D3D_UMD_INTERFACE_VERSION_WDDM2_1_1
  33.  
  34. #if !defined(D3D_UMD_INTERFACE_VERSION)
  35. #define D3D_UMD_INTERFACE_VERSION           D3D_UMD_INTERFACE_VERSION_WDDM2_1
  36. #endif // !defined(D3D_UMD_INTERFACE_VERSION)
  37.  
  38.  
  39.  
  40. #if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1)
  41. typedef enum _D3DDDI_HDR_METADATA_TYPE
  42. {
  43.     D3DDDI_HDR_METADATA_TYPE_NONE               = 0,
  44.     D3DDDI_HDR_METADATA_TYPE_HDR10              = 1,
  45. } D3DDDI_HDR_METADATA_TYPE;
  46.  
  47. typedef struct _D3DDDI_HDR_METADATA_HDR10
  48. {
  49.     // Color gamut
  50.     UINT16 RedPrimary[2];
  51.     UINT16 GreenPrimary[2];
  52.     UINT16 BluePrimary[2];
  53.     UINT16 WhitePoint[2];
  54.    
  55.     // Luminance
  56.     UINT   MaxMasteringLuminance;
  57.     UINT   MinMasteringLuminance;
  58.     UINT16 MaxContentLightLevel;
  59.     UINT16 MaxFrameAverageLightLevel;
  60. } D3DDDI_HDR_METADATA_HDR10;
  61. #endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1)
  62.  
  63.  
  64.  
  65. #if ((DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1) || \
  66.      (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_1))
  67.  
  68. typedef struct D3DDDI_UPDATEALLOCPROPERTY_FLAGS
  69. {
  70.     union
  71.     {
  72.         struct
  73.         {
  74.             UINT AccessedPhysically : 1;    // The new value for AccessedPhysically on an allocation
  75.             UINT Reserved : 31;
  76.         };
  77.         UINT Value;
  78.     };
  79. } D3DDDI_UPDATEALLOCPROPERTY_FLAGS;
  80.  
  81. typedef struct D3DDDI_UPDATEALLOCPROPERTY
  82. {
  83.     D3DKMT_HANDLE                       hPagingQueue;           // [in] Handle to the paging queue used to synchronize paging operations for this call.
  84.     D3DKMT_HANDLE                       hAllocation;            // [in] Handle to the allocation to be updated.
  85.     UINT                                SupportedSegmentSet;    // [in] New supported segment set, ignored if the same.
  86.     D3DDDI_SEGMENTPREFERENCE            PreferredSegment;       // [in] New preferred segment set, ignored if the same.
  87.     D3DDDI_UPDATEALLOCPROPERTY_FLAGS    Flags;                  // [in] Flags to set on the allocation, ignored if the same.
  88.     UINT64                              PagingFenceValue;       // [out] Paging fence value to synchronize on before using the above allocation.
  89.                                                                 //       This value applies to the monitored fence synchronization
  90.                                                                 //       object associated with hPagingQueue.
  91.     union
  92.     {
  93.         struct
  94.         {                
  95.             UINT SetAccessedPhysically : 1;     // [in] When set to 1, will set AccessedPhysically to new value
  96.             UINT SetSupportedSegmentSet : 1;    // [in] When set to 1, will set SupportedSegmentSet to new value
  97.             UINT SetPreferredSegment : 1;       // [in] When set to 1, will set PreferredSegment to new value
  98.             UINT Reserved : 29;
  99.         };
  100.         UINT PropertyMaskValue;
  101.     };
  102. } D3DDDI_UPDATEALLOCPROPERTY;
  103.  
  104. #endif // (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_1)
  105.  
  106. #if(D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_1)
  107.  
  108. typedef struct D3DDDI_OFFER_FLAGS
  109. {
  110.     union
  111.     {
  112.         struct
  113.         {
  114.             UINT AllowDecommit :  1;
  115.             UINT Reserved      : 31;
  116.         };
  117.         UINT Value;
  118.     };
  119. } D3DDDI_OFFER_FLAGS;
  120.  
  121. #endif // (D3D_UMD_INTERFACE_VERSION >= D3D_UMD_INTERFACE_VERSION_WDDM2_1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement