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 2
2
# Use of this source code is governed by a BSD-style license that can be
3
3
# found in the LICENSE file.
4
4
5
+ import (" //flutter/vulkan/config.gni" )
5
6
import (" ../../../tools/impeller.gni" )
6
7
7
8
impeller_component (" vulkan_unittests" ) {
@@ -96,4 +97,8 @@ impeller_component("vulkan") {
96
97
" //third_party/vulkan-deps/vulkan-headers/src:vulkan_headers" ,
97
98
" //third_party/vulkan_memory_allocator" ,
98
99
]
100
+
101
+ if (enable_vulkan_validation_layers ) {
102
+ defines = [ " IMPELLER_ENABLE_VULKAN_VALIDATION_LAYERS" ]
103
+ }
99
104
}
Original file line number Diff line number Diff line change @@ -184,6 +184,17 @@ void ContextVK::Setup(Settings settings) {
184
184
185
185
vk::InstanceCreateInfo instance_info;
186
186
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
187
198
instance_info.pNext = &validation;
188
199
}
189
200
instance_info.setPEnabledLayerNames (enabled_layers_c);
You can’t perform that action at this time.
0 commit comments