@@ -150,14 +150,22 @@ VkResult CreateInstance(QLibrary &library, VkInstance &instance, bool enumerate_
150
150
std::string GenerateVulkanStatus () {
151
151
std::string log ;
152
152
153
- const Configurator &configurator = Configurator::Get ();
153
+ Configurator &configurator = Configurator::Get ();
154
154
155
155
// Layers override configuration
156
- if (configurator.configurations .HasActiveConfiguration (configurator.layers .available_layers )) {
157
- log +=
158
- format (" - Layers override: \" %s\" configuration\n " , configurator.configurations .GetActiveConfiguration ()->key .c_str ());
159
- } else {
160
- log += " - Layers override: None\n " ;
156
+ switch (configurator.environment .GetMode ()) {
157
+ default :
158
+ case LAYERS_MODE_BY_APPLICATIONS:
159
+ log += " - Vulkan Layers Controlled by Vulkan Applications\n " ;
160
+ break ;
161
+ case LAYERS_MODE_BY_CONFIGURATOR_RUNNING:
162
+ if (configurator.configurations .HasActiveConfiguration (configurator.layers .available_layers ))
163
+ log += format (" - Vulkan Layers Controlled by Vulkan Configurator using \" %s\" configuration\n " ,
164
+ configurator.environment .Get (ACTIVE_CONFIGURATION).c_str ());
165
+ break ;
166
+ case LAYERS_MODE_BY_CONFIGURATOR_ALL_DISABLED:
167
+ log += " - Vulkan Layers Disabled by Vulkan Configurator\n " ;
168
+ break ;
161
169
}
162
170
163
171
// Check Vulkan SDK path
@@ -212,10 +220,9 @@ std::string GenerateVulkanStatus() {
212
220
return log ;
213
221
}
214
222
215
- Configuration *active_configuration = configurator.configurations .GetActiveConfiguration ();
216
- if (configurator.configurations .HasActiveConfiguration (configurator.layers .available_layers )) {
217
- SurrenderConfiguration (configurator.environment );
218
- }
223
+ LayersMode saved_mode = configurator.environment .GetMode ();
224
+ configurator.environment .SetMode (LAYERS_MODE_BY_APPLICATIONS);
225
+ configurator.configurations .RefreshConfiguration (configurator.layers .available_layers );
219
226
220
227
QLibrary library (GetVulkanLibrary ());
221
228
PFN_vkEnumerateInstanceLayerProperties vkEnumerateInstanceLayerProperties =
@@ -353,9 +360,8 @@ std::string GenerateVulkanStatus() {
353
360
354
361
vkDestroyInstance (inst, NULL );
355
362
356
- if (active_configuration != nullptr ) {
357
- OverrideConfiguration (configurator.environment , configurator.layers .available_layers , *active_configuration);
358
- }
363
+ configurator.environment .SetMode (saved_mode);
364
+ configurator.configurations .RefreshConfiguration (configurator.layers .available_layers );
359
365
360
366
return log ;
361
367
}
0 commit comments