vulkan: fix random tabs to spaces
Only the vk_time_max_deviation tab usage requires a manual fix to make sense. Others are boring replacements. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35011>
This commit is contained in:
@@ -66,7 +66,7 @@ device_select_init_instances(void)
|
||||
simple_mtx_lock(&device_select_mutex);
|
||||
if (!device_select_instance_ht)
|
||||
device_select_instance_ht = _mesa_hash_table_create(NULL, _mesa_hash_pointer,
|
||||
_mesa_key_pointer_equal);
|
||||
_mesa_key_pointer_equal);
|
||||
simple_mtx_unlock(&device_select_mutex);
|
||||
}
|
||||
|
||||
@@ -76,8 +76,8 @@ device_select_try_free_ht(void)
|
||||
simple_mtx_lock(&device_select_mutex);
|
||||
if (device_select_instance_ht) {
|
||||
if (_mesa_hash_table_num_entries(device_select_instance_ht) == 0) {
|
||||
_mesa_hash_table_destroy(device_select_instance_ht, NULL);
|
||||
device_select_instance_ht = NULL;
|
||||
_mesa_hash_table_destroy(device_select_instance_ht, NULL);
|
||||
device_select_instance_ht = NULL;
|
||||
}
|
||||
}
|
||||
simple_mtx_unlock(&device_select_mutex);
|
||||
@@ -115,8 +115,8 @@ device_select_layer_remove_instance(VkInstance instance)
|
||||
}
|
||||
|
||||
static VkResult device_select_CreateInstance(const VkInstanceCreateInfo *pCreateInfo,
|
||||
const VkAllocationCallbacks *pAllocator,
|
||||
VkInstance *pInstance)
|
||||
const VkAllocationCallbacks *pAllocator,
|
||||
VkInstance *pInstance)
|
||||
{
|
||||
VkLayerInstanceCreateInfo *chain_info;
|
||||
for(chain_info = (VkLayerInstanceCreateInfo*)pCreateInfo->pNext; chain_info; chain_info = (VkLayerInstanceCreateInfo*)chain_info->pNext)
|
||||
@@ -550,8 +550,8 @@ static uint32_t get_default_device(const struct instance_info *info,
|
||||
}
|
||||
|
||||
static VkResult device_select_EnumeratePhysicalDevices(VkInstance instance,
|
||||
uint32_t* pPhysicalDeviceCount,
|
||||
VkPhysicalDevice *pPhysicalDevices)
|
||||
uint32_t* pPhysicalDeviceCount,
|
||||
VkPhysicalDevice *pPhysicalDevices)
|
||||
{
|
||||
struct instance_info *info = device_select_layer_get_instance(instance);
|
||||
uint32_t physical_device_count = 0;
|
||||
@@ -582,14 +582,14 @@ static VkResult device_select_EnumeratePhysicalDevices(VkInstance instance,
|
||||
uint32_t count;
|
||||
info->EnumerateDeviceExtensionProperties(physical_devices[i], NULL, &count, NULL);
|
||||
if (count > 0) {
|
||||
VkExtensionProperties *extensions = calloc(count, sizeof(VkExtensionProperties));
|
||||
VkExtensionProperties *extensions = calloc(count, sizeof(VkExtensionProperties));
|
||||
if (info->EnumerateDeviceExtensionProperties(physical_devices[i], NULL, &count, extensions) == VK_SUCCESS) {
|
||||
for (unsigned j = 0; j < count; j++) {
|
||||
for (unsigned j = 0; j < count; j++) {
|
||||
if (!strcmp(extensions[j].extensionName, VK_EXT_PCI_BUS_INFO_EXTENSION_NAME))
|
||||
info->has_pci_bus = true;
|
||||
}
|
||||
}
|
||||
free(extensions);
|
||||
free(extensions);
|
||||
}
|
||||
}
|
||||
if (should_debug_device_selection() || (selection && strcmp(selection, "list") == 0)) {
|
||||
|
||||
@@ -156,7 +156,7 @@ static const struct zwp_linux_dmabuf_feedback_v1_listener dmabuf_feedback_listen
|
||||
|
||||
static void
|
||||
device_select_registry_global(void *data, struct wl_registry *registry, uint32_t name,
|
||||
const char *interface, uint32_t version)
|
||||
const char *interface, uint32_t version)
|
||||
{
|
||||
struct device_select_wayland_info *info = data;
|
||||
if (strcmp(interface, wl_drm_interface.name) == 0) {
|
||||
@@ -176,7 +176,7 @@ device_select_registry_global(void *data, struct wl_registry *registry, uint32_t
|
||||
|
||||
static void
|
||||
device_select_registry_global_remove_cb(void *data, struct wl_registry *registry,
|
||||
uint32_t name)
|
||||
uint32_t name)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -216,19 +216,19 @@ int device_select_find_wayland_pci_default(struct device_pci_info *devices, uint
|
||||
|
||||
for (unsigned i = 0; i < device_count; i++) {
|
||||
if (devices[i].has_bus_info) {
|
||||
if (target->businfo.pci->domain == devices[i].bus_info.domain &&
|
||||
target->businfo.pci->bus == devices[i].bus_info.bus &&
|
||||
target->businfo.pci->dev == devices[i].bus_info.dev &&
|
||||
target->businfo.pci->func == devices[i].bus_info.func) {
|
||||
default_idx = i;
|
||||
break;
|
||||
}
|
||||
if (target->businfo.pci->domain == devices[i].bus_info.domain &&
|
||||
target->businfo.pci->bus == devices[i].bus_info.bus &&
|
||||
target->businfo.pci->dev == devices[i].bus_info.dev &&
|
||||
target->businfo.pci->func == devices[i].bus_info.func) {
|
||||
default_idx = i;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
if (target->deviceinfo.pci->vendor_id == devices[i].dev_info.vendor_id &&
|
||||
target->deviceinfo.pci->device_id == devices[i].dev_info.device_id) {
|
||||
default_idx = i;
|
||||
break;
|
||||
}
|
||||
if (target->deviceinfo.pci->vendor_id == devices[i].dev_info.vendor_id &&
|
||||
target->deviceinfo.pci->device_id == devices[i].dev_info.device_id) {
|
||||
default_idx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
#include "device_select.h"
|
||||
static int
|
||||
ds_dri3_open(xcb_connection_t *conn,
|
||||
xcb_window_t root,
|
||||
uint32_t provider)
|
||||
xcb_window_t root,
|
||||
uint32_t provider)
|
||||
{
|
||||
xcb_dri3_open_cookie_t cookie;
|
||||
xcb_dri3_open_reply_t *reply;
|
||||
@@ -104,15 +104,15 @@ int device_select_find_xcb_pci_default(struct device_pci_info *devices, uint32_t
|
||||
for (unsigned i = 0; i < device_count; i++) {
|
||||
if (devices[i].has_bus_info) {
|
||||
if (xdev->businfo.pci->domain == devices[i].bus_info.domain &&
|
||||
xdev->businfo.pci->bus == devices[i].bus_info.bus &&
|
||||
xdev->businfo.pci->dev == devices[i].bus_info.dev &&
|
||||
xdev->businfo.pci->func == devices[i].bus_info.func) {
|
||||
default_idx = i;
|
||||
xdev->businfo.pci->bus == devices[i].bus_info.bus &&
|
||||
xdev->businfo.pci->dev == devices[i].bus_info.dev &&
|
||||
xdev->businfo.pci->func == devices[i].bus_info.func) {
|
||||
default_idx = i;
|
||||
}
|
||||
} else {
|
||||
if (xdev->deviceinfo.pci->vendor_id == devices[i].dev_info.vendor_id &&
|
||||
xdev->deviceinfo.pci->device_id == devices[i].dev_info.device_id)
|
||||
default_idx = i;
|
||||
xdev->deviceinfo.pci->device_id == devices[i].dev_info.device_id)
|
||||
default_idx = i;
|
||||
}
|
||||
if (default_idx != -1)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user