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
c9ff04c3
Commit
c9ff04c3
authored
Nov 04, 2023
by
Alex Henrie
Committed by
Alexandre Julliard
Nov 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vulkan-1/tests: Use CRT allocation functions.
parent
26ad8122
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
15 deletions
+14
-15
vulkan.c
dlls/vulkan-1/tests/vulkan.c
+14
-15
No files found.
dlls/vulkan-1/tests/vulkan.c
View file @
c9ff04c3
...
...
@@ -17,7 +17,6 @@
*/
#include "windows.h"
#include "wine/heap.h"
#include "wine/vulkan.h"
#include "wine/test.h"
...
...
@@ -72,7 +71,7 @@ static VkBool32 find_queue_family(VkPhysicalDevice vk_physical_device,
uint32_t
i
,
count
;
vkGetPhysicalDeviceQueueFamilyProperties
(
vk_physical_device
,
&
count
,
NULL
);
properties
=
heap_
calloc
(
count
,
sizeof
(
*
properties
));
properties
=
calloc
(
count
,
sizeof
(
*
properties
));
ok
(
!!
properties
,
"Failed to allocate memory.
\n
"
);
vkGetPhysicalDeviceQueueFamilyProperties
(
vk_physical_device
,
&
count
,
properties
);
...
...
@@ -86,7 +85,7 @@ static VkBool32 find_queue_family(VkPhysicalDevice vk_physical_device,
}
}
heap_
free
(
properties
);
free
(
properties
);
return
ret
;
}
...
...
@@ -184,7 +183,7 @@ static void test_enumerate_physical_device2(void)
return
;
}
vk_physical_devices
=
heap_
calloc
(
count
,
sizeof
(
*
vk_physical_devices
));
vk_physical_devices
=
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
);
...
...
@@ -225,7 +224,7 @@ static void test_enumerate_physical_device2(void)
}
}
heap_
free
(
vk_physical_devices
);
free
(
vk_physical_devices
);
vkDestroyInstance
(
vk_instance
,
NULL
);
}
...
...
@@ -238,7 +237,7 @@ static void enumerate_device_queues(VkPhysicalDevice vk_physical_device)
vkGetPhysicalDeviceProperties
(
vk_physical_device
,
&
device_properties
);
vkGetPhysicalDeviceQueueFamilyProperties
(
vk_physical_device
,
&
count
,
NULL
);
properties
=
heap_
calloc
(
count
,
sizeof
(
*
properties
));
properties
=
calloc
(
count
,
sizeof
(
*
properties
));
ok
(
!!
properties
,
"Failed to allocate memory.
\n
"
);
vkGetPhysicalDeviceQueueFamilyProperties
(
vk_physical_device
,
&
count
,
properties
);
...
...
@@ -248,7 +247,7 @@ static void enumerate_device_queues(VkPhysicalDevice vk_physical_device)
device_properties
.
deviceName
,
i
,
properties
[
i
].
queueFlags
,
properties
[
i
].
queueCount
);
}
heap_
free
(
properties
);
free
(
properties
);
}
static
void
test_physical_device_groups
(
void
)
...
...
@@ -278,7 +277,7 @@ static void test_physical_device_groups(void)
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected VkResult %d.
\n
"
,
vr
);
ok
(
count
>
0
,
"Unexpected device group count %u.
\n
"
,
count
);
properties
=
heap_
calloc
(
count
,
sizeof
(
*
properties
));
properties
=
calloc
(
count
,
sizeof
(
*
properties
));
ok
(
!!
properties
,
"Failed to allocate memory.
\n
"
);
vr
=
vkEnumeratePhysicalDeviceGroupsKHR
(
vk_instance
,
&
count
,
properties
);
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected VkResult %d.
\n
"
,
vr
);
...
...
@@ -307,7 +306,7 @@ static void test_physical_device_groups(void)
ok
(
vr
==
VK_SUCCESS
,
"Failed to create device, VkResult %d.
\n
"
,
vr
);
vkDestroyDevice
(
vk_device
,
NULL
);
heap_
free
(
properties
);
free
(
properties
);
vkDestroyInstance
(
vk_instance
,
NULL
);
}
...
...
@@ -488,10 +487,10 @@ static void test_null_hwnd(VkInstance vk_instance, VkPhysicalDevice vk_physical_
vr
=
vkGetPhysicalDeviceSurfaceFormatsKHR
(
vk_physical_device
,
surface
,
&
count
,
NULL
);
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected vr %d.
\n
"
,
vr
);
ok
(
count
,
"Got zero count.
\n
"
);
formats
=
heap_
alloc
(
sizeof
(
*
formats
)
*
count
);
formats
=
m
alloc
(
sizeof
(
*
formats
)
*
count
);
vr
=
vkGetPhysicalDeviceSurfaceFormatsKHR
(
vk_physical_device
,
surface
,
&
count
,
formats
);
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected vr %d.
\n
"
,
vr
);
heap_
free
(
formats
);
free
(
formats
);
vr
=
vkGetPhysicalDeviceSurfaceSupportKHR
(
vk_physical_device
,
queue_family_index
,
surface
,
&
bval
);
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected vr %d.
\n
"
,
vr
);
...
...
@@ -503,10 +502,10 @@ static void test_null_hwnd(VkInstance vk_instance, VkPhysicalDevice vk_physical_
vr
=
pvkGetPhysicalDeviceSurfacePresentModesKHR
(
vk_physical_device
,
surface
,
&
count
,
NULL
);
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected vr %d.
\n
"
,
vr
);
ok
(
count
,
"Got zero count.
\n
"
);
modes
=
heap_
alloc
(
sizeof
(
*
modes
)
*
count
);
modes
=
m
alloc
(
sizeof
(
*
modes
)
*
count
);
vr
=
pvkGetPhysicalDeviceSurfacePresentModesKHR
(
vk_physical_device
,
surface
,
&
count
,
modes
);
ok
(
vr
==
VK_SUCCESS
,
"Got unexpected vr %d.
\n
"
,
vr
);
heap_
free
(
modes
);
free
(
modes
);
if
(
pvkGetPhysicalDevicePresentRectanglesKHR
)
{
...
...
@@ -902,7 +901,7 @@ static void for_each_device_instance(uint32_t extension_count, const char * cons
return
;
}
vk_physical_devices
=
heap_
calloc
(
count
,
sizeof
(
*
vk_physical_devices
));
vk_physical_devices
=
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
);
...
...
@@ -915,7 +914,7 @@ static void for_each_device_instance(uint32_t extension_count, const char * cons
test_func
(
vk_physical_devices
[
i
]);
}
heap_
free
(
vk_physical_devices
);
free
(
vk_physical_devices
);
vkDestroyInstance
(
vk_instance
,
NULL
);
}
...
...
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