turnip: Expose a device name similar to the blob.
We add "Turnip" so that users (and vulkan.gpuinfo.org) can distinguish us without requiring VK_KHR_driver_properties. This will be a lot more user-friendly than "FD618", though. I made some little vk_asprintf helpers, because I figure other drivers setting up deviceName's will want them too. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13041>
This commit is contained in:
parent
7e471541e0
commit
5116388e0b
|
@ -24,6 +24,7 @@
|
|||
variables:
|
||||
DEQP_VER: vk
|
||||
VK_DRIVER: freedreno
|
||||
DEQP_EXPECTED_RENDERER: "Turnip Adreno (TM) 630"
|
||||
MESA_VK_IGNORE_CONFORMANCE_WARNING: 1
|
||||
|
||||
.freedreno-test-traces:
|
||||
|
@ -163,8 +164,8 @@ a630_gles_asan:
|
|||
|
||||
a630_vk:
|
||||
extends:
|
||||
- .baremetal-deqp-test-freedreno-vk
|
||||
- .a630-test
|
||||
- .baremetal-deqp-test-freedreno-vk
|
||||
parallel: 3
|
||||
variables:
|
||||
DEQP_VER: vk
|
||||
|
@ -183,8 +184,8 @@ a630_vk_full:
|
|||
# Clicking play can show you some useful areas for fixing turnip, though.
|
||||
a630_vk_asan:
|
||||
extends:
|
||||
- .baremetal-deqp-test-freedreno-vk
|
||||
- .a630-test
|
||||
- .baremetal-deqp-test-freedreno-vk
|
||||
- .baremetal-arm64-asan-test
|
||||
- .test-manual
|
||||
variables:
|
||||
|
|
|
@ -202,7 +202,16 @@ tu_physical_device_init(struct tu_physical_device *device,
|
|||
{
|
||||
VkResult result = VK_SUCCESS;
|
||||
|
||||
device->name = fd_dev_name(&device->dev_id);
|
||||
const char *fd_name = fd_dev_name(&device->dev_id);
|
||||
if (strncmp(fd_name, "FD", 2) == 0) {
|
||||
device->name = vk_asprintf(&instance->vk.alloc,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE,
|
||||
"Turnip Adreno (TM) %s", &fd_name[2]);
|
||||
} else {
|
||||
device->name = vk_strdup(&instance->vk.alloc, fd_name,
|
||||
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
|
||||
|
||||
}
|
||||
|
||||
const struct fd_dev_info *info = fd_dev_info(&device->dev_id);
|
||||
if (!info) {
|
||||
|
@ -277,6 +286,8 @@ tu_physical_device_finish(struct tu_physical_device *device)
|
|||
if (device->master_fd != -1)
|
||||
close(device->master_fd);
|
||||
|
||||
vk_free(&device->instance->vk.alloc, (void *)device->name);
|
||||
|
||||
vk_physical_device_finish(&device->vk);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue