This repository was archived by the owner on Feb 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
impeller/renderer/backend/vulkan Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 22# Use of this source code is governed by a BSD-style license that can be
33# found in the LICENSE file.
44
5+ import (" //flutter/vulkan/config.gni" )
56import (" ../../../tools/impeller.gni" )
67
78impeller_component (" vulkan_unittests" ) {
@@ -96,4 +97,8 @@ impeller_component("vulkan") {
9697 " //third_party/vulkan-deps/vulkan-headers/src:vulkan_headers" ,
9798 " //third_party/vulkan_memory_allocator" ,
9899 ]
100+
101+ if (enable_vulkan_validation_layers ) {
102+ defines = [ " IMPELLER_ENABLE_VULKAN_VALIDATION_LAYERS" ]
103+ }
99104}
Original file line number Diff line number Diff line change @@ -184,6 +184,17 @@ void ContextVK::Setup(Settings settings) {
184184
185185 vk::InstanceCreateInfo instance_info;
186186 if (caps->AreValidationsEnabled ()) {
187+ std::stringstream ss;
188+ ss << " Enabling validation layers, features: [" ;
189+ for (const auto & validation : enabled_validations) {
190+ ss << vk::to_string (validation) << " " ;
191+ }
192+ ss << " ]" ;
193+ FML_LOG (ERROR) << ss.str ();
194+ #if !defined(IMPELLER_ENABLE_VULKAN_VALIDATION_LAYERS) && FML_OS_ANDROID
195+ FML_LOG (ERROR) << " Vulkan validation layers turned on but the gn argument "
196+ " `--enable-vulkan-validation-layers` is missing." ;
197+ #endif
187198 instance_info.pNext = &validation;
188199 }
189200 instance_info.setPEnabledLayerNames (enabled_layers_c);
You can’t perform that action at this time.
0 commit comments