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
4cf1bb92
Commit
4cf1bb92
authored
Aug 24, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Aug 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Allow to pass NULL as device to D3D11CreateDevice.
parent
66b2d96a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
7 deletions
+13
-7
d3d11_main.c
dlls/d3d11/d3d11_main.c
+13
-7
No files found.
dlls/d3d11/d3d11_main.c
View file @
4cf1bb92
...
...
@@ -145,16 +145,17 @@ HRESULT WINAPI D3D11CoreCreateDevice(IDXGIFactory *factory, IDXGIAdapter *adapte
}
HRESULT
WINAPI
D3D11CreateDevice
(
IDXGIAdapter
*
adapter
,
D3D_DRIVER_TYPE
driver_type
,
HMODULE
swrast
,
UINT
flags
,
const
D3D_FEATURE_LEVEL
*
feature_levels
,
UINT
levels
,
UINT
sdk_version
,
ID3D11Device
**
device
,
const
D3D_FEATURE_LEVEL
*
feature_levels
,
UINT
levels
,
UINT
sdk_version
,
ID3D11Device
**
device
_out
,
D3D_FEATURE_LEVEL
*
obtained_feature_level
,
ID3D11DeviceContext
**
immediate_context
)
{
IDXGIFactory
*
factory
;
ID3D11Device
*
device
;
HRESULT
hr
;
TRACE
(
"adapter %p, driver_type %s, swrast %p, flags %#x, feature_levels %p, levels %u, sdk_version %u, "
"device %p, obtained_feature_level %p, immediate_context %p.
\n
"
,
adapter
,
debug_d3d_driver_type
(
driver_type
),
swrast
,
flags
,
feature_levels
,
levels
,
sdk_version
,
device
,
obtained_feature_level
,
immediate_context
);
device
_out
,
obtained_feature_level
,
immediate_context
);
if
(
adapter
)
{
...
...
@@ -237,7 +238,7 @@ HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_t
}
}
hr
=
D3D11CoreCreateDevice
(
factory
,
adapter
,
flags
,
feature_levels
,
levels
,
device
);
hr
=
D3D11CoreCreateDevice
(
factory
,
adapter
,
flags
,
feature_levels
,
levels
,
&
device
);
IDXGIAdapter_Release
(
adapter
);
IDXGIFactory_Release
(
factory
);
if
(
FAILED
(
hr
))
...
...
@@ -246,15 +247,20 @@ HRESULT WINAPI D3D11CreateDevice(IDXGIAdapter *adapter, D3D_DRIVER_TYPE driver_t
return
hr
;
}
TRACE
(
"Created ID3D11Device %p.
\n
"
,
*
device
);
TRACE
(
"Created ID3D11Device %p.
\n
"
,
device
);
if
(
obtained_feature_level
)
*
obtained_feature_level
=
ID3D11Device_GetFeatureLevel
(
*
device
);
*
obtained_feature_level
=
ID3D11Device_GetFeatureLevel
(
device
);
if
(
immediate_context
)
ID3D11Device_GetImmediateContext
(
*
device
,
immediate_context
);
ID3D11Device_GetImmediateContext
(
device
,
immediate_context
);
return
hr
;
if
(
device_out
)
*
device_out
=
device
;
else
ID3D11Device_Release
(
device
);
return
S_OK
;
}
HRESULT
WINAPI
D3D11CreateDeviceAndSwapChain
(
IDXGIAdapter
*
adapter
,
D3D_DRIVER_TYPE
driver_type
,
...
...
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