From abbca2fa9281c4e8b5b5b078d950275bacdddf1a Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 25 Jan 2021 11:32:22 +1000 Subject: [PATCH] radv: remove all entrypoint enabled debug option This was useful back at the dawn of time when apps weren't as well developed and layers mostly sucked. I don't think it's been used in a quite a while so remove it, as the new dispatch layer doesn't support it. Reviewed-by: Jason Ekstrand Reviewed-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen Part-of: --- docs/envvars.rst | 2 -- src/amd/vulkan/radv_debug.h | 2 +- src/amd/vulkan/radv_device.c | 16 ++++------------ 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/docs/envvars.rst b/docs/envvars.rst index c8c6cf17d8b..ef0aac47862 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -552,8 +552,6 @@ RADV driver environment variables enable LLVM compiler backend ``allbos`` force all allocated buffers to be referenced in submissions - ``allentrypoints`` - enable all device/instance entrypoints ``checkir`` validate the LLVM IR before LLVM compiles the shader ``errors`` diff --git a/src/amd/vulkan/radv_debug.h b/src/amd/vulkan/radv_debug.h index 88068232a7e..54c5a59ee7b 100644 --- a/src/amd/vulkan/radv_debug.h +++ b/src/amd/vulkan/radv_debug.h @@ -51,7 +51,7 @@ enum { RADV_DEBUG_NOTHREADLLVM = 1u << 20, RADV_DEBUG_NOBINNING = 1u << 21, RADV_DEBUG_NO_NGG = 1u << 22, - RADV_DEBUG_ALL_ENTRYPOINTS = 1u << 23, + /* spare 1u << 23 */ RADV_DEBUG_DUMP_META_SHADERS = 1u << 24, RADV_DEBUG_NO_MEMORY_CACHE = 1u << 25, RADV_DEBUG_DISCARD_TO_DEMOTE = 1u << 26, diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 235d4afb442..b8436f54fd8 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -555,7 +555,6 @@ static const struct debug_control radv_debug_options[] = { {"nothreadllvm", RADV_DEBUG_NOTHREADLLVM}, {"nobinning", RADV_DEBUG_NOBINNING}, {"nongg", RADV_DEBUG_NO_NGG}, - {"allentrypoints", RADV_DEBUG_ALL_ENTRYPOINTS}, {"metashaders", RADV_DEBUG_DUMP_META_SHADERS}, {"nomemorycache", RADV_DEBUG_NO_MEMORY_CACHE}, {"discardtodemote", RADV_DEBUG_DISCARD_TO_DEMOTE}, @@ -769,14 +768,11 @@ VkResult radv_CreateInstance( instance->enabled_extensions.extensions[idx] = true; } - bool unchecked = instance->debug_flags & RADV_DEBUG_ALL_ENTRYPOINTS; - for (unsigned i = 0; i < ARRAY_SIZE(instance->dispatch.entrypoints); i++) { /* Vulkan requires that entrypoints for extensions which have * not been enabled must not be advertised. */ - if (!unchecked && - !radv_instance_entrypoint_is_enabled(i, instance->apiVersion, + if (!radv_instance_entrypoint_is_enabled(i, instance->apiVersion, &instance->enabled_extensions)) { instance->dispatch.entrypoints[i] = NULL; } else { @@ -789,8 +785,7 @@ VkResult radv_CreateInstance( /* Vulkan requires that entrypoints for extensions which have * not been enabled must not be advertised. */ - if (!unchecked && - !radv_physical_device_entrypoint_is_enabled(i, instance->apiVersion, + if (!radv_physical_device_entrypoint_is_enabled(i, instance->apiVersion, &instance->enabled_extensions)) { instance->physical_device_dispatch.entrypoints[i] = NULL; } else { @@ -803,8 +798,7 @@ VkResult radv_CreateInstance( /* Vulkan requires that entrypoints for extensions which have * not been enabled must not be advertised. */ - if (!unchecked && - !radv_device_entrypoint_is_enabled(i, instance->apiVersion, + if (!radv_device_entrypoint_is_enabled(i, instance->apiVersion, &instance->enabled_extensions, NULL)) { instance->device_dispatch.entrypoints[i] = NULL; } else { @@ -2631,7 +2625,6 @@ radv_device_init_dispatch(struct radv_device *device) { const struct radv_instance *instance = device->physical_device->instance; const struct radv_device_dispatch_table *dispatch_table_layer = NULL; - bool unchecked = instance->debug_flags & RADV_DEBUG_ALL_ENTRYPOINTS; if (radv_thread_trace_enabled()) { /* Use device entrypoints from the SQTT layer if enabled. */ @@ -2642,8 +2635,7 @@ radv_device_init_dispatch(struct radv_device *device) /* Vulkan requires that entrypoints for extensions which have not been * enabled must not be advertised. */ - if (!unchecked && - !radv_device_entrypoint_is_enabled(i, instance->apiVersion, + if (!radv_device_entrypoint_is_enabled(i, instance->apiVersion, &instance->enabled_extensions, &device->enabled_extensions)) { device->dispatch.entrypoints[i] = NULL;