diff --git a/.gitlab-ci/common/generate-env.sh b/.gitlab-ci/common/generate-env.sh index 849782ab712..a76e2b24a0b 100755 --- a/.gitlab-ci/common/generate-env.sh +++ b/.gitlab-ci/common/generate-env.sh @@ -53,6 +53,7 @@ for var in \ MESA_GL_VERSION_OVERRIDE \ MESA_GLSL_VERSION_OVERRIDE \ MESA_GLES_VERSION_OVERRIDE \ + MESA_VK_IGNORE_CONFORMANCE_WARNING \ MINIO_HOST \ NIR_VALIDATE \ PAN_MESA_DEBUG \ @@ -74,7 +75,6 @@ for var in \ PIPELINE_ARTIFACTS_BASE \ TEST_LD_PRELOAD \ TU_DEBUG \ - TU_IGNORE_CONFORMANCE_WARNING \ VK_CPU \ VK_DRIVER \ ; do diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 321dff3e5d5..b5d799f8dee 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -531,15 +531,6 @@ 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) @@ -669,7 +660,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) - warn_non_conformant_implementation(); + vk_warn_non_conformant_implementation("radv"); radv_get_driver_uuid(&device->driver_uuid); radv_get_device_uuid(&device->rad_info, &device->device_uuid); diff --git a/src/freedreno/ci/gitlab-ci.yml b/src/freedreno/ci/gitlab-ci.yml index 36a2087fe7a..95985642d50 100644 --- a/src/freedreno/ci/gitlab-ci.yml +++ b/src/freedreno/ci/gitlab-ci.yml @@ -24,6 +24,7 @@ variables: DEQP_VER: vk VK_DRIVER: freedreno + MESA_VK_IGNORE_CONFORMANCE_WARNING: 1 .freedreno-test-traces: extends: @@ -227,7 +228,6 @@ a630_vk: # features. However, we end up with flaky results in # dEQP-VK.binding_model.*.geometry and dEQP-VK.glsl.*_vertex. TU_DEBUG: forcebin - TU_IGNORE_CONFORMANCE_WARNING: 1 # Disabled by default until we can sort out what looks like timeouts before # getting to the first test (or is it at cleanup after tests completed?). @@ -242,7 +242,6 @@ a630_vk_asan: DEQP_FRACTION: 100 DEQP_PARALLEL: 4 # We get OOMkills if we go too wide with asan enabled TU_DEBUG: forcebin - TU_IGNORE_CONFORMANCE_WARNING: 1 # Disable the leak checks, since the library gets dlclose()d and thus get # totally useless leak reports. We can still catch buffer overflows. ASAN_OPTIONS: "detect_leaks=0" @@ -259,7 +258,6 @@ a630_vk_sysmem: DEQP_CASELIST_FILTER: "dEQP-VK.renderpass.*" GPU_VERSION: freedreno-a630-bypass TU_DEBUG: sysmem - TU_IGNORE_CONFORMANCE_WARNING: 1 a630_piglit: extends: diff --git a/src/freedreno/vulkan/tu_device.c b/src/freedreno/vulkan/tu_device.c index abf68b94430..28fbfcd5c44 100644 --- a/src/freedreno/vulkan/tu_device.c +++ b/src/freedreno/vulkan/tu_device.c @@ -186,15 +186,6 @@ 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) @@ -230,7 +221,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); - warn_non_conformant_implementation(); + vk_warn_non_conformant_implementation("tu"); fd_get_driver_uuid(device->driver_uuid); fd_get_device_uuid(device->device_uuid, device->gpu_id); diff --git a/src/vulkan/util/vk_util.c b/src/vulkan/util/vk_util.c index cf06b1f44c4..116a78fa212 100644 --- a/src/vulkan/util/vk_util.c +++ b/src/vulkan/util/vk_util.c @@ -23,9 +23,11 @@ * IN THE SOFTWARE. */ +#include #include #include #include "vk_util.h" +#include "util/debug.h" uint32_t vk_get_driver_version(void) { @@ -67,3 +69,13 @@ uint32_t vk_get_version_override(void) return VK_MAKE_VERSION(major, minor, patch); } + +void +vk_warn_non_conformant_implementation(const char *driver_name) +{ + if (env_var_as_boolean("MESA_VK_IGNORE_CONFORMANCE_WARNING", false)) + return; + + fprintf(stderr, "WARNING: %s is not a conformant Vulkan implementation, " + "testing use only.\n", driver_name); +} diff --git a/src/vulkan/util/vk_util.h b/src/vulkan/util/vk_util.h index b48a1953d11..30132338944 100644 --- a/src/vulkan/util/vk_util.h +++ b/src/vulkan/util/vk_util.h @@ -223,6 +223,8 @@ uint32_t vk_get_driver_version(void); uint32_t vk_get_version_override(void); +void vk_warn_non_conformant_implementation(const char *driver_name); + struct vk_pipeline_cache_header { uint32_t header_size; uint32_t header_version;