diff options
author | Matt Turner <mattst88@gmail.com> | 2021-06-22 22:25:05 +0000 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-06-23 07:07:42 +0000 |
commit | 205d6e582c08285fd1cd55cead8f8fd2becbb211 (patch) | |
tree | 0d5a81ac19d95f9a17a251f68ef711b63843abd9 /src/freedreno/vulkan/tu_device.c | |
parent | 17a1cc616371d5239498386fa6850df536ad1fe4 (diff) |
tu: Provide a toggle to avoid warnings about unsupported devices
In the CI, we have such devices, and this message is printed many
hundreds of times. This results in a useless spam which makes it
difficult to see real issues.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11543>
Diffstat (limited to 'src/freedreno/vulkan/tu_device.c')
-rw-r--r-- | src/freedreno/vulkan/tu_device.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index 865c2bf2c57..2feb05f3262 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -186,6 +186,15 @@ get_device_extensions(const struct tu_physical_device *device, }; } +static void +warn_non_conformant_implementation(void) +{ + if (env_var_as_boolean("TU_IGNORE_CONFORMANCE_WARNING", false)) + return; + fprintf(stderr, "WARNING: tu is not a conformant vulkan implementation, " + "testing use only.\n"); +} + VkResult tu_physical_device_init(struct tu_physical_device *device, struct tu_instance *instance) @@ -221,8 +230,7 @@ tu_physical_device_init(struct tu_physical_device *device, disk_cache_format_hex_id(buf, device->cache_uuid, VK_UUID_SIZE * 2); device->disk_cache = disk_cache_create(device->name, buf, 0); - fprintf(stderr, "WARNING: tu is not a conformant vulkan implementation, " - "testing use only.\n"); + warn_non_conformant_implementation(); fd_get_driver_uuid(device->driver_uuid); fd_get_device_uuid(device->device_uuid, device->gpu_id); |