CommonLibSSE (powerof3)
DXGI_3.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "REX/W32/DXGI_2.h"
4 
5 namespace REX::W32
6 {
7  struct IDXGIDecodeSwapChain;
8  struct IDXGIDevice3;
9  struct IDXGIFactory3;
10  struct IDXGIFactoryMedia;
11  struct IDXGIOutput2;
12  struct IDXGIOutput3;
13  struct IDXGISwapChain2;
14  struct IDXGISwapChainMedia;
15 }
16 
17 namespace REX::W32
18 {
20  {
25  };
26 
28  {
32  };
33 
35  {
38  };
39 }
40 
41 namespace REX::W32
42 {
44  {
45  std::uint32_t flags;
46  };
47 
49  {
50  std::uint32_t presentCount;
51  std::uint32_t presentRefreshCount;
52  std::uint32_t syncRefreshCount;
53  std::int64_t syncQPCTime;
54  std::int64_t syncGPUTime;
56  std::uint32_t approvedPresentDuration;
57  };
58 
60  {
61  float _11;
62  float _12;
63  float _21;
64  float _22;
65  float _31;
66  float _32;
67  };
68 }
69 
70 namespace REX::W32
71 {
72  struct __declspec(novtable, uuid("2633066B-4514-4C7A-8FD8-12EA98059D18"))
73  IDXGIDecodeSwapChain : public IUnknown
74  {
75  virtual HRESULT PresentBuffer(std::uint32_t a_bufferToPresent, std::uint32_t a_syncInterval, std::uint32_t a_flags) = 0;
76  virtual HRESULT SetSourceRect(const RECT* a_rect) = 0;
77  virtual HRESULT SetTargetRect(const RECT* a_rect) = 0;
78  virtual HRESULT SetDestSize(std::uint32_t a_width, std::uint32_t a_height) = 0;
79  virtual HRESULT GetSourceRect(RECT* a_rect) = 0;
80  virtual HRESULT GetTargetRect(RECT* a_rect) = 0;
81  virtual HRESULT GetDestSize(std::uint32_t* a_width, std::uint32_t* a_height) = 0;
82  virtual HRESULT SetColorSpace(DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS a_colorSpace) = 0;
83  virtual DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS GetColorSpace(void) = 0;
84  };
85 
86  struct __declspec(novtable, uuid("6007896C-3244-4AFD-BF18-A6D3BEDA5023"))
87  IDXGIDevice3 : public IDXGIDevice2
88  {
89  virtual void Trim(void) = 0;
90  };
91 
92  struct __declspec(novtable, uuid("25483823-CD46-4C7D-86CA-47AA95B837BD"))
93  IDXGIFactory3 : public IDXGIFactory2
94  {
95  virtual std::uint32_t GetCreationFlags(void) = 0;
96  };
97 
98  struct __declspec(novtable, uuid("41E7D1F2-A591-4F7B-A2E5-FA9C843E1C12"))
99  IDXGIFactoryMedia : public IUnknown
100  {
101  virtual HRESULT CreateSwapChainForCompositionSurfaceHandle(IUnknown* a_device, HANDLE a_surface, const DXGI_SWAP_CHAIN_DESC1* a_desc, IDXGIOutput* a_restrictToOutput, IDXGISwapChain1** a_swapChain) = 0;
102  virtual HRESULT CreateDecodeSwapChainForCompositionSurfaceHandle(IUnknown* a_device, HANDLE a_surface, DXGI_DECODE_SWAP_CHAIN_DESC* a_desc, IDXGIResource* a_yuvDecodeBuffers, IDXGIOutput* a_restrictToOutput, IDXGIDecodeSwapChain** a_swapChain) = 0;
103  };
104 
105  struct __declspec(novtable, uuid("595E39D1-2724-4663-99B1-DA969DE28364"))
106  IDXGIOutput2 : public IDXGIOutput1
107  {
108  virtual BOOL SupportsOverlays(void) = 0;
109  };
110 
111  struct __declspec(novtable, uuid("8A6BB301-7E7E-41F4-A8E0-5B32F7F99B18"))
112  IDXGIOutput3 : public IDXGIOutput2
113  {
114  virtual HRESULT CheckOverlaySupport(DXGI_FORMAT a_enumFormat, IUnknown* a_concernedDevice, std::uint32_t* a_flags) = 0;
115  };
116 
117  struct __declspec(novtable, uuid("A8BE2AC4-199F-4946-B331-79599FB98DE7"))
118  IDXGISwapChain2 : public IDXGISwapChain1
119  {
120  virtual HRESULT SetSourceSize(std::uint32_t a_width, std::uint32_t a_height) = 0;
121  virtual HRESULT GetSourceSize(std::uint32_t* a_width, std::uint32_t* a_height) = 0;
122  virtual HRESULT SetMaximumFrameLatency(std::uint32_t a_maxLatency) = 0;
123  virtual HRESULT GetMaximumFrameLatency(std::uint32_t* a_maxLatency) = 0;
124  virtual HANDLE GetFrameLatencyWaitableObject(void) = 0;
125  virtual HRESULT SetMatrixTransform(const DXGI_MATRIX_3X2_F* a_matrix) = 0;
126  virtual HRESULT GetMatrixTransform(DXGI_MATRIX_3X2_F* a_matrix) = 0;
127  };
128 
129  struct __declspec(novtable, uuid("DD95B90B-F05F-4F6A-BD65-25BFB264BD84"))
130  IDXGISwapChainMedia : public IUnknown
131  {
132  virtual HRESULT GetFrameStatisticsMedia(DXGI_FRAME_STATISTICS_MEDIA* a_stats) = 0;
133  virtual HRESULT SetPresentDuration(std::uint32_t a_duration) = 0;
134  virtual HRESULT CheckPresentDurationSupport(std::uint32_t a_desiredPresentDuration, std::uint32_t* a_closestSmallerPresentDuration, std::uint32_t* a_closestLargerPresentDuration) = 0;
135  };
136 }
137 
138 namespace REX::W32
139 {
140  inline constexpr IID IID_IDXGIDecodeSwapChain{ 0x2633066B, 0x4514, 0x4C7A, { 0x8F, 0xD8, 0x12, 0xEA, 0x98, 0x05, 0x9D, 0x18 } };
141  inline constexpr IID IID_IDXGIDevice3{ 0x6007896C, 0x3244, 0x4AFD, { 0xBF, 0x18, 0xA6, 0xD3, 0xBE, 0xDA, 0x50, 0x23 } };
142  inline constexpr IID IID_IDXGIFactory3{ 0x25483823, 0xCD46, 0x4C7D, { 0x86, 0xCA, 0x47, 0xAA, 0x95, 0xB8, 0x37, 0xBD } };
143  inline constexpr IID IID_IDXGIFactoryMedia{ 0x41E7D1F2, 0xA591, 0x4F7B, { 0xA2, 0xE5, 0xFA, 0x9C, 0x84, 0x3E, 0x1C, 0x12 } };
144  inline constexpr IID IID_IDXGIOutput2{ 0x595E39D1, 0x2724, 0x4663, { 0x99, 0xB1, 0xDA, 0x96, 0x9D, 0xE2, 0x83, 0x64 } };
145  inline constexpr IID IID_IDXGIOutput3{ 0x8A6BB301, 0x7E7E, 0x41F4, { 0xA8, 0xE0, 0x5B, 0x32, 0xF7, 0xF9, 0x9B, 0x18 } };
146  inline constexpr IID IID_IDXGISwapChain2{ 0xA8BE2AC4, 0x199F, 0x4946, { 0xB3, 0x31, 0x79, 0x59, 0x9F, 0xB9, 0x8D, 0xE7 } };
147  inline constexpr IID IID_IDXGISwapChainMedia{ 0xDD95B90B, 0xF05F, 0x4F6A, { 0xBD, 0x65, 0x25, 0xBF, 0xB2, 0x64, 0xBD, 0x84 } };
148 }
Definition: BSDirectInputManager.h:8
void * HANDLE
Definition: BASE.h:14
struct __declspec(novtable, uuid("00000000-0000-0000-c000-000000000046")) IUnknown
Definition: COM.h:7
DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS
Definition: DXGI_3.h:28
@ DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_xvYCC
Definition: DXGI_3.h:31
@ DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_NOMINAL_RANGE
Definition: DXGI_3.h:29
@ DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAG_BT709
Definition: DXGI_3.h:30
std::int32_t BOOL
Definition: BASE.h:13
DXGI_FRAME_PRESENTATION_MODE
Definition: DXGI_3.h:20
@ DXGI_FRAME_PRESENTATION_MODE_OVERLAY
Definition: DXGI_3.h:22
@ DXGI_FRAME_PRESENTATION_MODE_COMPOSED
Definition: DXGI_3.h:21
@ DXGI_FRAME_PRESENTATION_MODE_COMPOSITION_FAILURE
Definition: DXGI_3.h:24
@ DXGI_FRAME_PRESENTATION_MODE_NONE
Definition: DXGI_3.h:23
constexpr IID IID_IDXGISwapChain2
Definition: DXGI_3.h:146
constexpr IID IID_IDXGIFactory3
Definition: DXGI_3.h:142
constexpr IID IID_IDXGISwapChainMedia
Definition: DXGI_3.h:147
constexpr IID IID_IDXGIOutput2
Definition: DXGI_3.h:144
DXGI_FORMAT
Definition: DXGI.h:63
constexpr IID IID_IDXGIDecodeSwapChain
Definition: DXGI_3.h:140
std::int32_t HRESULT
Definition: BASE.h:28
DXGI_OVERLAY_SUPPORT_FLAG
Definition: DXGI_3.h:35
@ DXGI_OVERLAY_SUPPORT_FLAG_SCALING
Definition: DXGI_3.h:37
@ DXGI_OVERLAY_SUPPORT_FLAG_DIRECT
Definition: DXGI_3.h:36
constexpr IID IID_IDXGIDevice3
Definition: DXGI_3.h:141
constexpr IID IID_IDXGIOutput3
Definition: DXGI_3.h:145
constexpr IID IID_IDXGIFactoryMedia
Definition: DXGI_3.h:143
std::uint32_t flags
Definition: DXGI_3.h:45
std::uint32_t presentRefreshCount
Definition: DXGI_3.h:51
std::uint32_t syncRefreshCount
Definition: DXGI_3.h:52
DXGI_FRAME_PRESENTATION_MODE compositionMode
Definition: DXGI_3.h:55
std::int64_t syncQPCTime
Definition: DXGI_3.h:53
std::uint32_t presentCount
Definition: DXGI_3.h:50
std::uint32_t approvedPresentDuration
Definition: DXGI_3.h:56
std::int64_t syncGPUTime
Definition: DXGI_3.h:54
Definition: DXGI_3.h:60
float _12
Definition: DXGI_3.h:62
float _21
Definition: DXGI_3.h:63
float _32
Definition: DXGI_3.h:66
float _22
Definition: DXGI_3.h:64
float _11
Definition: DXGI_3.h:61
float _31
Definition: DXGI_3.h:65
Definition: BASE.h:63