include: Add the IDXGISwapChain3 interface.

For cross-compilation of demos. Ideally we'd just depend on the MinGW-w64
headers for these, but we can't depend on those being new enough to include
these interfaces.
This commit is contained in:
Henri Verbeet 2016-09-28 13:38:28 +02:00
parent a8f7602b14
commit 110309b623
8 changed files with 275 additions and 1 deletions

View File

@ -3,7 +3,12 @@ AM_CFLAGS = @VKD3D_CFLAGS@
AM_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/dummy -I$(srcdir)/include/private AM_CPPFLAGS = -I$(srcdir)/include -I$(srcdir)/include/dummy -I$(srcdir)/include/private
widl_headers = \ widl_headers = \
include/d3d12.h include/d3d12.h \
include/dxgi.h \
include/dxgi1_2.h \
include/dxgi1_3.h \
include/dxgi1_4.h \
include/dxgitype.h
vkd3d_public_headers = \ vkd3d_public_headers = \
include/d3d12.h \ include/d3d12.h \
@ -66,6 +71,7 @@ vkd3d_v_widl_ = $(vkd3d_v_widl_@AM_DEFAULT_V@)
vkd3d_v_widl_0 = @echo " WIDL " $@; vkd3d_v_widl_0 = @echo " WIDL " $@;
vkd3d_v_widl_1 = vkd3d_v_widl_1 =
EXTRA_DIST += $(widl_headers) $(widl_headers:.h=.idl)
$(widl_headers): %.h: %.idl $(widl_headers): %.h: %.idl
$(VKD3D_V_WIDL)$(WIDL) -o $@ $< $(VKD3D_V_WIDL)$(WIDL) -o $@ $<

5
include/.gitignore vendored
View File

@ -1,4 +1,9 @@
config.h config.h
config.h.in config.h.in
d3d12.h d3d12.h
dxgi.h
dxgi1_2.h
dxgi1_3.h
dxgi1_4.h
dxgitype.h
stamp-h1 stamp-h1

84
include/dxgi.idl Normal file
View File

@ -0,0 +1,84 @@
/*
* Copyright 2016 Józef Kucia for CodeWeavers
* Copyright 2016 Henri Verbeet for CodeWeavers
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
import "dxgitype.idl";
#include "unknown.idl"
typedef enum DXGI_MODE_ROTATION
{
DXGI_MODE_ROTATION_UNSPECIFIED = 0x0,
DXGI_MODE_ROTATION_IDENTITY = 0x1,
DXGI_MODE_ROTATION_ROTATE90 = 0x2,
DXGI_MODE_ROTATION_ROTATE180 = 0x3,
DXGI_MODE_ROTATION_ROTATE270 = 0x4,
} DXGI_MODE_ROTATION;
interface IDXGIOutput;
typedef struct DXGI_SWAP_CHAIN_DESC DXGI_SWAP_CHAIN_DESC;
typedef struct DXGI_FRAME_STATISTICS DXGI_FRAME_STATISTICS;
[
local,
object,
uuid(aec22fb8-76f3-4639-9be0-28eb43a67a2e),
pointer_default(unique)
]
interface IDXGIObject : IUnknown
{
HRESULT SetPrivateData(REFGUID name, UINT data_size, const void *data);
HRESULT GetPrivateDataInterface(REFGUID name, const IUnknown *unknown);
HRESULT GetPrivateData(REFGUID name, UINT *data_size, void *data);
HRESULT GetParent(REFIID riid, void **parent);
};
[
local,
object,
uuid(3d3e0379-f9de-4d58-bb6c-18d62992f1a6),
pointer_default(unique)
]
interface IDXGIDeviceSubObject : IDXGIObject
{
HRESULT GetDevice(REFIID riid, void **device);
};
[
local,
object,
uuid(310d36a0-d2e7-4c0a-aa04-6a9d23b8886a),
pointer_default(unique)
]
interface IDXGISwapChain : IDXGIDeviceSubObject
{
HRESULT Present(UINT sync_interval, UINT flags);
HRESULT GetBuffer(UINT buffer_idx, REFIID riid, void **surface);
HRESULT SetFullscreenState(BOOL fullscreen, IDXGIOutput *target);
HRESULT GetFullscreenState(BOOL *fullscreen, IDXGIOutput **target);
HRESULT GetDesc(DXGI_SWAP_CHAIN_DESC *desc);
HRESULT ResizeBuffers(const DXGI_MODE_DESC *desc);
HRESULT ResizeTarget(const DXGI_MODE_DESC *desc);
HRESULT GetContainingOutput(IDXGIOutput **output);
HRESULT GetFrameStatistics(DXGI_FRAME_STATISTICS *stats);
HRESULT GetLastPresentCount(UINT *last_present_count);
};

49
include/dxgi1_2.idl Normal file
View File

@ -0,0 +1,49 @@
/*
* Copyright 2016 Józef Kucia for CodeWeavers
* Copyright 2016 Henri Verbeet for CodeWeavers
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
import "dxgi.idl";
typedef struct DXGI_SWAP_CHAIN_DESC1 DXGI_SWAP_CHAIN_DESC1;
typedef struct DXGI_SWAP_CHAIN_FULLSCREEN_DESC DXGI_SWAP_CHAIN_FULLSCREEN_DESC;
typedef struct DXGI_PRESENT_PARAMETERS DXGI_PRESENT_PARAMETERS;
[
local,
object,
uuid(790a45f7-0d42-4876-983a-0a55cfe6f4aa),
pointer_default(unique)
]
interface IDXGISwapChain1 : IDXGISwapChain
{
HRESULT GetDesc1(DXGI_SWAP_CHAIN_DESC1 *desc);
HRESULT GetFullscreenDesc(DXGI_SWAP_CHAIN_FULLSCREEN_DESC *desc);
HRESULT GetHwnd(HWND *hwnd);
HRESULT GetCoreWindow(REFIID riid, void **object);
HRESULT Present1(UINT sync_interval, UINT flags, const DXGI_PRESENT_PARAMETERS *parameters);
BOOL IsTemporaryMonoSupported();
HRESULT GetRestrictToOutput(IDXGIOutput **output);
HRESULT SetBackgroundColor(const DXGI_RGBA *color);
HRESULT GetBackgroundColor(DXGI_RGBA *color);
HRESULT SetRotation(DXGI_MODE_ROTATION rotation);
HRESULT GetRotation(DXGI_MODE_ROTATION *rotation);
};

43
include/dxgi1_3.idl Normal file
View File

@ -0,0 +1,43 @@
/*
* Copyright 2016 Józef Kucia for CodeWeavers
* Copyright 2016 Henri Verbeet for CodeWeavers
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
import "dxgi1_2.idl";
typedef struct DXGI_MATRIX_3X2_F DXGI_MATRIX_3X2_F;
[
local,
object,
uuid(a8be2ac4-199f-4946-b331-79599fb98de7),
pointer_default(unique)
]
interface IDXGISwapChain2 : IDXGISwapChain1
{
HRESULT SetSourceSize(UINT width, UINT height);
HRESULT GetSourceSize(UINT *width, UINT *height);
HRESULT SetMaximumFrameLatency(UINT latency);
HRESULT GetMaximumFrameLatency(UINT *latency);
HANDLE GetFrameLatencyWaitableObject();
HRESULT SetMatrixTransform(const DXGI_MATRIX_3X2_F *matrix);
HRESULT GetMatrixTransform(DXGI_MATRIX_3X2_F *matrix);
};

39
include/dxgi1_4.idl Normal file
View File

@ -0,0 +1,39 @@
/*
* Copyright 2016 Józef Kucia for CodeWeavers
* Copyright 2016 Henri Verbeet for CodeWeavers
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
import "dxgi1_3.idl";
[
local,
object,
uuid(94d99bdb-f1f8-4ab0-b236-7da0170edab1),
pointer_default(unique)
]
interface IDXGISwapChain3 : IDXGISwapChain2
{
UINT GetCurrentBackBufferIndex();
HRESULT CheckColorSpaceSupport(DXGI_COLOR_SPACE_TYPE type, UINT *support);
HRESULT SetColorSpace1(DXGI_COLOR_SPACE_TYPE type);
HRESULT ResizeBuffers1(UINT buffer_count, UINT width, UINT height, DXGI_FORMAT format,
UINT flags, const UINT *node_mask, IUnknown *const *present_queue);
};

45
include/dxgitype.idl Normal file
View File

@ -0,0 +1,45 @@
/*
* Copyright 2016 Józef Kucia for CodeWeavers
* Copyright 2016 Henri Verbeet for CodeWeavers
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
import "vkd3d_windows.h";
import "dxgibase.h";
typedef enum DXGI_COLOR_SPACE_TYPE
{
DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709 = 0x0,
DXGI_COLOR_SPACE_RGB_FULL_G10_NONE_P709 = 0x1,
DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P709 = 0x2,
DXGI_COLOR_SPACE_RGB_STUDIO_G22_NONE_P2020 = 0x3,
DXGI_COLOR_SPACE_RESERVED = 0x4,
DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601 = 0x5,
DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601 = 0x6,
DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601 = 0x7,
DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709 = 0x8,
DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709 = 0x9,
DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020 = 0xa,
DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020 = 0xb,
DXGI_COLOR_SPACE_CUSTOM = 0xffffffff,
} DXGI_COLOR_SPACE_TYPE;
typedef struct _D3DCOLORVALUE D3DCOLORVALUE, DXGI_RGBA;
typedef struct DXGI_MODE_DESC DXGI_MODE_DESC;

View File

@ -30,6 +30,9 @@ typedef IID *REFGUID;
cpp_quote("#endif") cpp_quote("#endif")
cpp_quote("#if !defined(_WIN32)") cpp_quote("#if !defined(_WIN32)")
typedef void *HWND;
typedef void *HMODULE;
typedef struct LUID typedef struct LUID
{ {
DWORD LowPart; DWORD LowPart;