[PATCH 1/2] include/dxgi1_6.idl: Add IDXGIFactory6 and IDXGIFactory7.

Zhiyi Zhang zzhang at codeweavers.com
Tue May 12 22:13:18 CDT 2020



On 5/13/20 8:08 AM, Philip Rebohle wrote:
> Signed-off-by: Philip Rebohle <philip.rebohle at tu-dortmund.de>
> ---
>  include/dxgi1_6.idl | 40 ++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 40 insertions(+)
>
> diff --git a/include/dxgi1_6.idl b/include/dxgi1_6.idl
> index 9dcf9f26b46..9f6d947da28 100644
> --- a/include/dxgi1_6.idl
> +++ b/include/dxgi1_6.idl
> @@ -34,6 +34,13 @@ typedef enum DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS
>      DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAG_CURSOR_STRETCHED = 0x4,
>  } DXGI_HARDWARE_COMPOSITION_SUPPORT_FLAGS;
>  
> +typedef enum DXGI_GPU_PREFERENCE
> +{
> +    DXGI_GPU_PREFERENCE_UNSPECIFIED = 0,
> +    DXGI_GPU_PREFERENCE_MINIMUM_POWER = 1,
> +    DXGI_GPU_PREFERENCE_HIGH_PERFORMANCE = 2,
> +} DXGI_GPU_PREFERENCE;
> +
>  typedef struct DXGI_ADAPTER_DESC3
>  {
>      WCHAR Description[128];
> @@ -96,3 +103,36 @@ interface IDXGIOutput6 : IDXGIOutput5
>          [out] UINT *flags
>      );
>  }
> +
> +[
> +    object,
> +    uuid(c1b6694f-ff09-44a9-b03c-77900a0a1d17),
> +    local,
> +    pointer_default(unique)
> +]
> +interface IDXGIFactory6 : IDXGIFactory5
> +{
> +    HRESULT EnumAdapterByGpuPreference(
> +        [in] UINT adapter_idx,
> +        [in] DXGI_GPU_PREFERENCE gpu_preference,
> +        [in] REFIID iid,
> +        [out] void** idx
Typo here. idx should be adapter.
> +    );
> +}
> +
> +[
> +    object,
> +    uuid(a4966eed-76db-44da-84c1-ee9a7afb20a8),
> +    local,
> +    pointer_default(unique)
> +]
> +interface IDXGIFactory7 : IDXGIFactory6
> +{
> +    HRESULT RegisterAdaptersChangedEvent(
> +        [in] HANDLE event,
> +        [out] DWORD *cookie
> +    );
> +    HRESULT UnregisterAdaptersChangedEvent(
> +        [in] DWORD cookie
> +    );
> +}
Even though this is a small patch. It would be better to split it to add IDXGIFactory6 and IDXGIFactory7 separately.



More information about the wine-devel mailing list