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
a9cb14dd
Commit
a9cb14dd
authored
Aug 21, 2015
by
Józef Kucia
Committed by
Alexandre Julliard
Aug 21, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d11: Move d3d10core to d3d11.
parent
2d13e0f1
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
168 additions
and
123 deletions
+168
-123
configure
configure
+1
-1
configure.ac
configure.ac
+1
-1
Makefile.in
dlls/d3d10core/Makefile.in
+2
-11
d3d10core_main.c
dlls/d3d10core/d3d10core_main.c
+20
-76
Makefile.in
dlls/d3d11/Makefile.in
+12
-1
async.c
dlls/d3d11/async.c
+2
-2
buffer.c
dlls/d3d11/buffer.c
+2
-2
d3d11.spec
dlls/d3d11/d3d11.spec
+2
-2
d3d11_main.c
dlls/d3d11/d3d11_main.c
+104
-5
d3d11_private.h
dlls/d3d11/d3d11_private.h
+4
-4
device.c
dlls/d3d11/device.c
+2
-2
inputlayout.c
dlls/d3d11/inputlayout.c
+2
-2
shader.c
dlls/d3d11/shader.c
+2
-2
state.c
dlls/d3d11/state.c
+2
-2
texture.c
dlls/d3d11/texture.c
+2
-2
utils.c
dlls/d3d11/utils.c
+2
-2
view.c
dlls/d3d11/view.c
+2
-2
dxgi_main.c
dlls/dxgi/dxgi_main.c
+4
-4
No files found.
configure
View file @
a9cb14dd
...
...
@@ -17235,7 +17235,7 @@ wine_fn_config_test dlls/d3d10/tests d3d10_test
wine_fn_config_dll d3d10_1 enable_d3d10_1 implib
wine_fn_config_dll d3d10core enable_d3d10core implib
wine_fn_config_test dlls/d3d10core/tests d3d10core_test
wine_fn_config_dll d3d11 enable_d3d11
wine_fn_config_dll d3d11 enable_d3d11
implib
wine_fn_config_dll d3d8 enable_d3d8 implib
wine_fn_config_test dlls/d3d8/tests d3d8_test
wine_fn_config_dll d3d9 enable_d3d9 implib
...
...
configure.ac
View file @
a9cb14dd
...
...
@@ -2836,7 +2836,7 @@ WINE_CONFIG_TEST(dlls/d3d10/tests)
WINE_CONFIG_DLL(d3d10_1,,[implib])
WINE_CONFIG_DLL(d3d10core,,[implib])
WINE_CONFIG_TEST(dlls/d3d10core/tests)
WINE_CONFIG_DLL(d3d11)
WINE_CONFIG_DLL(d3d11
,,[implib]
)
WINE_CONFIG_DLL(d3d8,,[implib])
WINE_CONFIG_TEST(dlls/d3d8/tests)
WINE_CONFIG_DLL(d3d9,,[implib])
...
...
dlls/d3d10core/Makefile.in
View file @
a9cb14dd
MODULE
=
d3d10core.dll
IMPORTLIB
=
d3d10core
IMPORTS
=
d
xguid uuid dxgi wined3d
IMPORTS
=
d
3d11
C_SRCS
=
\
async.c
\
buffer.c
\
d3d10core_main.c
\
device.c
\
inputlayout.c
\
shader.c
\
state.c
\
texture.c
\
utils.c
\
view.c
d3d10core_main.c
RC_SRCS
=
version.rc
dlls/d3d10core/d3d10core_main.c
View file @
a9cb14dd
...
...
@@ -17,102 +17,46 @@
*
*/
#include "config.h"
#include "wine/port.h"
#include "wine/debug.h"
#define D3D10CORE_INIT_GUID
#include "d3d10core_private.h"
#include "initguid.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d10core
);
static
HRESULT
WINAPI
layer_init
(
enum
dxgi_device_layer_id
id
,
DWORD
*
count
,
DWORD
*
values
)
{
TRACE
(
"id %#x, count %p, values %p
\n
"
,
id
,
count
,
values
);
if
(
id
!=
DXGI_DEVICE_LAYER_D3D10_DEVICE
)
{
WARN
(
"Unknown layer id %#x
\n
"
,
id
);
return
E_NOTIMPL
;
}
return
S_OK
;
}
static
UINT
WINAPI
layer_get_size
(
enum
dxgi_device_layer_id
id
,
struct
layer_get_size_args
*
args
,
DWORD
unknown0
)
{
TRACE
(
"id %#x, args %p, unknown0 %#x
\n
"
,
id
,
args
,
unknown0
);
if
(
id
!=
DXGI_DEVICE_LAYER_D3D10_DEVICE
)
{
WARN
(
"Unknown layer id %#x
\n
"
,
id
);
return
0
;
}
return
sizeof
(
struct
d3d10_device
);
}
static
HRESULT
WINAPI
layer_create
(
enum
dxgi_device_layer_id
id
,
void
**
layer_base
,
DWORD
unknown0
,
void
*
device_object
,
REFIID
riid
,
void
**
device_layer
)
{
struct
d3d10_device
*
object
;
HRESULT
hr
;
#define COBJMACROS
#include "d3d10_1.h"
#include "d3d11.h"
TRACE
(
"id %#x, layer_base %p, unknown0 %#x, device_object %p, riid %s, device_layer %p
\n
"
,
id
,
layer_base
,
unknown0
,
device_object
,
debugstr_guid
(
riid
),
device_layer
);
if
(
id
!=
DXGI_DEVICE_LAYER_D3D10_DEVICE
)
{
WARN
(
"Unknown layer id %#x
\n
"
,
id
);
*
device_layer
=
NULL
;
return
E_NOTIMPL
;
}
object
=
*
layer_base
;
if
(
FAILED
(
hr
=
d3d10_device_init
(
object
,
device_object
)))
{
WARN
(
"Failed to initialize device, hr %#x.
\n
"
,
hr
);
*
device_layer
=
NULL
;
return
hr
;
}
*
device_layer
=
&
object
->
IUnknown_inner
;
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d10core
);
TRACE
(
"Created d3d10 device at %p
\n
"
,
object
);
return
S_OK
;
}
HRESULT
WINAPI
D3D11CoreCreateDevice
(
IDXGIFactory
*
factory
,
IDXGIAdapter
*
adapter
,
UINT
flags
,
const
D3D_FEATURE_LEVEL
*
feature_levels
,
UINT
levels
,
ID3D11Device
**
device
);
HRESULT
WINAPI
D3D10CoreRegisterLayers
(
void
)
{
const
struct
dxgi_device_layer
layers
[]
=
{
{
DXGI_DEVICE_LAYER_D3D10_DEVICE
,
layer_init
,
layer_get_size
,
layer_create
},
};
DXGID3D10RegisterLayers
(
layers
,
sizeof
(
layers
)
/
sizeof
(
*
layers
));
TRACE
(
"
\n
"
);
return
S_OK
;
return
E_NOTIMPL
;
}
HRESULT
WINAPI
D3D10CoreCreateDevice
(
IDXGIFactory
*
factory
,
IDXGIAdapter
*
adapter
,
UINT
flags
,
void
*
unknown0
,
ID3D10Device
**
device
)
{
IUnknown
*
dxgi_device
;
HMODULE
d3d10core
;
D3D_FEATURE_LEVEL
feature_level
=
D3D_FEATURE_LEVEL_10_0
;
ID3D11Device
*
device11
;
HRESULT
hr
;
TRACE
(
"factory %p, adapter %p, flags %#x, unknown0 %p, device %p.
\n
"
,
factory
,
adapter
,
flags
,
unknown0
,
device
);
d3d10core
=
GetModuleHandleA
(
"d3d10core.dll"
);
hr
=
DXGID3D10CreateDevice
(
d3d10core
,
factory
,
adapter
,
flags
,
unknown0
,
(
void
**
)
&
dxgi_device
);
if
(
FAILED
(
hr
=
D3D11CoreCreateDevice
(
factory
,
adapter
,
flags
,
&
feature_level
,
1
,
&
device11
)))
return
hr
;
hr
=
ID3D11Device_QueryInterface
(
device11
,
&
IID_ID3D10Device
,
(
void
**
)
device
);
ID3D11Device_Release
(
device11
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create device, returning %#x
\n
"
,
hr
);
return
hr
;
ERR
(
"Device should implement ID3D10Device, returning E_FAIL.
\n
"
);
return
E_FAIL
;
}
hr
=
IUnknown_QueryInterface
(
dxgi_device
,
&
IID_ID3D10Device
,
(
void
**
)
device
);
IUnknown_Release
(
dxgi_device
);
return
hr
;
return
S_OK
;
}
dlls/d3d11/Makefile.in
View file @
a9cb14dd
MODULE
=
d3d11.dll
IMPORTLIB
=
d3d11
IMPORTS
=
dxguid uuid dxgi wined3d
C_SRCS
=
\
d3d11_main.c
async.c
\
buffer.c
\
d3d11_main.c
\
device.c
\
inputlayout.c
\
shader.c
\
state.c
\
texture.c
\
utils.c
\
view.c
RC_SRCS
=
version.rc
dlls/d3d1
0core
/async.c
→
dlls/d3d1
1
/async.c
View file @
a9cb14dd
...
...
@@ -20,9 +20,9 @@
#include "config.h"
#include "wine/port.h"
#include "d3d1
0core
_private.h"
#include "d3d1
1
_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
0core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
1
);
static
inline
struct
d3d10_query
*
impl_from_ID3D10Query
(
ID3D10Query
*
iface
)
{
...
...
dlls/d3d1
0core
/buffer.c
→
dlls/d3d1
1
/buffer.c
View file @
a9cb14dd
...
...
@@ -20,9 +20,9 @@
#include "config.h"
#include "wine/port.h"
#include "d3d1
0core
_private.h"
#include "d3d1
1
_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
0core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
1
);
static
inline
struct
d3d10_buffer
*
impl_from_ID3D10Buffer
(
ID3D10Buffer
*
iface
)
{
...
...
dlls/d3d11/d3d11.spec
View file @
a9cb14dd
@ st
ub D3D11CoreCreateDevice
@ st
dcall D3D11CoreCreateDevice(ptr ptr long ptr long ptr)
@ stub D3D11CoreCreateLayeredDevice
@ stub D3D11CoreGetLayeredDeviceSize
@ st
ub D3D11CoreRegisterLayers
@ st
dcall D3D11CoreRegisterLayers()
@ stdcall D3D11CreateDevice(ptr long ptr long ptr long long ptr ptr ptr)
@ stdcall D3D11CreateDeviceAndSwapChain(ptr long ptr long ptr long long ptr ptr ptr ptr ptr)
@ stub D3DKMTCloseAdapter
...
...
dlls/d3d11/d3d11_main.c
View file @
a9cb14dd
/*
* Direct3D 11
*
* Copyright 2008 Henri Verbeet for CodeWeavers
* Copyright 2013 Austin English
*
* This library is free software; you can redistribute it and/or
...
...
@@ -19,12 +20,11 @@
*
*/
#include <stdarg.h>
#include "config.h"
#include "wine/port.h"
#include "windef.h"
#include "winbase.h"
#include "d3d11.h"
#include "wine/debug.h"
#define D3D11_INIT_GUID
#include "d3d11_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d11
);
...
...
@@ -45,6 +45,105 @@ static const char *debug_d3d_driver_type(D3D_DRIVER_TYPE driver_type)
}
}
static
HRESULT
WINAPI
layer_init
(
enum
dxgi_device_layer_id
id
,
DWORD
*
count
,
DWORD
*
values
)
{
TRACE
(
"id %#x, count %p, values %p
\n
"
,
id
,
count
,
values
);
if
(
id
!=
DXGI_DEVICE_LAYER_D3D10_DEVICE
)
{
WARN
(
"Unknown layer id %#x
\n
"
,
id
);
return
E_NOTIMPL
;
}
return
S_OK
;
}
static
UINT
WINAPI
layer_get_size
(
enum
dxgi_device_layer_id
id
,
struct
layer_get_size_args
*
args
,
DWORD
unknown0
)
{
TRACE
(
"id %#x, args %p, unknown0 %#x
\n
"
,
id
,
args
,
unknown0
);
if
(
id
!=
DXGI_DEVICE_LAYER_D3D10_DEVICE
)
{
WARN
(
"Unknown layer id %#x
\n
"
,
id
);
return
0
;
}
return
sizeof
(
struct
d3d10_device
);
}
static
HRESULT
WINAPI
layer_create
(
enum
dxgi_device_layer_id
id
,
void
**
layer_base
,
DWORD
unknown0
,
void
*
device_object
,
REFIID
riid
,
void
**
device_layer
)
{
struct
d3d10_device
*
object
;
HRESULT
hr
;
TRACE
(
"id %#x, layer_base %p, unknown0 %#x, device_object %p, riid %s, device_layer %p
\n
"
,
id
,
layer_base
,
unknown0
,
device_object
,
debugstr_guid
(
riid
),
device_layer
);
if
(
id
!=
DXGI_DEVICE_LAYER_D3D10_DEVICE
)
{
WARN
(
"Unknown layer id %#x
\n
"
,
id
);
*
device_layer
=
NULL
;
return
E_NOTIMPL
;
}
object
=
*
layer_base
;
if
(
FAILED
(
hr
=
d3d10_device_init
(
object
,
device_object
)))
{
WARN
(
"Failed to initialize device, hr %#x.
\n
"
,
hr
);
*
device_layer
=
NULL
;
return
hr
;
}
*
device_layer
=
&
object
->
IUnknown_inner
;
TRACE
(
"Created d3d10 device at %p
\n
"
,
object
);
return
S_OK
;
}
HRESULT
WINAPI
D3D11CoreRegisterLayers
(
void
)
{
const
struct
dxgi_device_layer
layers
[]
=
{
{
DXGI_DEVICE_LAYER_D3D10_DEVICE
,
layer_init
,
layer_get_size
,
layer_create
},
};
DXGID3D10RegisterLayers
(
layers
,
sizeof
(
layers
)
/
sizeof
(
*
layers
));
return
S_OK
;
}
HRESULT
WINAPI
D3D11CoreCreateDevice
(
IDXGIFactory
*
factory
,
IDXGIAdapter
*
adapter
,
UINT
flags
,
const
D3D_FEATURE_LEVEL
*
feature_levels
,
UINT
levels
,
ID3D11Device
**
device
)
{
IUnknown
*
dxgi_device
;
HMODULE
d3d11
;
HRESULT
hr
;
TRACE
(
"factory %p, adapter %p, flags %#x, feature_levels %p, levels %u, device %p.
\n
"
,
factory
,
adapter
,
flags
,
feature_levels
,
levels
,
device
);
FIXME
(
"Ignoring feature levels.
\n
"
);
d3d11
=
GetModuleHandleA
(
"d3d11.dll"
);
hr
=
DXGID3D10CreateDevice
(
d3d11
,
factory
,
adapter
,
flags
,
0
,
(
void
**
)
&
dxgi_device
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create device, returning %#x.
\n
"
,
hr
);
return
hr
;
}
hr
=
IUnknown_QueryInterface
(
dxgi_device
,
&
IID_ID3D11Device
,
(
void
**
)
device
);
IUnknown_Release
(
dxgi_device
);
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to query ID3D11Device interface, returning E_FAIL.
\n
"
);
return
E_FAIL
;
}
return
S_OK
;
}
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
,
D3D_FEATURE_LEVEL
*
feature_level
,
ID3D11DeviceContext
**
context
)
...
...
dlls/d3d1
0core/d3d10core
_private.h
→
dlls/d3d1
1/d3d11
_private.h
View file @
a9cb14dd
...
...
@@ -16,8 +16,8 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WINE_D3D1
0CORE
_PRIVATE_H
#define __WINE_D3D1
0CORE
_PRIVATE_H
#ifndef __WINE_D3D1
1
_PRIVATE_H
#define __WINE_D3D1
1
_PRIVATE_H
#include "wine/debug.h"
...
...
@@ -31,7 +31,7 @@
#include "d3d10_1.h"
#include "d3d11_1.h"
#ifdef D3D1
0CORE
_INIT_GUID
#ifdef D3D1
1
_INIT_GUID
#include "initguid.h"
#endif
#include "wine/wined3d.h"
...
...
@@ -397,4 +397,4 @@ HRESULT WINAPI DXGID3D10CreateDevice(HMODULE d3d10core, IDXGIFactory *factory, I
UINT
flags
,
void
*
unknown0
,
void
**
device
);
HRESULT
WINAPI
DXGID3D10RegisterLayers
(
const
struct
dxgi_device_layer
*
layers
,
UINT
layer_count
);
#endif
/* __WINE_D3D1
0CORE
_PRIVATE_H */
#endif
/* __WINE_D3D1
1
_PRIVATE_H */
dlls/d3d1
0core
/device.c
→
dlls/d3d1
1
/device.c
View file @
a9cb14dd
...
...
@@ -20,9 +20,9 @@
#include "config.h"
#include "wine/port.h"
#include "d3d1
0core
_private.h"
#include "d3d1
1
_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
0core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
1
);
static
void
STDMETHODCALLTYPE
d3d10_null_wined3d_object_destroyed
(
void
*
parent
)
{}
...
...
dlls/d3d1
0core
/inputlayout.c
→
dlls/d3d1
1
/inputlayout.c
View file @
a9cb14dd
...
...
@@ -20,9 +20,9 @@
#include "config.h"
#include "wine/port.h"
#include "d3d1
0core
_private.h"
#include "d3d1
1
_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
0core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
1
);
static
HRESULT
isgn_handler
(
const
char
*
data
,
DWORD
data_size
,
DWORD
tag
,
void
*
ctx
)
{
...
...
dlls/d3d1
0core
/shader.c
→
dlls/d3d1
1
/shader.c
View file @
a9cb14dd
...
...
@@ -20,9 +20,9 @@
#include "config.h"
#include "wine/port.h"
#include "d3d1
0core
_private.h"
#include "d3d1
1
_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
0core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
1
);
static
HRESULT
shdr_handler
(
const
char
*
data
,
DWORD
data_size
,
DWORD
tag
,
void
*
ctx
)
{
...
...
dlls/d3d1
0core
/state.c
→
dlls/d3d1
1
/state.c
View file @
a9cb14dd
...
...
@@ -20,9 +20,9 @@
#include "config.h"
#include "wine/port.h"
#include "d3d1
0core
_private.h"
#include "d3d1
1
_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
0core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
1
);
#define D3D10_FILTER_MIP_MASK 0x01
#define D3D10_FILTER_MAG_MASK 0x04
...
...
dlls/d3d1
0core
/texture.c
→
dlls/d3d1
1
/texture.c
View file @
a9cb14dd
...
...
@@ -20,9 +20,9 @@
#include "config.h"
#include "wine/port.h"
#include "d3d1
0core
_private.h"
#include "d3d1
1
_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
0core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
1
);
static
inline
struct
d3d10_texture2d
*
impl_from_ID3D10Texture2D
(
ID3D10Texture2D
*
iface
)
{
...
...
dlls/d3d1
0core
/utils.c
→
dlls/d3d1
1
/utils.c
View file @
a9cb14dd
...
...
@@ -20,9 +20,9 @@
#include "config.h"
#include "wine/port.h"
#include "d3d1
0core
_private.h"
#include "d3d1
1
_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
0core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
1
);
#define WINE_D3D10_TO_STR(x) case x: return #x
...
...
dlls/d3d1
0core
/view.c
→
dlls/d3d1
1
/view.c
View file @
a9cb14dd
...
...
@@ -21,9 +21,9 @@
#include "wine/port.h"
#define NONAMELESSUNION
#include "d3d1
0core
_private.h"
#include "d3d1
1
_private.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
0core
);
WINE_DEFAULT_DEBUG_CHANNEL
(
d3d1
1
);
static
HRESULT
set_dsdesc_from_resource
(
D3D10_DEPTH_STENCIL_VIEW_DESC
*
desc
,
ID3D10Resource
*
resource
)
{
...
...
dlls/dxgi/dxgi_main.c
View file @
a9cb14dd
...
...
@@ -107,7 +107,7 @@ static HRESULT register_d3d10core_layers(HMODULE d3d10core)
if
(
!
dxgi_main
.
d3d10core
)
{
HRESULT
hr
;
HRESULT
(
WINAPI
*
d3d1
0
core_register_layers
)(
void
);
HRESULT
(
WINAPI
*
d3d1
1
core_register_layers
)(
void
);
HMODULE
mod
;
BOOL
ret
;
...
...
@@ -117,11 +117,11 @@ static HRESULT register_d3d10core_layers(HMODULE d3d10core)
return
E_FAIL
;
}
d3d1
0core_register_layers
=
(
void
*
)
GetProcAddress
(
mod
,
"D3D10
CoreRegisterLayers"
);
hr
=
d3d1
0
core_register_layers
();
d3d1
1core_register_layers
=
(
void
*
)
GetProcAddress
(
mod
,
"D3D11
CoreRegisterLayers"
);
hr
=
d3d1
1
core_register_layers
();
if
(
FAILED
(
hr
))
{
ERR
(
"Failed to register d3d1
0core
layers, returning %#x
\n
"
,
hr
);
ERR
(
"Failed to register d3d1
1
layers, returning %#x
\n
"
,
hr
);
LeaveCriticalSection
(
&
dxgi_cs
);
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