Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexey Alyaev
wine
Commits
1dad7595
Commit
1dad7595
authored
16 years ago
by
Henri Verbeet
Committed by
Alexandre Julliard
16 years ago
Browse files
Options
Downloads
Patches
Plain Diff
d3d10core: Add a test for D3D10CoreCreateDevice().
parent
1dea8291
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
configure
+9
-0
9 additions, 0 deletions
configure
configure.ac
+1
-0
1 addition, 0 deletions
configure.ac
dlls/d3d10core/tests/Makefile.in
+13
-0
13 additions, 0 deletions
dlls/d3d10core/tests/Makefile.in
dlls/d3d10core/tests/device.c
+113
-0
113 additions, 0 deletions
dlls/d3d10core/tests/device.c
with
136 additions
and
0 deletions
configure
+
9
−
0
View file @
1dad7595
...
...
@@ -24297,6 +24297,14 @@ ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/d3d10core/Makefile: dlls/d3d10core/Makefile.in dlls/Makedll.rules"
ac_config_files="$ac_config_files dlls/d3d10core/Makefile"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/d3d10core/tests/Makefile"
test "x$enable_d3d10core_tests" != xno && ALL_TEST_DIRS="$ALL_TEST_DIRS \\
d3d10core/tests"
ALL_MAKEFILE_DEPENDS="$ALL_MAKEFILE_DEPENDS
dlls/d3d10core/tests/Makefile: dlls/d3d10core/tests/Makefile.in dlls/Maketest.rules"
ac_config_files="$ac_config_files dlls/d3d10core/tests/Makefile"
ALL_MAKEFILES="$ALL_MAKEFILES \\
dlls/d3d8/Makefile"
test "x$enable_d3d8" != xno && ALL_DLL_DIRS="$ALL_DLL_DIRS \\
...
...
@@ -28104,6 +28112,7 @@ do
"dlls/d3d10/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10/Makefile" ;;
"dlls/d3d10/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10/tests/Makefile" ;;
"dlls/d3d10core/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10core/Makefile" ;;
"dlls/d3d10core/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d10core/tests/Makefile" ;;
"dlls/d3d8/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d8/Makefile" ;;
"dlls/d3d8/tests/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d8/tests/Makefile" ;;
"dlls/d3d9/Makefile") CONFIG_FILES="$CONFIG_FILES dlls/d3d9/Makefile" ;;
...
...
This diff is collapsed.
Click to expand it.
configure.ac
+
1
−
0
View file @
1dad7595
...
...
@@ -1777,6 +1777,7 @@ WINE_CONFIG_MAKEFILE([dlls/ctl3d32/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DL
WINE_CONFIG_MAKEFILE([dlls/d3d10/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/d3d10/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS])
WINE_CONFIG_MAKEFILE([dlls/d3d10core/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/d3d10core/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS])
WINE_CONFIG_MAKEFILE([dlls/d3d8/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
WINE_CONFIG_MAKEFILE([dlls/d3d8/tests/Makefile],[dlls/Maketest.rules],[dlls],[ALL_TEST_DIRS])
WINE_CONFIG_MAKEFILE([dlls/d3d9/Makefile],[dlls/Makedll.rules],[dlls],[ALL_DLL_DIRS])
...
...
This diff is collapsed.
Click to expand it.
dlls/d3d10core/tests/Makefile.in
0 → 100644
+
13
−
0
View file @
1dad7595
TOPSRCDIR
=
@top_srcdir@
TOPOBJDIR
=
../../..
SRCDIR
=
@srcdir@
VPATH
=
@srcdir@
TESTDLL
=
d3d10core.dll
IMPORTS
=
d3d10core dxgi kernel32
CTESTS
=
\
device.c
\
@MAKE_TEST_RULES@
@DEPENDENCIES@
# everything below this line is overwritten by make depend
This diff is collapsed.
Click to expand it.
dlls/d3d10core/tests/device.c
0 → 100644
+
113
−
0
View file @
1dad7595
/*
* Copyright 2008 Henri Verbeet for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include
"initguid.h"
#include
"d3d10.h"
#include
"wine/test.h"
HRESULT
WINAPI
D3D10CoreCreateDevice
(
IDXGIFactory
*
factory
,
IDXGIAdapter
*
adapter
,
UINT
flags
,
DWORD
unknown0
,
ID3D10Device
**
device
);
static
ID3D10Device
*
create_device
(
void
)
{
IDXGIFactory
*
factory
=
NULL
;
IDXGIAdapter
*
adapter
=
NULL
;
ID3D10Device
*
device
=
NULL
;
HRESULT
hr
;
hr
=
CreateDXGIFactory
(
&
IID_IDXGIFactory
,
(
void
*
)
&
factory
);
ok
(
SUCCEEDED
(
hr
),
"CreateDXGIFactory failed, hr %#x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
hr
=
IDXGIFactory_EnumAdapters
(
factory
,
0
,
&
adapter
);
ok
(
SUCCEEDED
(
hr
),
"EnumAdapters failed, hr %#x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
hr
=
D3D10CoreCreateDevice
(
factory
,
adapter
,
0
,
0
,
&
device
);
if
(
FAILED
(
hr
))
{
HMODULE
d3d10ref
;
trace
(
"Failed to create a HW device, trying REF
\n
"
);
IDXGIAdapter_Release
(
adapter
);
adapter
=
NULL
;
d3d10ref
=
LoadLibraryA
(
"d3d10ref.dll"
);
if
(
!
d3d10ref
)
{
trace
(
"d3d10ref.dll not available, unable to create a REF device
\n
"
);
goto
cleanup
;
}
hr
=
IDXGIFactory_CreateSoftwareAdapter
(
factory
,
d3d10ref
,
&
adapter
);
FreeLibrary
(
d3d10ref
);
ok
(
SUCCEEDED
(
hr
),
"CreateSoftwareAdapter failed, hr %#x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
hr
=
D3D10CoreCreateDevice
(
factory
,
adapter
,
0
,
0
,
&
device
);
ok
(
SUCCEEDED
(
hr
),
"Failed to create a REF device, hr %#x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
goto
cleanup
;
}
cleanup:
if
(
adapter
)
IDXGIAdapter_Release
(
adapter
);
if
(
factory
)
IDXGIFactory_Release
(
factory
);
return
device
;
}
static
void
test_device_interfaces
(
ID3D10Device
*
device
)
{
IUnknown
*
obj
;
HRESULT
hr
;
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IUnknown
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IUnknown
\n
"
);
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IDXGIObject
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IDXGIObject
\n
"
);
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_IDXGIDevice
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement IDXGIDevice
\n
"
);
if
(
SUCCEEDED
(
hr
=
ID3D10Device_QueryInterface
(
device
,
&
IID_ID3D10Device
,
(
void
**
)
&
obj
)))
IUnknown_Release
(
obj
);
ok
(
SUCCEEDED
(
hr
),
"ID3D10Device does not implement ID3D10Device
\n
"
);
}
START_TEST
(
device
)
{
ID3D10Device
*
device
;
ULONG
refcount
;
device
=
create_device
();
if
(
!
device
)
{
skip
(
"Failed to create device, skipping tests
\n
"
);
return
;
}
test_device_interfaces
(
device
);
refcount
=
ID3D10Device_Release
(
device
);
ok
(
!
refcount
,
"Device has %u references left
\n
"
,
refcount
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment