[Mesa-dev] [PATCH 22/39] st/nine: Implement IPresent version 1.2

Axel Davy axel.davy at ens.fr
Sun May 15 10:45:36 UTC 2016


From: Patrick Rudolph <siro at das-labor.org>

Implement presentation interface version 1.2:
* ID3DPresent_ResolutionMismatch
    Poll for resolution mismatch.
    A third party app might have changed resolution,
    which requires a device reset.
* ID3DPresent_CreateThread
    Create a thread in WINE to allow nine to use Windows API
    functions. Required for multi-threaded presentation.
    In single-threaded presentation mode the calling thread is
    already known to WINE.
* ID3DPresent_WaitForThread
    Wait for a wine thread to terminate.

Signed-off-by: Patrick Rudolph <siro at das-labor.org>
Reviewed-by: Axel Davy <axel.davy at ens.fr>
---
 include/d3dadapter/present.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/include/d3dadapter/present.h b/include/d3dadapter/present.h
index 162f703..187843f 100644
--- a/include/d3dadapter/present.h
+++ b/include/d3dadapter/present.h
@@ -71,6 +71,10 @@ typedef struct ID3DPresentVtbl
     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);
 } ID3DPresentVtbl;
 
 struct ID3DPresent
@@ -99,6 +103,9 @@ struct ID3DPresent
 #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_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)
 
 typedef struct ID3DPresentGroupVtbl
 {
-- 
2.8.2



More information about the mesa-dev mailing list