Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- .../api-ms-win-dx-d3dkmt-l1-1-0.spec | 2 +- dlls/d3d11/d3d11.spec | 1 + dlls/gdi32/dibdrv/dc.c | 2 ++ dlls/gdi32/driver.c | 22 +++++++++++++++++++ dlls/gdi32/enhmfdrv/dc.c | 1 + dlls/gdi32/enhmfdrv/init.c | 1 + dlls/gdi32/freetype.c | 1 + dlls/gdi32/gdi32.spec | 1 + dlls/gdi32/mfdrv/init.c | 1 + dlls/gdi32/path.c | 1 + dlls/wineandroid.drv/init.c | 1 + dlls/winemac.drv/gdi.c | 1 + dlls/wineps.drv/init.c | 1 + dlls/winex11.drv/init.c | 1 + dlls/winex11.drv/xrender.c | 1 + include/ddk/d3dkmthk.h | 1 + include/wine/gdi_driver.h | 3 ++- 17 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec b/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec index c14ebc68e9..0f68d777f0 100644 --- a/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec +++ b/dlls/api-ms-win-dx-d3dkmt-l1-1-0/api-ms-win-dx-d3dkmt-l1-1-0.spec @@ -5,7 +5,7 @@ @ stub D3DKMTCheckMonitorPowerState @ stub D3DKMTCheckOcclusion @ stub D3DKMTCheckSharedResourceAccess -@ stub D3DKMTCheckVidPnExclusiveOwnership +@ stdcall D3DKMTCheckVidPnExclusiveOwnership(ptr) gdi32.D3DKMTCheckVidPnExclusiveOwnership @ stdcall D3DKMTCloseAdapter(ptr) gdi32.D3DKMTCloseAdapter @ stub D3DKMTConfigureSharedResource @ stub D3DKMTCreateAllocation diff --git a/dlls/d3d11/d3d11.spec b/dlls/d3d11/d3d11.spec index 606ddae3e3..383ed6aa9c 100644 --- a/dlls/d3d11/d3d11.spec +++ b/dlls/d3d11/d3d11.spec @@ -5,6 +5,7 @@ @ stdcall D3D11CreateDevice(ptr long ptr long ptr long long ptr ptr ptr) @ stdcall D3D11CreateDeviceAndSwapChain(ptr long ptr long ptr long long ptr ptr ptr ptr ptr) @ stdcall D3D11On12CreateDevice(ptr long ptr long ptr long long ptr ptr ptr) +@ stdcall D3DKMTCheckVidPnExclusiveOwnership(ptr) gdi32.D3DKMTCheckVidPnExclusiveOwnership @ stdcall D3DKMTCloseAdapter(ptr) gdi32.D3DKMTCloseAdapter @ stub D3DKMTCreateAllocation @ stub D3DKMTCreateContext diff --git a/dlls/gdi32/dibdrv/dc.c b/dlls/gdi32/dibdrv/dc.c index 10c3fc6f69..fe1ef1e0fc 100644 --- a/dlls/gdi32/dibdrv/dc.c +++ b/dlls/gdi32/dibdrv/dc.c @@ -520,6 +520,7 @@ const struct gdi_dc_funcs dib_driver = dibdrv_StrokePath, /* pStrokePath */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ dibdrv_wine_get_wgl_driver, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ @@ -1144,6 +1145,7 @@ static const struct gdi_dc_funcs window_driver = NULL, /* pStrokePath */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ windrv_wine_get_wgl_driver, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c index 71a52ed9fc..9da7ba1734 100644 --- a/dlls/gdi32/driver.c +++ b/dlls/gdi32/driver.c @@ -753,6 +753,11 @@ static BOOL nulldrv_UnrealizePalette( HPALETTE palette ) return FALSE; }
+static NTSTATUS WINAPI nulldrv_D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc ) +{ + return STATUS_PROCEDURE_NOT_FOUND; +} + static NTSTATUS WINAPI nulldrv_D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *desc ) { return STATUS_PROCEDURE_NOT_FOUND; @@ -897,6 +902,7 @@ const struct gdi_dc_funcs null_driver = nulldrv_StrokePath, /* pStrokePath */ nulldrv_UnrealizePalette, /* pUnrealizePalette */ nulldrv_WidenPath, /* pWidenPath */ + nulldrv_D3DKMTCheckVidPnExclusiveOwnership, /* pD3DKMTCheckVidPnExclusiveOwnership */ nulldrv_D3DKMTSetVidPnSourceOwner, /* pD3DKMTSetVidPnSourceOwner */ nulldrv_wine_get_wgl_driver, /* wine_get_wgl_driver */ nulldrv_wine_get_vulkan_driver, /* wine_get_vulkan_driver */ @@ -1473,3 +1479,19 @@ NTSTATUS WINAPI D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *des * released before showing the new window */ return get_display_driver()->pD3DKMTSetVidPnSourceOwner( desc ); } + +/****************************************************************************** + * D3DKMTCheckVidPnExclusiveOwnership [GDI32.@] + */ +NTSTATUS WINAPI D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc ) +{ + TRACE("(%p)\n", desc); + + if (!get_display_driver()->pD3DKMTCheckVidPnExclusiveOwnership) + return STATUS_PROCEDURE_NOT_FOUND; + + if (!desc || !desc->hAdapter) + return STATUS_INVALID_PARAMETER; + + return get_display_driver()->pD3DKMTCheckVidPnExclusiveOwnership( desc ); +} diff --git a/dlls/gdi32/enhmfdrv/dc.c b/dlls/gdi32/enhmfdrv/dc.c index 80e54685c7..450f80f6ba 100644 --- a/dlls/gdi32/enhmfdrv/dc.c +++ b/dlls/gdi32/enhmfdrv/dc.c @@ -950,6 +950,7 @@ static const struct gdi_dc_funcs emfpath_driver = NULL, /* pStrokePath */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ NULL, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ diff --git a/dlls/gdi32/enhmfdrv/init.c b/dlls/gdi32/enhmfdrv/init.c index 6938e45cbd..d13f3b2b9d 100644 --- a/dlls/gdi32/enhmfdrv/init.c +++ b/dlls/gdi32/enhmfdrv/init.c @@ -163,6 +163,7 @@ static const struct gdi_dc_funcs emfdrv_driver = EMFDRV_StrokePath, /* pStrokePath */ NULL, /* pUnrealizePalette */ EMFDRV_WidenPath, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ NULL, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index b571611c13..dceb1fae38 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -9236,6 +9236,7 @@ static const struct gdi_dc_funcs freetype_funcs = NULL, /* pStrokePath */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ NULL, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ diff --git a/dlls/gdi32/gdi32.spec b/dlls/gdi32/gdi32.spec index 597002c9a8..4d71b75d19 100644 --- a/dlls/gdi32/gdi32.spec +++ b/dlls/gdi32/gdi32.spec @@ -80,6 +80,7 @@ @ stdcall CreateScalableFontResourceA(long str str str) @ stdcall CreateScalableFontResourceW(long wstr wstr wstr) @ stdcall CreateSolidBrush(long) +@ stdcall D3DKMTCheckVidPnExclusiveOwnership(ptr) @ stdcall D3DKMTCloseAdapter(ptr) @ stdcall D3DKMTCreateDCFromMemory(ptr) @ stdcall D3DKMTCreateDevice(ptr) diff --git a/dlls/gdi32/mfdrv/init.c b/dlls/gdi32/mfdrv/init.c index fb568f1838..52181cd60f 100644 --- a/dlls/gdi32/mfdrv/init.c +++ b/dlls/gdi32/mfdrv/init.c @@ -226,6 +226,7 @@ static const struct gdi_dc_funcs MFDRV_Funcs = MFDRV_StrokePath, /* pStrokePath */ NULL, /* pUnrealizePalette */ MFDRV_WidenPath, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ NULL, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ diff --git a/dlls/gdi32/path.c b/dlls/gdi32/path.c index 23c0162f64..9a671db46c 100644 --- a/dlls/gdi32/path.c +++ b/dlls/gdi32/path.c @@ -2248,6 +2248,7 @@ const struct gdi_dc_funcs path_driver = NULL, /* pStrokePath */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ NULL, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ diff --git a/dlls/wineandroid.drv/init.c b/dlls/wineandroid.drv/init.c index ec6c689b49..a73b025d4d 100644 --- a/dlls/wineandroid.drv/init.c +++ b/dlls/wineandroid.drv/init.c @@ -411,6 +411,7 @@ static const struct gdi_dc_funcs android_drv_funcs = NULL, /* pStrokePath */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ ANDROID_wine_get_wgl_driver, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ diff --git a/dlls/winemac.drv/gdi.c b/dlls/winemac.drv/gdi.c index 32aeba04b4..5adf86c9de 100644 --- a/dlls/winemac.drv/gdi.c +++ b/dlls/winemac.drv/gdi.c @@ -390,6 +390,7 @@ static const struct gdi_dc_funcs macdrv_funcs = NULL, /* pStrokePath */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ macdrv_wine_get_wgl_driver, /* wine_get_wgl_driver */ macdrv_wine_get_vulkan_driver, /* wine_get_vulkan_driver */ diff --git a/dlls/wineps.drv/init.c b/dlls/wineps.drv/init.c index 2183029058..e82b0c8ee3 100644 --- a/dlls/wineps.drv/init.c +++ b/dlls/wineps.drv/init.c @@ -908,6 +908,7 @@ static const struct gdi_dc_funcs psdrv_funcs = PSDRV_StrokePath, /* pStrokePath */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ NULL, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ diff --git a/dlls/winex11.drv/init.c b/dlls/winex11.drv/init.c index baed875ba5..49d334ef62 100644 --- a/dlls/winex11.drv/init.c +++ b/dlls/winex11.drv/init.c @@ -471,6 +471,7 @@ static const struct gdi_dc_funcs x11drv_funcs = X11DRV_StrokePath, /* pStrokePath */ X11DRV_UnrealizePalette, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ X11DRV_wine_get_wgl_driver, /* wine_get_wgl_driver */ X11DRV_wine_get_vulkan_driver, /* wine_get_vulkan_driver */ diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index e8dbf27c0d..addd0ea1b1 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -2284,6 +2284,7 @@ static const struct gdi_dc_funcs xrender_funcs = NULL, /* pStrokePath */ NULL, /* pUnrealizePalette */ NULL, /* pWidenPath */ + NULL, /* pD3DKMTCheckVidPnExclusiveOwnership */ NULL, /* pD3DKMTSetVidPnSourceOwner */ NULL, /* wine_get_wgl_driver */ NULL, /* wine_get_vulkan_driver */ diff --git a/include/ddk/d3dkmthk.h b/include/ddk/d3dkmthk.h index 05e2e65aea..717fdb3579 100644 --- a/include/ddk/d3dkmthk.h +++ b/include/ddk/d3dkmthk.h @@ -165,6 +165,7 @@ extern "C" { #endif /* __cplusplus */
+NTSTATUS WINAPI D3DKMTCheckVidPnExclusiveOwnership(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc); NTSTATUS WINAPI D3DKMTCloseAdapter(const D3DKMT_CLOSEADAPTER *desc); NTSTATUS WINAPI D3DKMTCreateDevice(D3DKMT_CREATEDEVICE *desc); NTSTATUS WINAPI D3DKMTCreateDCFromMemory(D3DKMT_CREATEDCFROMMEMORY *desc); diff --git a/include/wine/gdi_driver.h b/include/wine/gdi_driver.h index fac25349d1..8ae641b1ee 100644 --- a/include/wine/gdi_driver.h +++ b/include/wine/gdi_driver.h @@ -194,6 +194,7 @@ struct gdi_dc_funcs BOOL (*pStrokePath)(PHYSDEV); BOOL (*pUnrealizePalette)(HPALETTE); BOOL (*pWidenPath)(PHYSDEV); + NTSTATUS (*pD3DKMTCheckVidPnExclusiveOwnership)(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *); NTSTATUS (*pD3DKMTSetVidPnSourceOwner)(const D3DKMT_SETVIDPNSOURCEOWNER *); struct opengl_funcs * (*wine_get_wgl_driver)(PHYSDEV,UINT); const struct vulkan_funcs * (*wine_get_vulkan_driver)(PHYSDEV,UINT); @@ -203,7 +204,7 @@ struct gdi_dc_funcs };
/* increment this when you change the DC function table */ -#define WINE_GDI_DRIVER_VERSION 50 +#define WINE_GDI_DRIVER_VERSION 51
#define GDI_PRIORITY_NULL_DRV 0 /* null driver */ #define GDI_PRIORITY_FONT_DRV 100 /* any font driver */
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=54475
Your paranoid android.
=== debian9 (32 bit report) ===
d3d11: d3d11.c:6111: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0. d3d11.c:17933: Test failed: Got {0x00000001, 0xffffffff, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000000, 0x00000000, 0x00000000} at (0, 0), sub-resource 0.
=== debian9 (32 bit WoW report) ===
d3d11: d3d11.c:6101: Test succeeded inside todo block: Got unexpected PrimitivesStorageNeeded: 0.
=== debian9 (64 bit WoW report) ===
d3d11: d3d11.c:17933: Test failed: Got {0x00000001, 0xffffffff, 0x00000000, 0x00000000}, expected {0x00000001, 0x00000000, 0x00000000, 0x00000000} at (0, 0), sub-resource 0.