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
4a332a76
Commit
4a332a76
authored
Jun 21, 2018
by
Józef Kucia
Committed by
Alexandre Julliard
Jun 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vulkan-1/tests: Add tests.
Signed-off-by:
Józef Kucia
<
jkucia@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9269562a
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
100 additions
and
0 deletions
+100
-0
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/vulkan-1/Makefile.in
+1
-0
Makefile.in
dlls/vulkan-1/tests/Makefile.in
+5
-0
vulkan.c
dlls/vulkan-1/tests/vulkan.c
+92
-0
No files found.
configure
View file @
4a332a76
...
...
@@ -19222,6 +19222,7 @@ wine_fn_config_makefile dlls/vnetbios.vxd enable_win16
wine_fn_config_makefile dlls/vssapi enable_vssapi
wine_fn_config_makefile dlls/vtdapi.vxd enable_win16
wine_fn_config_makefile dlls/vulkan-1 enable_vulkan_1
wine_fn_config_makefile dlls/vulkan-1/tests enable_tests
wine_fn_config_makefile dlls/vwin32.vxd enable_win16
wine_fn_config_makefile dlls/w32skrnl enable_win16
wine_fn_config_makefile dlls/w32sys.dll16 enable_win16
...
...
configure.ac
View file @
4a332a76
...
...
@@ -3721,6 +3721,7 @@ WINE_CONFIG_MAKEFILE(dlls/vnetbios.vxd,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/vssapi)
WINE_CONFIG_MAKEFILE(dlls/vtdapi.vxd,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/vulkan-1)
WINE_CONFIG_MAKEFILE(dlls/vulkan-1/tests)
WINE_CONFIG_MAKEFILE(dlls/vwin32.vxd,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/w32skrnl,enable_win16)
WINE_CONFIG_MAKEFILE(dlls/w32sys.dll16,enable_win16)
...
...
dlls/vulkan-1/Makefile.in
View file @
4a332a76
MODULE
=
vulkan-1.dll
IMPORTS
=
winevulkan
IMPORTLIB
=
vulkan-1
C_SRCS
=
\
vulkan.c
...
...
dlls/vulkan-1/tests/Makefile.in
0 → 100644
View file @
4a332a76
TESTDLL
=
vulkan-1.dll
IMPORTS
=
vulkan-1
C_SRCS
=
\
vulkan.c
dlls/vulkan-1/tests/vulkan.c
0 → 100644
View file @
4a332a76
/*
* Copyright 2018 Józef Kucia 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
*/
#include "windows.h"
#include "wine/heap.h"
#include "wine/vulkan.h"
#include "wine/test.h"
static
VkResult
create_instance
(
uint32_t
extension_count
,
const
char
*
const
*
enabled_extensions
,
VkInstance
*
vk_instance
)
{
VkInstanceCreateInfo
create_info
;
create_info
.
sType
=
VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO
;
create_info
.
pNext
=
NULL
;
create_info
.
flags
=
0
;
create_info
.
pApplicationInfo
=
NULL
;
create_info
.
enabledLayerCount
=
0
;
create_info
.
ppEnabledLayerNames
=
NULL
;
create_info
.
enabledExtensionCount
=
extension_count
;
create_info
.
ppEnabledExtensionNames
=
enabled_extensions
;
return
vkCreateInstance
(
&
create_info
,
NULL
,
vk_instance
);
}
static
void
test_enumerate_physical_devices
(
void
)
{
VkPhysicalDevice
*
vk_physical_devices
;
VkPhysicalDeviceProperties
properties
;
VkInstance
vk_instance
;
unsigned
int
i
;
uint32_t
count
;
VkResult
vr
;
if
((
vr
=
create_instance
(
0
,
NULL
,
&
vk_instance
))
<
0
)
{
skip
(
"Failed to create Vulkan instance, vr %d.
\n
"
,
vr
);
return
;
}
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected VkResult %d.
\n
"
,
vr
);
vr
=
vkEnumeratePhysicalDevices
(
vk_instance
,
&
count
,
NULL
);
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected VkResult %d.
\n
"
,
vr
);
if
(
!
count
)
{
skip
(
"No physical devices.
\n
"
);
vkDestroyInstance
(
vk_instance
,
NULL
);
return
;
}
trace
(
"Got %u physical device(s).
\n
"
,
count
);
vk_physical_devices
=
heap_calloc
(
count
,
sizeof
(
*
vk_physical_devices
));
ok
(
!!
vk_physical_devices
,
"Failed to allocate memory.
\n
"
);
vr
=
vkEnumeratePhysicalDevices
(
vk_instance
,
&
count
,
vk_physical_devices
);
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected VkResult %d.
\n
"
,
vr
);
for
(
i
=
0
;
i
<
count
;
++
i
)
{
vkGetPhysicalDeviceProperties
(
vk_physical_devices
[
i
],
&
properties
);
trace
(
"Device '%s', %#x:%#x, driver version %u.%u.%u (%#x), api version %u.%u.%u.
\n
"
,
properties
.
deviceName
,
properties
.
vendorID
,
properties
.
deviceID
,
VK_VERSION_MAJOR
(
properties
.
driverVersion
),
VK_VERSION_MINOR
(
properties
.
driverVersion
),
VK_VERSION_PATCH
(
properties
.
driverVersion
),
properties
.
driverVersion
,
VK_VERSION_MAJOR
(
properties
.
apiVersion
),
VK_VERSION_MINOR
(
properties
.
apiVersion
),
VK_VERSION_PATCH
(
properties
.
apiVersion
));
}
heap_free
(
vk_physical_devices
);
vkDestroyInstance
(
vk_instance
,
NULL
);
}
START_TEST
(
vulkan
)
{
test_enumerate_physical_devices
();
}
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