Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit 5a9de11

Browse files
authored
[Impeller] Don't override user specification on Vulkan validation in unopt. (#54816)
This overrides the documented behavior silently but only in unopt. Make opt and unopt modes behave the same. Disabling validation is frequently necessary to test behavior on simulators or when connecting to Renderdoc.
1 parent f2b4989 commit 5a9de11

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

impeller/renderer/backend/vulkan/context_vk.cc

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,18 +157,8 @@ void ContextVK::Setup(Settings settings) {
157157
auto& dispatcher = VULKAN_HPP_DEFAULT_DISPATCHER;
158158
dispatcher.init(settings.proc_address_callback);
159159

160-
// Enable Vulkan validation if either:
161-
// 1. The user has explicitly enabled it.
162-
// 2. We are in a combination of debug mode, and running on Android.
163-
// (It's possible 2 is overly conservative and we can simplify this)
164-
auto enable_validation = settings.enable_validation;
165-
166-
#if defined(FML_OS_ANDROID) && !defined(NDEBUG)
167-
enable_validation = true;
168-
#endif
169-
170160
auto caps = std::shared_ptr<CapabilitiesVK>(new CapabilitiesVK(
171-
enable_validation, settings.fatal_missing_validations));
161+
settings.enable_validation, settings.fatal_missing_validations));
172162

173163
if (!caps->IsValid()) {
174164
VALIDATION_LOG << "Could not determine device capabilities.";

0 commit comments

Comments
 (0)