gdi32: Add D3DKMTSetVidPnSourceOwner and D3DKMTCheckVidPnExclusiveOwnership stubs.
D3DKMTSetVidPnSourceOwner needs to be implemented in the graphics drivers because we need to maintain the VidPN source ownership information list in the graphics drivers. For example, the graphics drivers need to release the exclusive ownership when a new window is moved to a monitor which has been taken exclusive ownership. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
95c66d690f
commit
354359197b
|
@ -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
|
||||
|
@ -82,7 +82,7 @@
|
|||
@ stub D3DKMTSetProcessSchedulingPriorityClass
|
||||
@ stub D3DKMTSetQueuedLimit
|
||||
@ stub D3DKMTSetStereoEnabled
|
||||
@ stub D3DKMTSetVidPnSourceOwner
|
||||
@ stdcall D3DKMTSetVidPnSourceOwner(ptr) gdi32.D3DKMTSetVidPnSourceOwner
|
||||
@ stub D3DKMTShareObjects
|
||||
@ stub D3DKMTSharedPrimaryLockNotification
|
||||
@ stub D3DKMTSharedPrimaryUnLockNotification
|
||||
|
|
|
@ -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
|
||||
|
@ -35,7 +36,7 @@
|
|||
@ stub D3DKMTSetDisplayMode
|
||||
@ stub D3DKMTSetDisplayPrivateDriverFormat
|
||||
@ stub D3DKMTSetGammaRamp
|
||||
@ stub D3DKMTSetVidPnSourceOwner
|
||||
@ stdcall D3DKMTSetVidPnSourceOwner(ptr) gdi32.D3DKMTSetVidPnSourceOwner
|
||||
@ stub D3DKMTSignalSynchronizationObject
|
||||
@ stub D3DKMTUnlock
|
||||
@ stub D3DKMTWaitForSynchronizationObject
|
||||
|
|
|
@ -520,6 +520,8 @@ 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 */
|
||||
GDI_PRIORITY_DIB_DRV /* priority */
|
||||
|
@ -1143,6 +1145,8 @@ 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 */
|
||||
GDI_PRIORITY_DIB_DRV + 10 /* priority */
|
||||
|
|
|
@ -753,6 +753,16 @@ static BOOL CDECL nulldrv_UnrealizePalette( HPALETTE palette )
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static NTSTATUS CDECL nulldrv_D3DKMTCheckVidPnExclusiveOwnership( const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *desc )
|
||||
{
|
||||
return STATUS_PROCEDURE_NOT_FOUND;
|
||||
}
|
||||
|
||||
static NTSTATUS CDECL nulldrv_D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *desc )
|
||||
{
|
||||
return STATUS_PROCEDURE_NOT_FOUND;
|
||||
}
|
||||
|
||||
static struct opengl_funcs * CDECL nulldrv_wine_get_wgl_driver( PHYSDEV dev, UINT version )
|
||||
{
|
||||
return (void *)-1;
|
||||
|
@ -892,6 +902,8 @@ 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 */
|
||||
|
||||
|
@ -1422,6 +1434,7 @@ NTSTATUS WINAPI D3DKMTCreateDevice( D3DKMT_CREATEDEVICE *desc )
|
|||
NTSTATUS WINAPI D3DKMTDestroyDevice( const D3DKMT_DESTROYDEVICE *desc )
|
||||
{
|
||||
NTSTATUS status = STATUS_INVALID_PARAMETER;
|
||||
D3DKMT_SETVIDPNSOURCEOWNER set_owner_desc;
|
||||
struct d3dkmt_device *device;
|
||||
|
||||
TRACE("(%p)\n", desc);
|
||||
|
@ -1434,6 +1447,9 @@ NTSTATUS WINAPI D3DKMTDestroyDevice( const D3DKMT_DESTROYDEVICE *desc )
|
|||
{
|
||||
if (device->handle == desc->hDevice)
|
||||
{
|
||||
memset( &set_owner_desc, 0, sizeof(set_owner_desc) );
|
||||
set_owner_desc.hDevice = desc->hDevice;
|
||||
D3DKMTSetVidPnSourceOwner( &set_owner_desc );
|
||||
list_remove( &device->entry );
|
||||
heap_free( device );
|
||||
status = STATUS_SUCCESS;
|
||||
|
@ -1453,3 +1469,39 @@ NTSTATUS WINAPI D3DKMTQueryStatistics(D3DKMT_QUERYSTATISTICS *stats)
|
|||
FIXME("(%p): stub\n", stats);
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/******************************************************************************
|
||||
* D3DKMTSetVidPnSourceOwner [GDI32.@]
|
||||
*/
|
||||
NTSTATUS WINAPI D3DKMTSetVidPnSourceOwner( const D3DKMT_SETVIDPNSOURCEOWNER *desc )
|
||||
{
|
||||
TRACE("(%p)\n", desc);
|
||||
|
||||
if (!get_display_driver()->pD3DKMTSetVidPnSourceOwner)
|
||||
return STATUS_PROCEDURE_NOT_FOUND;
|
||||
|
||||
if (!desc || !desc->hDevice || (desc->VidPnSourceCount && (!desc->pType || !desc->pVidPnSourceId)))
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
|
||||
/* Store the VidPN source ownership info in the graphics driver because
|
||||
* the graphics driver needs to change ownership sometimes. For example,
|
||||
* when a new window is moved to a VidPN source with an exclusive owner,
|
||||
* such an exclusive owner will be 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 );
|
||||
}
|
||||
|
|
|
@ -950,6 +950,8 @@ 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 */
|
||||
GDI_PRIORITY_PATH_DRV + 1 /* priority */
|
||||
|
|
|
@ -163,6 +163,8 @@ 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 */
|
||||
GDI_PRIORITY_GRAPHICS_DRV /* priority */
|
||||
|
|
|
@ -9274,6 +9274,8 @@ 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 */
|
||||
GDI_PRIORITY_FONT_DRV /* priority */
|
||||
|
|
|
@ -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)
|
||||
|
@ -89,6 +90,7 @@
|
|||
@ stdcall D3DKMTOpenAdapterFromGdiDisplayName(ptr)
|
||||
@ stdcall D3DKMTOpenAdapterFromHdc(ptr)
|
||||
@ stdcall D3DKMTQueryStatistics(ptr)
|
||||
@ stdcall D3DKMTSetVidPnSourceOwner(ptr)
|
||||
@ stdcall DPtoLP(long ptr long)
|
||||
@ stdcall DeleteColorSpace(long)
|
||||
@ stdcall DeleteDC(long)
|
||||
|
|
|
@ -226,6 +226,8 @@ 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 */
|
||||
GDI_PRIORITY_GRAPHICS_DRV /* priority */
|
||||
|
|
|
@ -2248,6 +2248,8 @@ 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 */
|
||||
GDI_PRIORITY_PATH_DRV /* priority */
|
||||
|
|
|
@ -411,6 +411,8 @@ 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 */
|
||||
GDI_PRIORITY_GRAPHICS_DRV /* priority */
|
||||
|
|
|
@ -390,6 +390,8 @@ 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 */
|
||||
GDI_PRIORITY_GRAPHICS_DRV /* priority */
|
||||
|
|
|
@ -904,6 +904,8 @@ 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 */
|
||||
GDI_PRIORITY_GRAPHICS_DRV /* priority */
|
||||
|
|
|
@ -471,6 +471,8 @@ 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 */
|
||||
GDI_PRIORITY_GRAPHICS_DRV /* priority */
|
||||
|
|
|
@ -2282,6 +2282,8 @@ 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 */
|
||||
GDI_PRIORITY_GRAPHICS_DRV + 10 /* priority */
|
||||
|
|
|
@ -602,6 +602,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);
|
||||
|
@ -609,6 +610,7 @@ NTSTATUS WINAPI D3DKMTDestroyDCFromMemory(const D3DKMT_DESTROYDCFROMMEMORY *desc
|
|||
NTSTATUS WINAPI D3DKMTDestroyDevice(const D3DKMT_DESTROYDEVICE *desc);
|
||||
NTSTATUS WINAPI D3DKMTOpenAdapterFromGdiDisplayName(D3DKMT_OPENADAPTERFROMGDIDISPLAYNAME *desc);
|
||||
NTSTATUS WINAPI D3DKMTQueryStatistics(D3DKMT_QUERYSTATISTICS *stats);
|
||||
NTSTATUS WINAPI D3DKMTSetVidPnSourceOwner(const D3DKMT_SETVIDPNSOURCEOWNER *desc);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -773,9 +773,11 @@ typedef struct _DDPIXELFORMAT {
|
|||
/* 20: next structure */
|
||||
} DDPIXELFORMAT,*LPDDPIXELFORMAT;
|
||||
|
||||
#ifndef MAKEFOURCC
|
||||
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \
|
||||
((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | \
|
||||
((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 ))
|
||||
#endif
|
||||
|
||||
/* DDCAPS.dwFXCaps */
|
||||
#define DDFXCAPS_BLTALPHA 0x00000001
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
#ifndef __WINE_WINE_GDI_DRIVER_H
|
||||
#define __WINE_WINE_GDI_DRIVER_H
|
||||
|
||||
#include "winternl.h"
|
||||
#include "ddk/d3dkmthk.h"
|
||||
#include "wine/list.h"
|
||||
|
||||
struct gdi_dc_funcs;
|
||||
|
@ -192,6 +194,8 @@ struct gdi_dc_funcs
|
|||
BOOL (CDECL *pStrokePath)(PHYSDEV);
|
||||
BOOL (CDECL *pUnrealizePalette)(HPALETTE);
|
||||
BOOL (CDECL *pWidenPath)(PHYSDEV);
|
||||
NTSTATUS (CDECL *pD3DKMTCheckVidPnExclusiveOwnership)(const D3DKMT_CHECKVIDPNEXCLUSIVEOWNERSHIP *);
|
||||
NTSTATUS (CDECL *pD3DKMTSetVidPnSourceOwner)(const D3DKMT_SETVIDPNSOURCEOWNER *);
|
||||
struct opengl_funcs * (CDECL *wine_get_wgl_driver)(PHYSDEV,UINT);
|
||||
const struct vulkan_funcs * (CDECL *wine_get_vulkan_driver)(PHYSDEV,UINT);
|
||||
|
||||
|
@ -200,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 */
|
||||
|
|
Loading…
Reference in New Issue