vulkan/device_select: Stop using VK_OUTARRAY_MAKE()
We're trying to replace VK_OUTARRAY_MAKE() by VK_OUTARRAY_MAKE_TYPED() so people don't get tempted to use it and make things incompatible with MSVC (which doesn't support typeof()). Suggested-by: Daniel Stone <daniels@collabora.com> Reviewed-by: Jason Ekstrand <jason.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15522>
This commit is contained in:
committed by
Marge Bot
parent
13efbdf830
commit
52a2aa44f3
@@ -476,7 +476,7 @@ static VkResult device_select_EnumeratePhysicalDevices(VkInstance instance,
|
||||
uint32_t selected_physical_device_count = 0;
|
||||
const char* selection = getenv("MESA_VK_DEVICE_SELECT");
|
||||
VkResult result = info->EnumeratePhysicalDevices(instance, &physical_device_count, NULL);
|
||||
VK_OUTARRAY_MAKE(out, pPhysicalDevices, pPhysicalDeviceCount);
|
||||
VK_OUTARRAY_MAKE_TYPED(VkPhysicalDevice, out, pPhysicalDevices, pPhysicalDeviceCount);
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
|
||||
@@ -529,7 +529,7 @@ static VkResult device_select_EnumeratePhysicalDevices(VkInstance instance,
|
||||
assert(result == VK_SUCCESS);
|
||||
|
||||
for (unsigned i = 0; i < selected_physical_device_count; i++) {
|
||||
vk_outarray_append(&out, ent) {
|
||||
vk_outarray_append_typed(VkPhysicalDevice, &out, ent) {
|
||||
*ent = selected_physical_devices[i];
|
||||
}
|
||||
}
|
||||
@@ -548,7 +548,7 @@ static VkResult device_select_EnumeratePhysicalDeviceGroups(VkInstance instance,
|
||||
uint32_t physical_device_group_count = 0;
|
||||
uint32_t selected_physical_device_group_count = 0;
|
||||
VkResult result = info->EnumeratePhysicalDeviceGroups(instance, &physical_device_group_count, NULL);
|
||||
VK_OUTARRAY_MAKE(out, pPhysicalDeviceGroups, pPhysicalDeviceGroupCount);
|
||||
VK_OUTARRAY_MAKE_TYPED(VkPhysicalDeviceGroupProperties, out, pPhysicalDeviceGroups, pPhysicalDeviceGroupCount);
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
return result;
|
||||
@@ -592,7 +592,7 @@ static VkResult device_select_EnumeratePhysicalDeviceGroups(VkInstance instance,
|
||||
assert(result == VK_SUCCESS);
|
||||
|
||||
for (unsigned i = 0; i < selected_physical_device_group_count; i++) {
|
||||
vk_outarray_append(&out, ent) {
|
||||
vk_outarray_append_typed(VkPhysicalDeviceGroupProperties, &out, ent) {
|
||||
*ent = selected_physical_device_groups[i];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user