Mesa (main): radv: Provide a toggle to avoid warnings about unsupported devices.
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 22 12:07:30 UTC 2021
Module: Mesa
Branch: main
Commit: e9991d5ff1e8d471a75f2bab22b2776aef90cabd
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e9991d5ff1e8d471a75f2bab22b2776aef90cabd
Author: Charlie Turner <cturner at igalia.com>
Date: Thu Jun 17 12:43:27 2021 +0100
radv: 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.
v2 from Martin:
- Reword the commit message a bit
- Add a SoB
Signed-off-by: Martin Peres <martin.peres at mupuf.org>
Reviewed-by: Eric Engestrom <eric at engestrom.ch>
Acked-by: Andres Gomez <agomez at igalia.com>
Acked-by: Samuel Iglesias Gonsálvez <siglesias at igalia.com>
Acked-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11491>
---
src/amd/vulkan/radv_device.c | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c
index 87687a87cb0..4b8eab2ed75 100644
--- a/src/amd/vulkan/radv_device.c
+++ b/src/amd/vulkan/radv_device.c
@@ -29,6 +29,7 @@
#include <stdbool.h>
#include <string.h>
+#include "util/debug.h"
#include "util/disk_cache.h"
#include "radv_cs.h"
#include "radv_debug.h"
@@ -520,6 +521,15 @@ radv_physical_device_get_supported_extensions(const struct radv_physical_device
};
}
+static void
+warn_non_conformant_implementation()
+{
+ if (env_var_as_boolean("RADV_IGNORE_CONFORMANCE_WARNING", false))
+ return;
+ fprintf(stderr,
+ "WARNING: radv is not a conformant vulkan implementation, testing use only.\n");
+}
+
static VkResult
radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm_device,
struct radv_physical_device **device_out)
@@ -649,8 +659,7 @@ radv_physical_device_try_create(struct radv_instance *instance, drmDevicePtr drm
#endif
if (device->rad_info.chip_class < GFX8 || device->rad_info.chip_class > GFX10)
- fprintf(stderr,
- "WARNING: radv is not a conformant vulkan implementation, testing use only.\n");
+ warn_non_conformant_implementation();
radv_get_driver_uuid(&device->driver_uuid);
radv_get_device_uuid(&device->rad_info, &device->device_uuid);
More information about the mesa-commit
mailing list