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
ee2ef012
Commit
ee2ef012
authored
Mar 18, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxgi: Build without -DWINE_NO_LONG_TYPES.
Signed-off-by:
Henri Verbeet
<
hverbeet@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
51b05581
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
63 additions
and
64 deletions
+63
-64
Makefile.in
dlls/dxgi/Makefile.in
+0
-1
adapter.c
dlls/dxgi/adapter.c
+6
-6
device.c
dlls/dxgi/device.c
+10
-10
dxgi_main.c
dlls/dxgi/dxgi_main.c
+3
-3
factory.c
dlls/dxgi/factory.c
+10
-10
output.c
dlls/dxgi/output.c
+8
-8
surface.c
dlls/dxgi/surface.c
+2
-2
swapchain.c
dlls/dxgi/swapchain.c
+24
-24
No files found.
dlls/dxgi/Makefile.in
View file @
ee2ef012
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
dxgi.dll
IMPORTLIB
=
dxgi
IMPORTS
=
gdi32 dxguid uuid wined3d user32 win32u
...
...
dlls/dxgi/adapter.c
View file @
ee2ef012
...
...
@@ -55,7 +55,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_AddRef(IWineDXGIAdapter *iface)
struct
dxgi_adapter
*
adapter
=
impl_from_IWineDXGIAdapter
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
adapter
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
refcount
);
TRACE
(
"%p increasing refcount to %
l
u.
\n
"
,
iface
,
refcount
);
return
refcount
;
}
...
...
@@ -65,7 +65,7 @@ static ULONG STDMETHODCALLTYPE dxgi_adapter_Release(IWineDXGIAdapter *iface)
struct
dxgi_adapter
*
adapter
=
impl_from_IWineDXGIAdapter
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
adapter
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
refcount
);
TRACE
(
"%p decreasing refcount to %
l
u.
\n
"
,
iface
,
refcount
);
if
(
!
refcount
)
{
...
...
@@ -165,7 +165,7 @@ static HRESULT dxgi_adapter_get_desc(struct dxgi_adapter *adapter, DXGI_ADAPTER_
if
(
!
MultiByteToWideChar
(
CP_ACP
,
0
,
description
,
-
1
,
desc
->
Description
,
ARRAY_SIZE
(
description
)))
{
DWORD
err
=
GetLastError
();
ERR
(
"Failed to translate description %s (%#x).
\n
"
,
debugstr_a
(
description
),
err
);
ERR
(
"Failed to translate description %s (%#
l
x).
\n
"
,
debugstr_a
(
description
),
err
);
hr
=
E_FAIL
;
}
...
...
@@ -285,7 +285,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_RegisterHardwareContentProtectionT
static
void
STDMETHODCALLTYPE
dxgi_adapter_UnregisterHardwareContentProtectionTeardownStatus
(
IWineDXGIAdapter
*
iface
,
DWORD
cookie
)
{
FIXME
(
"iface %p, cookie %#x stub!
\n
"
,
iface
,
cookie
);
FIXME
(
"iface %p, cookie %#
l
x stub!
\n
"
,
iface
,
cookie
);
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_adapter_QueryVideoMemoryInfo
(
IWineDXGIAdapter
*
iface
,
...
...
@@ -354,7 +354,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_adapter_RegisterVideoMemoryBudgetChangeNot
static
void
STDMETHODCALLTYPE
dxgi_adapter_UnregisterVideoMemoryBudgetChangeNotification
(
IWineDXGIAdapter
*
iface
,
DWORD
cookie
)
{
FIXME
(
"iface %p, cookie %#x stub!
\n
"
,
iface
,
cookie
);
FIXME
(
"iface %p, cookie %#
l
x stub!
\n
"
,
iface
,
cookie
);
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_adapter_GetDesc3
(
IWineDXGIAdapter
*
iface
,
DXGI_ADAPTER_DESC3
*
desc
)
...
...
@@ -431,7 +431,7 @@ struct dxgi_adapter *unsafe_impl_from_IDXGIAdapter(IDXGIAdapter *iface)
return
NULL
;
if
(
FAILED
(
hr
=
IDXGIAdapter_QueryInterface
(
iface
,
&
IID_IWineDXGIAdapter
,
(
void
**
)
&
wine_adapter
)))
{
ERR
(
"Failed to get IWineDXGIAdapter interface, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to get IWineDXGIAdapter interface, hr %#
l
x.
\n
"
,
hr
);
return
NULL
;
}
assert
(
wine_adapter
->
lpVtbl
==
&
dxgi_adapter_vtbl
);
...
...
dlls/dxgi/device.c
View file @
ee2ef012
...
...
@@ -71,7 +71,7 @@ static ULONG STDMETHODCALLTYPE dxgi_device_AddRef(IWineDXGIDevice *iface)
struct
dxgi_device
*
device
=
impl_from_IWineDXGIDevice
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
device
->
refcount
);
TRACE
(
"%p increasing refcount to %u
\n
"
,
device
,
refcount
);
TRACE
(
"%p increasing refcount to %
l
u
\n
"
,
device
,
refcount
);
return
refcount
;
}
...
...
@@ -81,7 +81,7 @@ static ULONG STDMETHODCALLTYPE dxgi_device_Release(IWineDXGIDevice *iface)
struct
dxgi_device
*
device
=
impl_from_IWineDXGIDevice
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
device
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
device
,
refcount
);
TRACE
(
"%p decreasing refcount to %
l
u.
\n
"
,
device
,
refcount
);
if
(
!
refcount
)
{
...
...
@@ -141,7 +141,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_GetParent(IWineDXGIDevice *iface, R
hr
=
IWineDXGIDevice_GetAdapter
(
iface
,
&
adapter
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to get adapter, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to get adapter, hr %#
l
x.
\n
"
,
hr
);
return
hr
;
}
...
...
@@ -209,7 +209,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_CreateSurface(IWineDXGIDevice *ifac
if
(
FAILED
(
hr
=
device_parent
->
ops
->
create_swapchain_texture
(
device_parent
,
NULL
,
&
surface_desc
,
0
,
&
wined3d_texture
)))
{
ERR
(
"Failed to create surface, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to create surface, hr %#
l
x.
\n
"
,
hr
);
goto
fail
;
}
...
...
@@ -344,7 +344,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_device_create_surface(IWineDXGIDevice *ifa
if
(
FAILED
(
hr
=
dxgi_surface_init
(
object
,
(
IDXGIDevice
*
)
iface
,
outer
,
wined3d_texture
)))
{
WARN
(
"Failed to initialize surface, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to initialize surface, hr %#
l
x.
\n
"
,
hr
);
heap_free
(
object
);
return
hr
;
}
...
...
@@ -440,7 +440,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX
if
(
FAILED
(
hr
=
dxgi_get_output_from_window
(
&
dxgi_factory
->
IWineDXGIFactory_iface
,
window
,
&
containing_output
)))
{
WARN
(
"Failed to get output from window %p, hr %#x.
\n
"
,
window
,
hr
);
WARN
(
"Failed to get output from window %p, hr %#
l
x.
\n
"
,
window
,
hr
);
return
hr
;
}
...
...
@@ -458,7 +458,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_swapchain_factory_create_swapchain(IWineDX
if
(
FAILED
(
hr
=
d3d11_swapchain_init
(
object
,
device
,
&
wined3d_desc
)))
{
WARN
(
"Failed to initialise swapchain, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to initialise swapchain, hr %#
l
x.
\n
"
,
hr
);
heap_free
(
object
);
return
hr
;
}
...
...
@@ -517,7 +517,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
if
(
FAILED
(
hr
=
layer
->
create
(
layer
->
id
,
&
layer_base
,
0
,
device
,
&
IID_IUnknown
,
(
void
**
)
&
device
->
child_layer
)))
{
WARN
(
"Failed to create device, returning %#x.
\n
"
,
hr
);
WARN
(
"Failed to create device, returning %#
l
x.
\n
"
,
hr
);
wined3d_private_store_cleanup
(
&
device
->
private_store
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -540,7 +540,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
(
const
enum
wined3d_feature_level
*
)
feature_levels
,
level_count
,
wined3d_device_parent
,
&
device
->
wined3d_device
)))
{
WARN
(
"Failed to create a wined3d device, returning %#x.
\n
"
,
hr
);
WARN
(
"Failed to create a wined3d device, returning %#
l
x.
\n
"
,
hr
);
IUnknown_Release
(
device
->
child_layer
);
wined3d_private_store_cleanup
(
&
device
->
private_store
);
wined3d_mutex_unlock
();
...
...
@@ -579,7 +579,7 @@ HRESULT dxgi_device_init(struct dxgi_device *device, struct dxgi_device_layer *l
if
(
FAILED
(
hr
=
d3d11_swapchain_init
(
swapchain
,
device
,
&
swapchain_desc
)))
{
WARN
(
"Failed to initialize swapchain, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to initialize swapchain, hr %#
l
x.
\n
"
,
hr
);
heap_free
(
swapchain
);
wined3d_device_decref
(
device
->
wined3d_device
);
IUnknown_Release
(
device
->
child_layer
);
...
...
dlls/dxgi/dxgi_main.c
View file @
ee2ef012
...
...
@@ -118,7 +118,7 @@ static HRESULT register_d3d10core_layers(HMODULE d3d10core)
hr
=
d3d11core_register_layers
();
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to register d3d11 layers, returning %#x.
\n
"
,
hr
);
ERR
(
"Failed to register d3d11 layers, returning %#
l
x.
\n
"
,
hr
);
FreeLibrary
(
mod
);
wined3d_mutex_unlock
();
return
hr
;
...
...
@@ -154,7 +154,7 @@ HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, I
hr
=
register_d3d10core_layers
(
d3d10core
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to register d3d10core layers, returning %#x.
\n
"
,
hr
);
ERR
(
"Failed to register d3d10core layers, returning %#
l
x.
\n
"
,
hr
);
return
hr
;
}
...
...
@@ -194,7 +194,7 @@ HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, I
hr
=
dxgi_device_init
(
dxgi_device
,
&
d3d10_layer
,
factory
,
adapter
,
feature_levels
,
level_count
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to initialize device, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to initialize device, hr %#
l
x.
\n
"
,
hr
);
heap_free
(
dxgi_device
);
*
device
=
NULL
;
return
hr
;
...
...
dlls/dxgi/factory.c
View file @
ee2ef012
...
...
@@ -60,7 +60,7 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_AddRef(IWineDXGIFactory *iface)
struct
dxgi_factory
*
factory
=
impl_from_IWineDXGIFactory
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
factory
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
iface
,
refcount
);
TRACE
(
"%p increasing refcount to %
l
u.
\n
"
,
iface
,
refcount
);
return
refcount
;
}
...
...
@@ -70,7 +70,7 @@ static ULONG STDMETHODCALLTYPE dxgi_factory_Release(IWineDXGIFactory *iface)
struct
dxgi_factory
*
factory
=
impl_from_IWineDXGIFactory
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
factory
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
iface
,
refcount
);
TRACE
(
"%p decreasing refcount to %
l
u.
\n
"
,
iface
,
refcount
);
if
(
!
refcount
)
{
...
...
@@ -353,7 +353,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterStereoStatusEvent(IWineDXG
static
void
STDMETHODCALLTYPE
dxgi_factory_UnregisterStereoStatus
(
IWineDXGIFactory
*
iface
,
DWORD
cookie
)
{
FIXME
(
"iface %p, cookie %#x stub!
\n
"
,
iface
,
cookie
);
FIXME
(
"iface %p, cookie %#
l
x stub!
\n
"
,
iface
,
cookie
);
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_RegisterStereoStatusWindow
(
IWineDXGIFactory
*
iface
,
...
...
@@ -375,7 +375,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterOcclusionStatusEvent(IWine
static
void
STDMETHODCALLTYPE
dxgi_factory_UnregisterOcclusionStatus
(
IWineDXGIFactory
*
iface
,
DWORD
cookie
)
{
FIXME
(
"iface %p, cookie %#x stub!
\n
"
,
iface
,
cookie
);
FIXME
(
"iface %p, cookie %#
l
x stub!
\n
"
,
iface
,
cookie
);
}
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_CreateSwapChainForComposition
(
IWineDXGIFactory
*
iface
,
...
...
@@ -402,7 +402,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapterByLuid(IWineDXGIFactory
IDXGIAdapter1
*
adapter1
;
HRESULT
hr
;
TRACE
(
"iface %p, luid %08
x:%08
x, iid %s, adapter %p.
\n
"
,
TRACE
(
"iface %p, luid %08
lx:%08l
x, iid %s, adapter %p.
\n
"
,
iface
,
luid
.
HighPart
,
luid
.
LowPart
,
debugstr_guid
(
iid
),
adapter
);
if
(
!
adapter
)
...
...
@@ -413,7 +413,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapterByLuid(IWineDXGIFactory
{
if
(
FAILED
(
hr
=
IDXGIAdapter1_GetDesc1
(
adapter1
,
&
desc
)))
{
WARN
(
"Failed to get adapter %u desc, hr %#x.
\n
"
,
adapter_index
,
hr
);
WARN
(
"Failed to get adapter %u desc, hr %#
l
x.
\n
"
,
adapter_index
,
hr
);
++
adapter_index
;
continue
;
}
...
...
@@ -430,7 +430,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapterByLuid(IWineDXGIFactory
++
adapter_index
;
}
if
(
hr
!=
DXGI_ERROR_NOT_FOUND
)
WARN
(
"Failed to enumerate adapters, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to enumerate adapters, hr %#
l
x.
\n
"
,
hr
);
WARN
(
"Adapter could not be found.
\n
"
);
return
DXGI_ERROR_NOT_FOUND
;
...
...
@@ -495,7 +495,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_RegisterAdaptersChangedEvent(IWine
static
HRESULT
STDMETHODCALLTYPE
dxgi_factory_UnregisterAdaptersChangedEvent
(
IWineDXGIFactory
*
iface
,
DWORD
cookie
)
{
FIXME
(
"iface %p, cookie %#x stub!
\n
"
,
iface
,
cookie
);
FIXME
(
"iface %p, cookie %#
l
x stub!
\n
"
,
iface
,
cookie
);
return
E_NOTIMPL
;
}
...
...
@@ -553,7 +553,7 @@ struct dxgi_factory *unsafe_impl_from_IDXGIFactory(IDXGIFactory *iface)
return
NULL
;
if
(
FAILED
(
hr
=
IDXGIFactory_QueryInterface
(
iface
,
&
IID_IWineDXGIFactory
,
(
void
**
)
&
wine_factory
)))
{
ERR
(
"Failed to get IWineDXGIFactory interface, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to get IWineDXGIFactory interface, hr %#
l
x.
\n
"
,
hr
);
return
NULL
;
}
assert
(
wine_factory
->
lpVtbl
==
&
dxgi_factory_vtbl
);
...
...
@@ -592,7 +592,7 @@ HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended)
if
(
FAILED
(
hr
=
dxgi_factory_init
(
object
,
extended
)))
{
WARN
(
"Failed to initialize factory, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to initialize factory, hr %#
l
x.
\n
"
,
hr
);
heap_free
(
object
);
return
hr
;
}
...
...
dlls/dxgi/output.c
View file @
ee2ef012
...
...
@@ -146,7 +146,7 @@ static HRESULT dxgi_output_get_display_mode_list(struct dxgi_output *output,
if
(
FAILED
(
hr
=
wined3d_output_get_mode
(
output
->
wined3d_output
,
wined3d_format
,
WINED3D_SCANLINE_ORDERING_UNKNOWN
,
i
,
&
mode
)))
{
WARN
(
"Failed to get output mode %u, hr %#x.
\n
"
,
i
,
hr
);
WARN
(
"Failed to get output mode %u, hr %#
l
x.
\n
"
,
i
,
hr
);
wined3d_mutex_unlock
();
return
hr
;
}
...
...
@@ -220,7 +220,7 @@ static ULONG STDMETHODCALLTYPE dxgi_output_AddRef(IDXGIOutput6 *iface)
struct
dxgi_output
*
output
=
impl_from_IDXGIOutput6
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
output
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
output
,
refcount
);
TRACE
(
"%p increasing refcount to %
l
u.
\n
"
,
output
,
refcount
);
return
refcount
;
}
...
...
@@ -230,7 +230,7 @@ static ULONG STDMETHODCALLTYPE dxgi_output_Release(IDXGIOutput6 *iface)
struct
dxgi_output
*
output
=
impl_from_IDXGIOutput6
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
output
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
output
,
refcount
);
TRACE
(
"%p decreasing refcount to %
l
u.
\n
"
,
output
,
refcount
);
if
(
!
refcount
)
{
...
...
@@ -303,7 +303,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc(IDXGIOutput6 *iface, DXGI_O
hr
=
wined3d_output_get_desc
(
output
->
wined3d_output
,
&
wined3d_desc
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to get output desc, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get output desc, hr %#
l
x.
\n
"
,
hr
);
wined3d_mutex_unlock
();
return
hr
;
}
...
...
@@ -311,7 +311,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc(IDXGIOutput6 *iface, DXGI_O
hr
=
wined3d_output_get_display_mode
(
output
->
wined3d_output
,
&
mode
,
&
rotation
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to get output display mode, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get output display mode, hr %#
l
x.
\n
"
,
hr
);
wined3d_mutex_unlock
();
return
hr
;
}
...
...
@@ -610,7 +610,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc1(IDXGIOutput6 *iface,
hr
=
wined3d_output_get_desc
(
output
->
wined3d_output
,
&
wined3d_desc
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to get output desc, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get output desc, hr %#
l
x.
\n
"
,
hr
);
wined3d_mutex_unlock
();
return
hr
;
}
...
...
@@ -618,7 +618,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc1(IDXGIOutput6 *iface,
hr
=
wined3d_output_get_display_mode
(
output
->
wined3d_output
,
&
mode
,
&
rotation
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to get output display mode, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get output display mode, hr %#
l
x.
\n
"
,
hr
);
wined3d_mutex_unlock
();
return
hr
;
}
...
...
@@ -626,7 +626,7 @@ static HRESULT STDMETHODCALLTYPE dxgi_output_GetDesc1(IDXGIOutput6 *iface,
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to get output desc, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get output desc, hr %#
l
x.
\n
"
,
hr
);
return
hr
;
}
...
...
dlls/dxgi/surface.c
View file @
ee2ef012
...
...
@@ -56,7 +56,7 @@ static ULONG STDMETHODCALLTYPE dxgi_surface_inner_AddRef(IUnknown *iface)
struct
dxgi_surface
*
surface
=
impl_from_IUnknown
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
surface
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
surface
,
refcount
);
TRACE
(
"%p increasing refcount to %
l
u.
\n
"
,
surface
,
refcount
);
return
refcount
;
}
...
...
@@ -66,7 +66,7 @@ static ULONG STDMETHODCALLTYPE dxgi_surface_inner_Release(IUnknown *iface)
struct
dxgi_surface
*
surface
=
impl_from_IUnknown
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
surface
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
surface
,
refcount
);
TRACE
(
"%p decreasing refcount to %
l
u.
\n
"
,
surface
,
refcount
);
if
(
!
refcount
)
{
...
...
dlls/dxgi/swapchain.c
View file @
ee2ef012
...
...
@@ -123,7 +123,7 @@ HRESULT dxgi_get_output_from_window(IWineDXGIFactory *factory, HWND window, IDXG
{
if
(
FAILED
(
hr
=
IDXGIOutput_GetDesc
(
output
,
&
desc
)))
{
WARN
(
"Adapter %u output %u: Failed to get output desc, hr %#x.
\n
"
,
adapter_idx
,
WARN
(
"Adapter %u output %u: Failed to get output desc, hr %#
l
x.
\n
"
,
adapter_idx
,
output_idx
,
hr
);
IDXGIOutput_Release
(
output
);
continue
;
...
...
@@ -142,7 +142,7 @@ HRESULT dxgi_get_output_from_window(IWineDXGIFactory *factory, HWND window, IDXG
}
if
(
hr
!=
DXGI_ERROR_NOT_FOUND
)
WARN
(
"Failed to enumerate outputs, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to enumerate outputs, hr %#
l
x.
\n
"
,
hr
);
WARN
(
"Output could not be found.
\n
"
);
return
DXGI_ERROR_NOT_FOUND
;
...
...
@@ -213,7 +213,7 @@ static ULONG STDMETHODCALLTYPE d3d11_swapchain_AddRef(IDXGISwapChain1 *iface)
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain1
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
swapchain
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
swapchain
,
refcount
);
TRACE
(
"%p increasing refcount to %
l
u.
\n
"
,
swapchain
,
refcount
);
if
(
refcount
==
1
)
wined3d_swapchain_incref
(
swapchain
->
wined3d_swapchain
);
...
...
@@ -226,7 +226,7 @@ static ULONG STDMETHODCALLTYPE d3d11_swapchain_Release(IDXGISwapChain1 *iface)
struct
d3d11_swapchain
*
swapchain
=
d3d11_swapchain_from_IDXGISwapChain1
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
swapchain
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
swapchain
,
refcount
);
TRACE
(
"%p decreasing refcount to %
l
u.
\n
"
,
swapchain
,
refcount
);
if
(
!
refcount
)
{
...
...
@@ -399,7 +399,7 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d11_swapchain_SetFullscreen
}
else
if
(
FAILED
(
hr
=
IDXGISwapChain1_GetContainingOutput
(
iface
,
&
target
)))
{
WARN
(
"Failed to get target output for swapchain, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get target output for swapchain, hr %#
l
x.
\n
"
,
hr
);
return
hr
;
}
dxgi_output
=
unsafe_impl_from_IDXGIOutput
(
target
);
...
...
@@ -849,7 +849,7 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
if
(
FAILED
(
hr
=
IWineDXGIAdapter_GetParent
(
device
->
adapter
,
&
IID_IWineDXGIFactory
,
(
void
**
)
&
swapchain
->
factory
)))
{
WARN
(
"Failed to get adapter parent, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get adapter parent, hr %#
l
x.
\n
"
,
hr
);
return
hr
;
}
IWineDXGIDevice_AddRef
(
swapchain
->
device
=
&
device
->
IWineDXGIDevice_iface
);
...
...
@@ -874,7 +874,7 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
if
(
FAILED
(
hr
=
wined3d_swapchain_create
(
device
->
wined3d_device
,
desc
,
&
swapchain
->
state_parent
,
swapchain
,
&
d3d11_swapchain_wined3d_parent_ops
,
&
swapchain
->
wined3d_swapchain
)))
{
WARN
(
"Failed to create wined3d swapchain, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to create wined3d swapchain, hr %#
l
x.
\n
"
,
hr
);
goto
cleanup
;
}
...
...
@@ -889,14 +889,14 @@ HRESULT d3d11_swapchain_init(struct d3d11_swapchain *swapchain, struct dxgi_devi
if
(
FAILED
(
hr
=
IDXGISwapChain1_GetContainingOutput
(
&
swapchain
->
IDXGISwapChain1_iface
,
&
swapchain
->
target
)))
{
WARN
(
"Failed to get target output for fullscreen swapchain, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get target output for fullscreen swapchain, hr %#
l
x.
\n
"
,
hr
);
wined3d_swapchain_decref
(
swapchain
->
wined3d_swapchain
);
goto
cleanup
;
}
if
(
FAILED
(
hr
=
wined3d_swapchain_state_set_fullscreen
(
state
,
desc
,
NULL
)))
{
WARN
(
"Failed to set fullscreen state, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to set fullscreen state, hr %#
l
x.
\n
"
,
hr
);
IDXGIOutput_Release
(
swapchain
->
target
);
wined3d_swapchain_decref
(
swapchain
->
wined3d_swapchain
);
goto
cleanup
;
...
...
@@ -1537,7 +1537,7 @@ static HRESULT d3d12_swapchain_create_buffers(struct d3d12_swapchain *swapchain,
if
(
FAILED
(
hr
=
vkd3d_create_image_resource
(
device
,
&
resource_info
,
&
swapchain
->
buffers
[
i
])))
{
WARN
(
"Failed to create vkd3d resource for Vulkan image %u, hr %#x.
\n
"
,
i
,
hr
);
WARN
(
"Failed to create vkd3d resource for Vulkan image %u, hr %#
l
x.
\n
"
,
i
,
hr
);
return
hr
;
}
...
...
@@ -1769,7 +1769,7 @@ static HRESULT d3d12_swapchain_recreate_vulkan_swapchain(struct d3d12_swapchain
}
else
{
ERR
(
"Failed to recreate Vulkan swapchain, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to recreate Vulkan swapchain, hr %#
l
x.
\n
"
,
hr
);
}
return
hr
;
...
...
@@ -1811,7 +1811,7 @@ static ULONG STDMETHODCALLTYPE d3d12_swapchain_AddRef(IDXGISwapChain4 *iface)
struct
d3d12_swapchain
*
swapchain
=
d3d12_swapchain_from_IDXGISwapChain4
(
iface
);
ULONG
refcount
=
InterlockedIncrement
(
&
swapchain
->
refcount
);
TRACE
(
"%p increasing refcount to %u.
\n
"
,
swapchain
,
refcount
);
TRACE
(
"%p increasing refcount to %
l
u.
\n
"
,
swapchain
,
refcount
);
return
refcount
;
}
...
...
@@ -1865,7 +1865,7 @@ static ULONG STDMETHODCALLTYPE d3d12_swapchain_Release(IDXGISwapChain4 *iface)
struct
d3d12_swapchain
*
swapchain
=
d3d12_swapchain_from_IDXGISwapChain4
(
iface
);
ULONG
refcount
=
InterlockedDecrement
(
&
swapchain
->
refcount
);
TRACE
(
"%p decreasing refcount to %u.
\n
"
,
swapchain
,
refcount
);
TRACE
(
"%p decreasing refcount to %
l
u.
\n
"
,
swapchain
,
refcount
);
if
(
!
refcount
)
{
...
...
@@ -2106,14 +2106,14 @@ static HRESULT d3d12_swapchain_present(struct d3d12_swapchain *swapchain,
if
(
FAILED
(
hr
=
ID3D12CommandQueue_Signal
(
swapchain
->
command_queue
,
swapchain
->
frame_latency_fence
,
swapchain
->
frame_number
)))
{
ERR
(
"Failed to signal frame latency fence, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to signal frame latency fence, hr %#
l
x.
\n
"
,
hr
);
return
hr
;
}
if
(
FAILED
(
hr
=
ID3D12Fence_SetEventOnCompletion
(
swapchain
->
frame_latency_fence
,
swapchain
->
frame_number
-
swapchain
->
frame_latency
,
frame_latency_event
)))
{
ERR
(
"Failed to enqueue frame latency event, hr %#x.
\n
"
,
hr
);
ERR
(
"Failed to enqueue frame latency event, hr %#
l
x.
\n
"
,
hr
);
return
hr
;
}
}
...
...
@@ -2189,7 +2189,7 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreen
}
else
if
(
FAILED
(
hr
=
IDXGISwapChain4_GetContainingOutput
(
iface
,
&
target
)))
{
WARN
(
"Failed to get target output for swapchain, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get target output for swapchain, hr %#
l
x.
\n
"
,
hr
);
return
hr
;
}
...
...
@@ -2312,7 +2312,7 @@ static HRESULT d3d12_swapchain_resize_buffers(struct d3d12_swapchain *swapchain,
ID3D12Resource_AddRef
(
swapchain
->
buffers
[
i
]);
if
((
refcount
=
ID3D12Resource_Release
(
swapchain
->
buffers
[
i
])))
{
WARN
(
"Buffer %p has %u references left.
\n
"
,
swapchain
->
buffers
[
i
],
refcount
);
WARN
(
"Buffer %p has %
l
u references left.
\n
"
,
swapchain
->
buffers
[
i
],
refcount
);
return
DXGI_ERROR_INVALID_CALL
;
}
}
...
...
@@ -2328,7 +2328,7 @@ static HRESULT d3d12_swapchain_resize_buffers(struct d3d12_swapchain *swapchain,
if
(
!
GetClientRect
(
swapchain
->
window
,
&
client_rect
))
{
WARN
(
"Failed to get client rect, last error %#x.
\n
"
,
GetLastError
());
WARN
(
"Failed to get client rect, last error %#
l
x.
\n
"
,
GetLastError
());
return
DXGI_ERROR_INVALID_CALL
;
}
...
...
@@ -2397,13 +2397,13 @@ static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetContainingOutput(IDXGISwapCh
if
(
FAILED
(
hr
=
IUnknown_QueryInterface
(
device_parent
,
&
IID_IDXGIAdapter
,
(
void
**
)
&
adapter
)))
{
WARN
(
"Failed to get adapter, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get adapter, hr %#
l
x.
\n
"
,
hr
);
return
hr
;
}
if
(
FAILED
(
hr
=
IDXGIAdapter_GetParent
(
adapter
,
&
IID_IWineDXGIFactory
,
(
void
**
)
&
factory
)))
{
WARN
(
"Failed to get factory, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to get factory, hr %#
l
x.
\n
"
,
hr
);
IDXGIAdapter_Release
(
adapter
);
return
hr
;
}
...
...
@@ -2921,7 +2921,7 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI
if
(
FAILED
(
hr
=
dxgi_get_output_from_window
(
factory
,
window
,
&
output
)))
{
WARN
(
"Failed to get output from window %p, hr %#x.
\n
"
,
window
,
hr
);
WARN
(
"Failed to get output from window %p, hr %#
l
x.
\n
"
,
window
,
hr
);
return
hr
;
}
...
...
@@ -3047,7 +3047,7 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI
if
(
FAILED
(
hr
=
ID3D12Device_CreateFence
(
device
,
DXGI_MAX_SWAP_CHAIN_BUFFERS
,
0
,
&
IID_ID3D12Fence
,
(
void
**
)
&
swapchain
->
frame_latency_fence
)))
{
WARN
(
"Failed to create frame latency fence, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to create frame latency fence, hr %#
l
x.
\n
"
,
hr
);
d3d12_swapchain_destroy
(
swapchain
);
return
hr
;
}
...
...
@@ -3055,7 +3055,7 @@ static HRESULT d3d12_swapchain_init(struct d3d12_swapchain *swapchain, IWineDXGI
if
(
!
(
swapchain
->
frame_latency_event
=
CreateEventW
(
NULL
,
FALSE
,
TRUE
,
NULL
)))
{
hr
=
HRESULT_FROM_WIN32
(
GetLastError
());
WARN
(
"Failed to create frame latency event, hr %#x.
\n
"
,
hr
);
WARN
(
"Failed to create frame latency event, hr %#
l
x.
\n
"
,
hr
);
d3d12_swapchain_destroy
(
swapchain
);
return
hr
;
}
...
...
@@ -3090,7 +3090,7 @@ HRESULT d3d12_swapchain_create(IWineDXGIFactory *factory, ID3D12CommandQueue *qu
if
(
FAILED
(
hr
=
ID3D12CommandQueue_GetDevice
(
queue
,
&
IID_ID3D12Device
,
(
void
**
)
&
device
)))
{
ERR
(
"Failed to get
D3D12 device, hr %#
x.
\n
"
,
hr
);
ERR
(
"Failed to get
d3d12 device, hr %#l
x.
\n
"
,
hr
);
heap_free
(
object
);
return
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