Skip to content

Commit

Permalink
vkconfig3: Clean up for BETA SDK build
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Nov 19, 2024
1 parent 5c17d5f commit 5cdb0fc
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 31 deletions.
9 changes: 5 additions & 4 deletions vkconfig_core/configurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,14 +271,14 @@ bool Configurator::WriteLayersSettings(OverrideArea override_area, const Path& l
std::vector<LayersSettings> layers_settings_array;

switch (this->executable_scope) {
case EXECUTABLE_ALL:
case EXECUTABLE_ANY: {
LayersSettings settings;
settings.configuration_name = this->selected_global_configuration;
settings.settings_path = layers_settings_path;
layers_settings_array.push_back(settings);
break;
}
case EXECUTABLE_ALL:
case EXECUTABLE_PER: {
const std::vector<Executable>& executables = this->executables.GetExecutables();

Expand Down Expand Up @@ -466,7 +466,7 @@ bool Configurator::Surrender(OverrideArea override_area) {
bool result_layers_settings = true;
if (override_area & OVERRIDE_AREA_LAYERS_SETTINGS_BIT) {
bool global_removed = layers_settings_path.Remove();
if (this->executable_scope == EXECUTABLE_ALL) {
if (this->executable_scope == EXECUTABLE_ALL || this->executable_scope == EXECUTABLE_ANY) {
result_layers_settings = global_removed;
}

Expand Down Expand Up @@ -572,11 +572,12 @@ std::string Configurator::Log() const {
log += "\n";

log += format("%s Settings:\n", VKCONFIG_NAME);
log += format(" - Use system tray: %s\n", this->use_system_tray ? "true" : "false");
log += format(" - ${VK_HOME}: %s\n", this->home_sdk_path.AbsolutePath().c_str());
log += format(" - Vulkan Loader configuration scope: %s\n", ::GetLabel(this->GetExecutableScope()));
log += format(" - Vulkan Loader and Layers system files:\n");
log += format(" * %s\n", ::Get(Path::LOADER_SETTINGS).AbsolutePath().c_str());
log += format(" * %s\n", ::Get(Path::LAYERS_SETTINGS).AbsolutePath().c_str());
log += format(" - Use system tray: %s\n", this->use_system_tray ? "true" : "false");
log += format(" - ${VK_HOME}: %s\n", this->home_sdk_path.AbsolutePath().c_str());
log += "\n";

log += "Vulkan Physical Devices:\n";
Expand Down
8 changes: 4 additions & 4 deletions vkconfig_core/type_executable_mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@

const char* GetLabel(ExecutableScope scope) {
static const char* TABLE[]{
"No Vulkan Executable", // EXECUTABLE_NONE
"Any Running Vulkan Executable", // EXECUTABLE_ANY
"All Enabled Vulkan Executable", // EXECUTABLE_ALL
"Per Enabled Vulkan Executable", // EXECUTABLE_PER
"No Vulkan Executable", // EXECUTABLE_NONE
"Any Running Vulkan Executable", // EXECUTABLE_ANY
"All Enabled Vulkan Executables", // EXECUTABLE_ALL
"Per Enabled Vulkan Executable", // EXECUTABLE_PER
};

static_assert(std::size(TABLE) == EXECUTABLE_SCOPE_COUNT,
Expand Down
9 changes: 3 additions & 6 deletions vkconfig_gui/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,20 +2,16 @@
<a href="https://github.com/LunarG/VulkanTools/tree/vkconfig3-dev" target="_blank">https://github.com/LunarG/VulkanTools/tree/vkconfig3-dev</a>

### TODO:
- Update Vulkan Configurator documentation
- Fix preset label display
- Per application vk_layer_settings.txt is not implemented
- Command line layer settings is not implemented
- Extend setting dependencies with messages is not implemented

### Features:
- UI redesign with per use case tabs
- Improve layers loading and selection:
* Add loading of multiple versions of the same layer
* Add explicit selection of the layer version used by a configuration
* No longer load and unload layer manifest when switching configuations
* Json validation caching based on layer manifest modified date and time
* Add layers manifest reloading
* Per-layer enabling of layer settings
- Improve layers ordering:
* Allow ordering of all (implicit layers, unkown layers) layers executed by Vulkan application
* Allow ordering layers independently from enabling them
Expand All @@ -24,10 +20,11 @@
* Add storing multiple set of options per executable
* Add per-application layers configuration
- Add *Vulkan Loader* logging support:
* Add per-executable *Vulkan Loader* loader configuration
* Add *Vulkan Loader* logging outside of application launcher
* Add *Vulkan Loader* selection of each logging message type
* Add per-application *Vulkan Loader* logging message types
- Split GUI and command line into two separated executables
- Add system diagnostic

### Improvements:
- Almost all Vulkan Configurator data is stored in a `$HOME` directory JSON file
Expand Down
21 changes: 6 additions & 15 deletions vkconfig_gui/tab_configurations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -754,31 +754,22 @@ void TabConfigurations::on_configurations_executable_scope_currentIndexChanged(i
configurator.Override(OVERRIDE_AREA_ALL);
break;
}
case EXECUTABLE_PER:
case EXECUTABLE_ALL: {
HideMessageType type =
scope == EXECUTABLE_PER ? HIDE_MESSAGE_NOTIFICATION_EXECUTABLE_PER : HIDE_MESSAGE_NOTIFICATION_EXECUTABLE_ALL;
if (!(configurator.Get(type))) {
case EXECUTABLE_PER: {
if (!(configurator.Get(HIDE_MESSAGE_NOTIFICATION_EXECUTABLE_PER))) {
QMessageBox message;
message.setWindowTitle(format("Selected scope: '%s'", ::GetLabel(scope)).c_str());
message.setText(::GetTooltip(scope));
if (scope == EXECUTABLE_PER) {
message.setInformativeText(
"As the vk_layer_settings.txt file is written in the executable working directory, all the executables "
"with the same working directory will share the same loader configuration.\n\nDo you want to continue?");
} else {
message.setInformativeText(
"If the executable working directory contains a vk_layer_settings.txt file, the file will be "
"overwritten.\n\nDo you want to continue?");
}
message.setInformativeText(
"As the vk_layer_settings.txt file is written in the executable working directory, all the executables "
"with the same working directory will share the same loader configuration.\n\nDo you want to continue?");
message.setIcon(QMessageBox::Information);
message.setStandardButtons(QMessageBox::Ok | QMessageBox::Cancel);
message.setDefaultButton(QMessageBox::Ok);
message.setCheckBox(new QCheckBox("Do not show again."));
int retval = message.exec();

if (message.checkBox()->isChecked()) {
configurator.Set(type);
configurator.Set(HIDE_MESSAGE_NOTIFICATION_EXECUTABLE_PER);
}

if (retval == QMessageBox::Cancel) {
Expand Down
2 changes: 0 additions & 2 deletions vkconfig_gui/tab_diagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ TabDiagnostics::TabDiagnostics(MainWindow &window, std::shared_ptr<Ui::MainWindo

Configurator &configurator = Configurator::Get();

this->ui->diagnostic_vk_home_browse->setIcon(QIcon(":/resourcefiles/folder_browse.png"));

this->ui->diagnostic_keep_running->blockSignals(true);
this->ui->diagnostic_keep_running->setChecked(configurator.GetUseSystemTray());
this->ui->diagnostic_keep_running->blockSignals(false);
Expand Down

0 comments on commit 5cdb0fc

Please sign in to comment.