aux/vk: Add Tegra detection

This commit is contained in:
Christoph Haag 2021-08-31 03:11:36 +02:00 committed by Christoph Haag
parent e7d047f956
commit 4982a14541
2 changed files with 8 additions and 0 deletions

View file

@ -1061,6 +1061,12 @@ vk_select_physical_device(struct vk_bundle *vk, int forced_index)
snprintf(title, 20, "Selected GPU: %d\n", gpu_index);
vk_print_device_info_debug(vk, &pdp, gpu_index, title);
char *tegra_substr = strstr(pdp.deviceName, "Tegra");
if (tegra_substr) {
vk->is_tegra = true;
VK_DEBUG(vk, "Detected Tegra, using Tegra specific workarounds!");
}
// Fill out the device memory props as well.
vk->vkGetPhysicalDeviceMemoryProperties(vk->physical_device, &vk->device_memory_props);

View file

@ -52,6 +52,8 @@ struct vk_bundle
bool has_EXT_global_priority;
bool has_VK_EXT_robustness2;
bool is_tegra;
VkDebugReportCallbackEXT debug_report_cb;
VkPhysicalDeviceMemoryProperties device_memory_props;