Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
81e92fc8
Commit
81e92fc8
authored
Nov 14, 2008
by
Henri Verbeet
Committed by
Alexandre Julliard
Nov 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3d10: Implement D3D10CreateDevice() on top of D3D10CoreCreateDevice().
parent
3505b5cf
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
102 additions
and
3 deletions
+102
-3
Makefile.in
dlls/Makefile.in
+5
-0
Makefile.in
dlls/d3d10/Makefile.in
+1
-1
d3d10_main.c
dlls/d3d10/d3d10_main.c
+91
-2
d3d10_private.h
dlls/d3d10/d3d10_private.h
+4
-0
Makefile.in
dlls/d3d10core/Makefile.in
+1
-0
No files found.
dlls/Makefile.in
View file @
81e92fc8
...
...
@@ -199,6 +199,7 @@ IMPORT_LIBS = \
cryptui/libcryptui.
$(IMPLIBEXT)
\
ctl3d32/libctl3d32.
$(IMPLIBEXT)
\
d3d10/libd3d10.
$(IMPLIBEXT)
\
d3d10core/libd3d10core.
$(IMPLIBEXT)
\
d3d8/libd3d8.
$(IMPLIBEXT)
\
d3d9/libd3d9.
$(IMPLIBEXT)
\
d3dim/libd3dim.
$(IMPLIBEXT)
\
...
...
@@ -341,6 +342,7 @@ CROSS_IMPLIBS = \
cryptui/libcryptui.a
\
ctl3d32/libctl3d32.a
\
d3d10/libd3d10.a
\
d3d10core/libd3d10core.a
\
d3d8/libd3d8.a
\
d3d9/libd3d9.a
\
d3dim/libd3dim.a
\
...
...
@@ -527,6 +529,9 @@ ctl3d32/libctl3d32.def ctl3d32/libctl3d32.a: ctl3d32/ctl3d32.spec $(WINEBUILD)
d3d10/libd3d10.def d3d10/libd3d10.a
:
d3d10/d3d10.spec $(WINEBUILD)
@
cd
d3d10
&&
$(MAKE)
`
basename
$@
`
d3d10core/libd3d10core.def d3d10core/libd3d10core.a
:
d3d10core/d3d10core.spec $(WINEBUILD)
@
cd
d3d10core
&&
$(MAKE)
`
basename
$@
`
d3d8/libd3d8.def d3d8/libd3d8.a
:
d3d8/d3d8.spec $(WINEBUILD)
@
cd
d3d8
&&
$(MAKE)
`
basename
$@
`
...
...
dlls/d3d10/Makefile.in
View file @
81e92fc8
...
...
@@ -4,7 +4,7 @@ SRCDIR = @srcdir@
VPATH
=
@srcdir@
MODULE
=
d3d10.dll
IMPORTLIB
=
d3d10
IMPORTS
=
dxguid uuid dxgi kernel32
IMPORTS
=
dxguid uuid d
3d10core d
xgi kernel32
C_SRCS
=
\
d3d10_main.c
\
...
...
dlls/d3d10/d3d10_main.c
View file @
81e92fc8
...
...
@@ -42,10 +42,99 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpv)
HRESULT
WINAPI
D3D10CreateDevice
(
IDXGIAdapter
*
adapter
,
D3D10_DRIVER_TYPE
driver_type
,
HMODULE
swrast
,
UINT
flags
,
UINT
sdk_version
,
ID3D10Device
**
device
)
{
FIXME
(
"adapter %p, driver_type %s, swrast %p, flags %#x, sdk_version %d, device %p stub!
\n
"
,
IDXGIFactory
*
factory
;
HRESULT
hr
;
TRACE
(
"adapter %p, driver_type %s, swrast %p, flags %#x, sdk_version %d, device %p
\n
"
,
adapter
,
debug_d3d10_driver_type
(
driver_type
),
swrast
,
flags
,
sdk_version
,
device
);
return
E_NOTIMPL
;
if
(
adapter
)
{
IDXGIAdapter_AddRef
(
adapter
);
hr
=
IDXGIAdapter_GetParent
(
adapter
,
&
IID_IDXGIFactory
,
(
void
**
)
&
factory
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to get dxgi factory, returning %#x
\n
"
,
hr
);
return
hr
;
}
}
else
{
hr
=
CreateDXGIFactory
(
&
IID_IDXGIFactory
,
(
void
**
)
&
factory
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create dxgi factory, returning %#x
\n
"
,
hr
);
return
hr
;
}
switch
(
driver_type
)
{
case
D3D10_DRIVER_TYPE_HARDWARE
:
{
hr
=
IDXGIFactory_EnumAdapters
(
factory
,
0
,
&
adapter
);
if
(
FAILED
(
hr
))
{
WARN
(
"No adapters found, returning %#x
\n
"
,
hr
);
IDXGIFactory_Release
(
factory
);
return
hr
;
}
break
;
}
case
D3D10_DRIVER_TYPE_NULL
:
FIXME
(
"NULL device not implemented, falling back to refrast
\n
"
);
case
D3D10_DRIVER_TYPE_REFERENCE
:
{
HMODULE
refrast
=
LoadLibraryA
(
"d3d10ref.dll"
);
if
(
!
refrast
)
{
WARN
(
"Failed to load refrast, returning E_FAIL
\n
"
);
IDXGIFactory_Release
(
factory
);
return
E_FAIL
;
}
hr
=
IDXGIFactory_CreateSoftwareAdapter
(
factory
,
refrast
,
&
adapter
);
FreeLibrary
(
refrast
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create a software adapter, returning %#x
\n
"
,
hr
);
IDXGIFactory_Release
(
factory
);
return
hr
;
}
break
;
}
case
D3D10_DRIVER_TYPE_SOFTWARE
:
{
if
(
!
swrast
)
{
WARN
(
"Software device requested, but NULL swrast passed, returning E_FAIL
\n
"
);
IDXGIFactory_Release
(
factory
);
return
E_FAIL
;
}
hr
=
IDXGIFactory_CreateSoftwareAdapter
(
factory
,
swrast
,
&
adapter
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create a software adapter, returning %#x
\n
"
,
hr
);
IDXGIFactory_Release
(
factory
);
return
hr
;
}
break
;
}
}
}
hr
=
D3D10CoreCreateDevice
(
factory
,
adapter
,
flags
,
0
,
device
);
IDXGIAdapter_Release
(
adapter
);
IDXGIFactory_Release
(
factory
);
if
(
FAILED
(
hr
))
{
WARN
(
"Failed to create a device, returning %#x
\n
"
,
hr
);
return
hr
;
}
TRACE
(
"Created ID3D10Device %p
\n
"
,
*
device
);
return
hr
;
}
HRESULT
WINAPI
D3D10CreateDeviceAndSwapChain
(
IDXGIAdapter
*
adapter
,
D3D10_DRIVER_TYPE
driver_type
,
...
...
dlls/d3d10/d3d10_private.h
View file @
81e92fc8
...
...
@@ -31,4 +31,8 @@
/* TRACE helper functions */
const
char
*
debug_d3d10_driver_type
(
D3D10_DRIVER_TYPE
driver_type
);
/* D3D10Core */
HRESULT
WINAPI
D3D10CoreCreateDevice
(
IDXGIFactory
*
factory
,
IDXGIAdapter
*
adapter
,
UINT
flags
,
DWORD
unknown0
,
ID3D10Device
**
device
);
#endif
/* __WINE_D3D10_PRIVATE_H */
dlls/d3d10core/Makefile.in
View file @
81e92fc8
...
...
@@ -3,6 +3,7 @@ TOPOBJDIR = ../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
MODULE
=
d3d10core.dll
IMPORTLIB
=
d3d10core
IMPORTS
=
dxguid uuid dxgi kernel32
C_SRCS
=
\
...
...
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