Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
fbfc8df4
Commit
fbfc8df4
authored
Apr 10, 2024
by
Brendan Shanks
Committed by
Alexandre Julliard
Apr 18, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Add IDXGISwapChain4 stubs for D3D11.
Microsoft Flight Simulator (2020) requires IDXGISwapChain4.
parent
3c3bfbfd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
71 deletions
+84
-71
device.c
dlls/dxgi/device.c
+1
-1
dxgi_private.h
dlls/dxgi/dxgi_private.h
+1
-1
swapchain.c
dlls/dxgi/swapchain.c
+82
-69
No files found.
dlls/dxgi/device.c
View file @
fbfc8df4
...
...
@@ -470,7 +470,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX
TRACE
(
"Created swapchain %p.
\n
"
,
object
);
*
swapchain
=
(
IDXGISwapChain1
*
)
&
object
->
IDXGISwapChain
3
_iface
;
*
swapchain
=
(
IDXGISwapChain1
*
)
&
object
->
IDXGISwapChain
4
_iface
;
return
S_OK
;
}
...
...
dlls/dxgi/dxgi_private.h
View file @
fbfc8df4
...
...
@@ -172,7 +172,7 @@ struct dxgi_adapter *unsafe_impl_from_IDXGIAdapter(IDXGIAdapter *iface);
/* IDXGISwapChain */
struct
d3d11_swapchain
{
IDXGISwapChain
3
IDXGISwapChain3
_iface
;
IDXGISwapChain
4
IDXGISwapChain4
_iface
;
LONG
refcount
;
struct
wined3d_private_store
private_store
;
struct
wined3d_swapchain
*
wined3d_swapchain
;
...
...
dlls/dxgi/swapchain.c
View file @
fbfc8df4
...
...
@@ -180,14 +180,14 @@ static HWND d3d11_swapchain_get_hwnd(struct d3d11_swapchain *swapchain)
return
wined3d_desc
.
device_window
;
}
static
inline
struct
d3d11_swapchain
*
d3d11_swapchain_from_IDXGISwapChain
3
(
IDXGISwapChain3
*
iface
)
static
inline
struct
d3d11_swapchain
*
d3d11_swapchain_from_IDXGISwapChain
4
(
IDXGISwapChain4
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
struct
d3d11_swapchain
,
IDXGISwapChain
3
_iface
);
return
CONTAINING_RECORD
(
iface
,
struct
d3d11_swapchain
,
IDXGISwapChain
4
_iface
);
}
/* IUnknown methods */
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_QueryInterface
(
IDXGISwapChain
3
*
iface
,
REFIID
riid
,
void
**
object
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_QueryInterface
(
IDXGISwapChain
4
*
iface
,
REFIID
riid
,
void
**
object
)
{
TRACE
(
"iface %p, riid %s, object %p
\n
"
,
iface
,
debugstr_guid
(
riid
),
object
);
...
...
@@ -197,7 +197,8 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_QueryInterface(IDXGISwapChain3
||
IsEqualGUID
(
riid
,
&
IID_IDXGISwapChain
)
||
IsEqualGUID
(
riid
,
&
IID_IDXGISwapChain1
)
||
IsEqualGUID
(
riid
,
&
IID_IDXGISwapChain2
)
||
IsEqualGUID
(
riid
,
&
IID_IDXGISwapChain3
))
||
IsEqualGUID
(
riid
,
&
IID_IDXGISwapChain3
)
||
IsEqualGUID
(
riid
,
&
IID_IDXGISwapChain4
))
{
IUnknown_AddRef
(
iface
);
*
object
=
iface
;
...
...
@@ -210,9 +211,9 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_QueryInterface(IDXGISwapChain3
return
E_NOINTERFACE
;
}
static
ULONG
STDMETHODCALLTYPE
d3d11_swapchain_AddRef
(
IDXGISwapChain
3
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d11_swapchain_AddRef
(
IDXGISwapChain
4
*
iface
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
swapchain
->
refcount
);
TRACE
(
"%p increasing refcount to %lu.
\n
"
,
swapchain
,
refcount
);
...
...
@@ -223,9 +224,9 @@ static ULONG STDMETHODCALLTYPE d3d11_swapchain_AddRef(IDXGISwapChain3 *iface)
return
refcount
;
}
static
ULONG
STDMETHODCALLTYPE
d3d11_swapchain_Release
(
IDXGISwapChain
3
*
iface
)
static
ULONG
STDMETHODCALLTYPE
d3d11_swapchain_Release
(
IDXGISwapChain
4
*
iface
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
swapchain
->
refcount
);
TRACE
(
"%p decreasing refcount to %lu.
\n
"
,
swapchain
,
refcount
);
...
...
@@ -248,39 +249,39 @@ static ULONG STDMETHODCALLTYPE d3d11_swapchain_Release(IDXGISwapChain3 *iface)
/* IDXGIObject methods */
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetPrivateData
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetPrivateData
(
IDXGISwapChain
4
*
iface
,
REFGUID
guid
,
UINT
data_size
,
const
void
*
data
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
TRACE
(
"iface %p, guid %s, data_size %u, data %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
dxgi_set_private_data
(
&
swapchain
->
private_store
,
guid
,
data_size
,
data
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetPrivateDataInterface
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetPrivateDataInterface
(
IDXGISwapChain
4
*
iface
,
REFGUID
guid
,
const
IUnknown
*
object
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
TRACE
(
"iface %p, guid %s, object %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
object
);
return
dxgi_set_private_data_interface
(
&
swapchain
->
private_store
,
guid
,
object
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetPrivateData
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetPrivateData
(
IDXGISwapChain
4
*
iface
,
REFGUID
guid
,
UINT
*
data_size
,
void
*
data
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
TRACE
(
"iface %p, guid %s, data_size %p, data %p.
\n
"
,
iface
,
debugstr_guid
(
guid
),
data_size
,
data
);
return
dxgi_get_private_data
(
&
swapchain
->
private_store
,
guid
,
data_size
,
data
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetParent
(
IDXGISwapChain
3
*
iface
,
REFIID
riid
,
void
**
parent
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetParent
(
IDXGISwapChain
4
*
iface
,
REFIID
riid
,
void
**
parent
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
TRACE
(
"iface %p, riid %s, parent %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
parent
);
...
...
@@ -289,9 +290,9 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetParent(IDXGISwapChain3 *ifac
/* IDXGIDeviceSubObject methods */
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetDevice
(
IDXGISwapChain
3
*
iface
,
REFIID
riid
,
void
**
device
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetDevice
(
IDXGISwapChain
4
*
iface
,
REFIID
riid
,
void
**
device
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
TRACE
(
"iface %p, riid %s, device %p.
\n
"
,
iface
,
debugstr_guid
(
riid
),
device
);
...
...
@@ -327,19 +328,19 @@ static HRESULT d3d11_swapchain_present(struct d3d11_swapchain *swapchain,
return
hr
;
}
static
HRESULT
STDMETHODCALLTYPE
DECLSPEC_HOTPATCH
d3d11_swapchain_Present
(
IDXGISwapChain
3
*
iface
,
UINT
sync_interval
,
UINT
flags
)
static
HRESULT
STDMETHODCALLTYPE
DECLSPEC_HOTPATCH
d3d11_swapchain_Present
(
IDXGISwapChain
4
*
iface
,
UINT
sync_interval
,
UINT
flags
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
TRACE
(
"iface %p, sync_interval %u, flags %#x.
\n
"
,
iface
,
sync_interval
,
flags
);
return
d3d11_swapchain_present
(
swapchain
,
sync_interval
,
flags
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetBuffer
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetBuffer
(
IDXGISwapChain
4
*
iface
,
UINT
buffer_idx
,
REFIID
riid
,
void
**
surface
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
struct
wined3d_texture
*
texture
;
IUnknown
*
parent
;
HRESULT
hr
;
...
...
@@ -362,10 +363,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetBuffer(IDXGISwapChain3 *ifac
return
hr
;
}
static
HRESULT
STDMETHODCALLTYPE
DECLSPEC_HOTPATCH
d3d11_swapchain_SetFullscreenState
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
DECLSPEC_HOTPATCH
d3d11_swapchain_SetFullscreenState
(
IDXGISwapChain
4
*
iface
,
BOOL
fullscreen
,
IDXGIOutput
*
target
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
struct
wined3d_swapchain_desc
swapchain_desc
;
struct
wined3d_swapchain_state
*
state
;
struct
dxgi_output
*
dxgi_output
;
...
...
@@ -385,7 +386,7 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreen
{
IDXGIOutput_AddRef
(
target
);
}
else
if
(
FAILED
(
hr
=
IDXGISwapChain
3
_GetContainingOutput
(
iface
,
&
target
)))
else
if
(
FAILED
(
hr
=
IDXGISwapChain
4
_GetContainingOutput
(
iface
,
&
target
)))
{
WARN
(
"Failed to get target output for swapchain, hr %#lx.
\n
"
,
hr
);
return
hr
;
...
...
@@ -400,7 +401,7 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreen
{
WARN
(
"Nested invocation of SetFullscreenState.
\n
"
);
IDXGIOutput_Release
(
target
);
IDXGISwapChain
3
_GetFullscreenState
(
iface
,
&
old_fs
,
NULL
);
IDXGISwapChain
4
_GetFullscreenState
(
iface
,
&
old_fs
,
NULL
);
return
old_fs
==
fullscreen
?
S_OK
:
DXGI_STATUS_MODE_CHANGE_IN_PROGRESS
;
}
...
...
@@ -433,10 +434,10 @@ done:
return
hr
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetFullscreenState
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetFullscreenState
(
IDXGISwapChain
4
*
iface
,
BOOL
*
fullscreen
,
IDXGIOutput
**
target
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
struct
wined3d_swapchain_desc
swapchain_desc
;
HRESULT
hr
;
...
...
@@ -456,7 +457,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFullscreenState(IDXGISwapCha
{
if
(
!
swapchain_desc
.
windowed
)
{
if
(
!
swapchain
->
target
&&
FAILED
(
hr
=
IDXGISwapChain
3
_GetContainingOutput
(
iface
,
&
swapchain
->
target
)))
if
(
!
swapchain
->
target
&&
FAILED
(
hr
=
IDXGISwapChain
4
_GetContainingOutput
(
iface
,
&
swapchain
->
target
)))
return
hr
;
*
target
=
swapchain
->
target
;
...
...
@@ -471,9 +472,9 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFullscreenState(IDXGISwapCha
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetDesc
(
IDXGISwapChain
3
*
iface
,
DXGI_SWAP_CHAIN_DESC
*
desc
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetDesc
(
IDXGISwapChain
4
*
iface
,
DXGI_SWAP_CHAIN_DESC
*
desc
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
struct
wined3d_swapchain_desc
wined3d_desc
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
desc
);
...
...
@@ -512,10 +513,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetDesc(IDXGISwapChain3 *iface,
static
HRESULT
d3d11_swapchain_create_d3d11_textures
(
struct
d3d11_swapchain
*
swapchain
,
IWineDXGIDevice
*
device
,
struct
wined3d_swapchain_desc
*
desc
);
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_ResizeBuffers
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_ResizeBuffers
(
IDXGISwapChain
4
*
iface
,
UINT
buffer_count
,
UINT
width
,
UINT
height
,
DXGI_FORMAT
format
,
UINT
flags
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
struct
wined3d_swapchain_desc
wined3d_desc
;
struct
wined3d_texture
*
texture
;
IUnknown
*
parent
;
...
...
@@ -556,10 +557,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_ResizeBuffers(IDXGISwapChain3 *
return
hr
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_ResizeTarget
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_ResizeTarget
(
IDXGISwapChain
4
*
iface
,
const
DXGI_MODE_DESC
*
target_mode_desc
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
struct
wined3d_swapchain_state
*
state
;
TRACE
(
"iface %p, target_mode_desc %p.
\n
"
,
iface
,
target_mode_desc
);
...
...
@@ -569,9 +570,9 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_ResizeTarget(IDXGISwapChain3 *i
return
dxgi_swapchain_resize_target
(
state
,
target_mode_desc
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetContainingOutput
(
IDXGISwapChain
3
*
iface
,
IDXGIOutput
**
output
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetContainingOutput
(
IDXGISwapChain
4
*
iface
,
IDXGIOutput
**
output
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
HWND
window
;
TRACE
(
"iface %p, output %p.
\n
"
,
iface
,
output
);
...
...
@@ -586,7 +587,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetContainingOutput(IDXGISwapCh
return
dxgi_get_output_from_window
(
swapchain
->
factory
,
window
,
output
);
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetFrameStatistics
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetFrameStatistics
(
IDXGISwapChain
4
*
iface
,
DXGI_FRAME_STATISTICS
*
stats
)
{
FIXME
(
"iface %p, stats %p stub!
\n
"
,
iface
,
stats
);
...
...
@@ -594,10 +595,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFrameStatistics(IDXGISwapCha
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetLastPresentCount
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetLastPresentCount
(
IDXGISwapChain
4
*
iface
,
UINT
*
last_present_count
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
TRACE
(
"iface %p, last_present_count %p.
\n
"
,
iface
,
last_present_count
);
...
...
@@ -608,9 +609,9 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetLastPresentCount(IDXGISwapCh
/* IDXGISwapChain1 methods */
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetDesc1
(
IDXGISwapChain
3
*
iface
,
DXGI_SWAP_CHAIN_DESC1
*
desc
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetDesc1
(
IDXGISwapChain
4
*
iface
,
DXGI_SWAP_CHAIN_DESC1
*
desc
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
struct
wined3d_swapchain_desc
wined3d_desc
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
desc
);
...
...
@@ -643,10 +644,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetDesc1(IDXGISwapChain3 *iface
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetFullscreenDesc
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetFullscreenDesc
(
IDXGISwapChain
4
*
iface
,
DXGI_SWAP_CHAIN_FULLSCREEN_DESC
*
desc
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
struct
wined3d_swapchain_desc
wined3d_desc
;
TRACE
(
"iface %p, desc %p.
\n
"
,
iface
,
desc
);
...
...
@@ -672,9 +673,9 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetFullscreenDesc(IDXGISwapChai
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetHwnd
(
IDXGISwapChain
3
*
iface
,
HWND
*
hwnd
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetHwnd
(
IDXGISwapChain
4
*
iface
,
HWND
*
hwnd
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
TRACE
(
"iface %p, hwnd %p.
\n
"
,
iface
,
hwnd
);
...
...
@@ -688,7 +689,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetHwnd(IDXGISwapChain3 *iface,
return
S_OK
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetCoreWindow
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetCoreWindow
(
IDXGISwapChain
4
*
iface
,
REFIID
iid
,
void
**
core_window
)
{
FIXME
(
"iface %p, iid %s, core_window %p stub!
\n
"
,
iface
,
debugstr_guid
(
iid
),
core_window
);
...
...
@@ -699,10 +700,10 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetCoreWindow(IDXGISwapChain3 *
return
DXGI_ERROR_INVALID_CALL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_Present1
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_Present1
(
IDXGISwapChain
4
*
iface
,
UINT
sync_interval
,
UINT
flags
,
const
DXGI_PRESENT_PARAMETERS
*
present_parameters
)
{
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
3
(
iface
);
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain
4
(
iface
);
TRACE
(
"iface %p, sync_interval %u, flags %#x, present_parameters %p.
\n
"
,
iface
,
sync_interval
,
flags
,
present_parameters
);
...
...
@@ -713,14 +714,14 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_Present1(IDXGISwapChain3 *iface
return
d3d11_swapchain_present
(
swapchain
,
sync_interval
,
flags
);
}
static
BOOL
STDMETHODCALLTYPE
d3d11_swapchain_IsTemporaryMonoSupported
(
IDXGISwapChain
3
*
iface
)
static
BOOL
STDMETHODCALLTYPE
d3d11_swapchain_IsTemporaryMonoSupported
(
IDXGISwapChain
4
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
FALSE
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetRestrictToOutput
(
IDXGISwapChain
3
*
iface
,
IDXGIOutput
**
output
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetRestrictToOutput
(
IDXGISwapChain
4
*
iface
,
IDXGIOutput
**
output
)
{
FIXME
(
"iface %p, output %p stub!
\n
"
,
iface
,
output
);
...
...
@@ -734,28 +735,28 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetRestrictToOutput(IDXGISwapCh
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetBackgroundColor
(
IDXGISwapChain
3
*
iface
,
const
DXGI_RGBA
*
color
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetBackgroundColor
(
IDXGISwapChain
4
*
iface
,
const
DXGI_RGBA
*
color
)
{
FIXME
(
"iface %p, color %p stub!
\n
"
,
iface
,
color
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetBackgroundColor
(
IDXGISwapChain
3
*
iface
,
DXGI_RGBA
*
color
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetBackgroundColor
(
IDXGISwapChain
4
*
iface
,
DXGI_RGBA
*
color
)
{
FIXME
(
"iface %p, color %p stub!
\n
"
,
iface
,
color
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetRotation
(
IDXGISwapChain
3
*
iface
,
DXGI_MODE_ROTATION
rotation
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetRotation
(
IDXGISwapChain
4
*
iface
,
DXGI_MODE_ROTATION
rotation
)
{
FIXME
(
"iface %p, rotation %#x stub!
\n
"
,
iface
,
rotation
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetRotation
(
IDXGISwapChain
3
*
iface
,
DXGI_MODE_ROTATION
*
rotation
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetRotation
(
IDXGISwapChain
4
*
iface
,
DXGI_MODE_ROTATION
*
rotation
)
{
FIXME
(
"iface %p, rotation %p stub!
\n
"
,
iface
,
rotation
);
...
...
@@ -764,42 +765,42 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetRotation(IDXGISwapChain3 *if
/* IDXGISwapChain2 methods */
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetSourceSize
(
IDXGISwapChain
3
*
iface
,
UINT
width
,
UINT
height
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetSourceSize
(
IDXGISwapChain
4
*
iface
,
UINT
width
,
UINT
height
)
{
FIXME
(
"iface %p, width %u, height %u stub!
\n
"
,
iface
,
width
,
height
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetSourceSize
(
IDXGISwapChain
3
*
iface
,
UINT
*
width
,
UINT
*
height
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetSourceSize
(
IDXGISwapChain
4
*
iface
,
UINT
*
width
,
UINT
*
height
)
{
FIXME
(
"iface %p, width %p, height %p stub!
\n
"
,
iface
,
width
,
height
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetMaximumFrameLatency
(
IDXGISwapChain
3
*
iface
,
UINT
max_latency
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetMaximumFrameLatency
(
IDXGISwapChain
4
*
iface
,
UINT
max_latency
)
{
FIXME
(
"iface %p, max_latency %u stub!
\n
"
,
iface
,
max_latency
);
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetMaximumFrameLatency
(
IDXGISwapChain
3
*
iface
,
UINT
*
max_latency
)
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetMaximumFrameLatency
(
IDXGISwapChain
4
*
iface
,
UINT
*
max_latency
)
{
FIXME
(
"iface %p, max_latency %p stub!
\n
"
,
iface
,
max_latency
);
return
E_NOTIMPL
;
}
static
HANDLE
STDMETHODCALLTYPE
d3d11_swapchain_GetFrameLatencyWaitableObject
(
IDXGISwapChain
3
*
iface
)
static
HANDLE
STDMETHODCALLTYPE
d3d11_swapchain_GetFrameLatencyWaitableObject
(
IDXGISwapChain
4
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
NULL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetMatrixTransform
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetMatrixTransform
(
IDXGISwapChain
4
*
iface
,
const
DXGI_MATRIX_3X2_F
*
matrix
)
{
FIXME
(
"iface %p, matrix %p stub!
\n
"
,
iface
,
matrix
);
...
...
@@ -807,7 +808,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetMatrixTransform(IDXGISwapCha
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetMatrixTransform
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_GetMatrixTransform
(
IDXGISwapChain
4
*
iface
,
DXGI_MATRIX_3X2_F
*
matrix
)
{
FIXME
(
"iface %p, matrix %p stub!
\n
"
,
iface
,
matrix
);
...
...
@@ -817,14 +818,14 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_GetMatrixTransform(IDXGISwapCha
/* IDXGISwapChain3 methods */
static
UINT
STDMETHODCALLTYPE
d3d11_swapchain_GetCurrentBackBufferIndex
(
IDXGISwapChain
3
*
iface
)
static
UINT
STDMETHODCALLTYPE
d3d11_swapchain_GetCurrentBackBufferIndex
(
IDXGISwapChain
4
*
iface
)
{
FIXME
(
"iface %p stub!
\n
"
,
iface
);
return
0
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_CheckColorSpaceSupport
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_CheckColorSpaceSupport
(
IDXGISwapChain
4
*
iface
,
DXGI_COLOR_SPACE_TYPE
colour_space
,
UINT
*
colour_space_support
)
{
FIXME
(
"iface %p, colour_space %#x, colour_space_support %p stub!
\n
"
,
...
...
@@ -833,7 +834,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_CheckColorSpaceSupport(IDXGISwa
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetColorSpace1
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetColorSpace1
(
IDXGISwapChain
4
*
iface
,
DXGI_COLOR_SPACE_TYPE
colour_space
)
{
FIXME
(
"iface %p, colour_space %#x stub!
\n
"
,
iface
,
colour_space
);
...
...
@@ -841,7 +842,7 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_SetColorSpace1(IDXGISwapChain3
return
E_NOTIMPL
;
}
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_ResizeBuffers1
(
IDXGISwapChain
3
*
iface
,
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_ResizeBuffers1
(
IDXGISwapChain
4
*
iface
,
UINT
buffer_count
,
UINT
width
,
UINT
height
,
DXGI_FORMAT
format
,
UINT
flags
,
const
UINT
*
node_mask
,
IUnknown
*
const
*
present_queue
)
{
...
...
@@ -852,7 +853,17 @@ static HRESULT STDMETHODCALLTYPE d3d11_swapchain_ResizeBuffers1(IDXGISwapChain3
return
E_NOTIMPL
;
}
static
const
struct
IDXGISwapChain3Vtbl
d3d11_swapchain_vtbl
=
/* IDXGISwapChain4 methods */
static
HRESULT
STDMETHODCALLTYPE
d3d11_swapchain_SetHDRMetaData
(
IDXGISwapChain4
*
iface
,
DXGI_HDR_METADATA_TYPE
type
,
UINT
size
,
void
*
metadata
)
{
FIXME
(
"iface %p, type %#x, size %#x, metadata %p stub!
\n
"
,
iface
,
type
,
size
,
metadata
);
return
E_NOTIMPL
;
}
static
const
struct
IDXGISwapChain4Vtbl
d3d11_swapchain_vtbl
=
{
/* IUnknown methods */
d3d11_swapchain_QueryInterface
,
...
...
@@ -901,6 +912,8 @@ static const struct IDXGISwapChain3Vtbl d3d11_swapchain_vtbl =
d3d11_swapchain_CheckColorSpaceSupport
,
d3d11_swapchain_SetColorSpace1
,
d3d11_swapchain_ResizeBuffers1
,
/* IDXGISwapChain4 methods */
d3d11_swapchain_SetHDRMetaData
,
};
static
void
STDMETHODCALLTYPE
d3d11_swapchain_wined3d_object_released
(
void
*
parent
)
...
...
@@ -993,7 +1006,7 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
}
IWineDXGIDevice_AddRef
(
swapchain
->
device
=
&
device
->
IWineDXGIDevice_iface
);
swapchain
->
IDXGISwapChain
3
_iface
.
lpVtbl
=
&
d3d11_swapchain_vtbl
;
swapchain
->
IDXGISwapChain
4
_iface
.
lpVtbl
=
&
d3d11_swapchain_vtbl
;
swapchain
->
state_parent
.
ops
=
&
d3d11_swapchain_state_parent_ops
;
swapchain
->
refcount
=
1
;
wined3d_mutex_lock
();
...
...
@@ -1027,7 +1040,7 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
{
desc
->
windowed
=
FALSE
;
if
(
FAILED
(
hr
=
IDXGISwapChain
3_GetContainingOutput
(
&
swapchain
->
IDXGISwapChain3
_iface
,
if
(
FAILED
(
hr
=
IDXGISwapChain
4_GetContainingOutput
(
&
swapchain
->
IDXGISwapChain4
_iface
,
&
swapchain
->
target
)))
{
WARN
(
"Failed to get target output for fullscreen swapchain, hr %#lx.
\n
"
,
hr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment