glx: drop always-true #ifdef
[mesa.git] / include / d3dadapter / present.h
index 08a97297201b0e8e689f5b15afbee4003f716889..0325ebc511fae6196d764cd5ae53ae4d4370f45f 100644 (file)
@@ -35,6 +35,22 @@ typedef struct ID3DPresentGroup ID3DPresentGroup;
 typedef struct ID3DAdapter9 ID3DAdapter9;
 typedef struct D3DWindowBuffer D3DWindowBuffer;
 
+/* Available since version 1.3 */
+typedef struct _D3DPRESENT_PARAMETERS2_ {
+    /* Whether D3DSWAPEFFECT_DISCARD is allowed to release the
+     * D3DWindowBuffers in any order, and eventually with a delay.
+     * FALSE (Default): buffers should be released as soon as possible.
+     * TRUE: it is allowed to release some buffers with a delay, and in
+     * a random order. */
+    BOOL AllowDISCARDDelayedRelease;
+    /* User preference for D3DSWAPEFFECT_DISCARD with D3DPRESENT_INTERVAL_IMMEDIATE.
+     * FALSE (Default): User prefers presentation to occur as soon as possible,
+     * with potential tearings.
+     * TRUE: User prefers presentation to be tear free. Requires
+     * AllowDISCARDDelayedRelease to have any effect. */
+    BOOL TearFreeDISCARD;
+} D3DPRESENT_PARAMETERS2, *PD3DPRESENT_PARAMETERS2, *LPD3DPRESENT_PARAMETERS2;
+
 /* Presentation backend for drivers to display their brilliant work */
 typedef struct ID3DPresentVtbl
 {
@@ -54,7 +70,10 @@ typedef struct ID3DPresentVtbl
     HRESULT (WINAPI *DestroyD3DWindowBuffer)(ID3DPresent *This, D3DWindowBuffer *buffer);
     /* After presenting a buffer to the window system, the buffer
      * may be used as is (no copy of the content) by the window system.
-     * You must not use a non-released buffer, else the user may see undefined content. */
+     * You must not use a non-released buffer, else the user may see undefined content.
+     * Note: This function waits as well that the buffer content was displayed (this
+     * can be after the release of the buffer if the window system decided to make
+     * an internal copy and release early. */
     HRESULT (WINAPI *WaitBufferReleased)(ID3DPresent *This, D3DWindowBuffer *buffer);
     HRESULT (WINAPI *FrontBufferCopy)(ID3DPresent *This, D3DWindowBuffer *buffer);
     /* It is possible to do partial copy, but impossible to do resizing, which must
@@ -69,6 +88,17 @@ typedef struct ID3DPresentVtbl
     HRESULT (WINAPI *SetCursor)(ID3DPresent *This, void *pBitmap, POINT *pHotspot, BOOL bShow);
     HRESULT (WINAPI *SetGammaRamp)(ID3DPresent *This, const D3DGAMMARAMP *pRamp, HWND hWndOverride);
     HRESULT (WINAPI *GetWindowInfo)(ID3DPresent *This,  HWND hWnd, int *width, int *height, int *depth);
+    /* Available since version 1.1 */
+    BOOL (WINAPI *GetWindowOccluded)(ID3DPresent *This);
+    /* Available since version 1.2 */
+    BOOL (WINAPI *ResolutionMismatch)(ID3DPresent *This);
+    HANDLE (WINAPI *CreateThread)(ID3DPresent *This, void *pThreadfunc, void *pParam);
+    BOOL (WINAPI *WaitForThread)(ID3DPresent *This, HANDLE thread);
+    /* Available since version 1.3 */
+    HRESULT (WINAPI *SetPresentParameters2)(ID3DPresent *This, D3DPRESENT_PARAMETERS2 *pParameters);
+    BOOL (WINAPI *IsBufferReleased)(ID3DPresent *This, D3DWindowBuffer *buffer);
+    /* Wait a buffer gets released. */
+    HRESULT (WINAPI *WaitBufferReleaseEvent)(ID3DPresent *This);
 } ID3DPresentVtbl;
 
 struct ID3DPresent
@@ -95,7 +125,14 @@ struct ID3DPresent
 #define ID3DPresent_SetCursorPos(p,a) (p)->lpVtbl->SetCursorPos(p,a)
 #define ID3DPresent_SetCursor(p,a,b,c) (p)->lpVtbl->SetCursor(p,a,b,c)
 #define ID3DPresent_SetGammaRamp(p,a,b) (p)->lpVtbl->SetGammaRamp(p,a,b)
-#define ID3DPresent_GetWindowInfo(p,a,b,c,d) (p)->lpVtbl->GetWindowSize(p,a,b,c,d)
+#define ID3DPresent_GetWindowInfo(p,a,b,c,d) (p)->lpVtbl->GetWindowInfo(p,a,b,c,d)
+#define ID3DPresent_GetWindowOccluded(p) (p)->lpVtbl->GetWindowOccluded(p)
+#define ID3DPresent_ResolutionMismatch(p) (p)->lpVtbl->ResolutionMismatch(p)
+#define ID3DPresent_CreateThread(p,a,b) (p)->lpVtbl->CreateThread(p,a,b)
+#define ID3DPresent_WaitForThread(p,a) (p)->lpVtbl->WaitForThread(p,a)
+#define ID3DPresent_SetPresentParameters2(p,a) (p)->lpVtbl->SetPresentParameters2(p,a)
+#define ID3DPresent_IsBufferReleased(p,a) (p)->lpVtbl->IsBufferReleased(p,a)
+#define ID3DPresent_WaitBufferReleaseEvent(p) (p)->lpVtbl->WaitBufferReleaseEvent(p)
 
 typedef struct ID3DPresentGroupVtbl
 {