ci: Unify on MESA_VK_IGNORE_CONFORMANCE_WARNING

Move and rename warn_non_conformant_implementation() to common location
of src/vulkan/util/vk_util.c as vk_warn_non_conformant_implementation().

In freedreno/ci,  move MESA_VK_IGNORE_CONFORMANCE_WARNING to common
location of .baremetal-deqp-test-freedreno-vk.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11563>
This commit is contained in:
Matt Turner 2021-06-23 13:22:03 -07:00 committed by Marge Bot
parent 6a79ee97f4
commit ed77bf3c4e
6 changed files with 18 additions and 24 deletions

View File

@ -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

View File

@ -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);

View File

@ -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:

View File

@ -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);

View File

@ -23,9 +23,11 @@
* IN THE SOFTWARE.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#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);
}

View File

@ -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;