Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

layers: Move all settings to VK_EXT_layer_settings #8549

Merged

Conversation

spencer-lunarg
Copy link
Contributor

closes #8477

I have wanted to do this for a long time VK_LAYER_LOG_FILENAME, VK_LAYER_DEBUG_ACTION, and VK_LAYER_REPORT_FLAG could never be set by environment variables and used old code that was solved by using vkuCreateLayerSettingSetvia VK_EXT_layer_setting

This moves the code over, as well as adds some more useful info when setting non-default settings

@spencer-lunarg spencer-lunarg requested a review from a team as a code owner September 17, 2024 01:31
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 257667.

// These aim to follow VkDebugReportFlagBitsEXT but were created prior
// Could replace with VkDebugReportFlagBitsEXT, but would be a LOT of churn and these
// names are less verbose and desired.
enum LogMessageTypeBits {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this gets included from both layer and tests, decided to make a dedicated file as this should never be touched and I only want the minimal ./layer code in ./test as possible

@@ -676,6 +676,49 @@ VKAPI_ATTR VkBool32 VKAPI_CALL MessengerBreakCallback([[maybe_unused]] VkDebugUt
return false;
}

static void PrintMessageSeverity(VkFlags vk_flags, char *msg_flags) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just moving here as only place it is used

@@ -16,64 +16,9 @@
**************************************************************************/
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file basically has just become a way to call GetEnvironment

might move this logic to another file, but for now going to just leave here

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17483 running.

@@ -250,197 +127,6 @@ static inline bool IsHighIntegrity() {
}
#endif

string ConfigFile::FindSettings() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all this logic was replaced with VK_EXT_layer_settings, we were duplicating its logic here

if (debug_action & VK_DBG_LAYER_ACTION_LOG_MSG) {
FILE *log_output = GetLayerLogOutput(log_filename.c_str());
if (log_output != stdout) {
printf("Validation Layer Info - Logging validation error to %s\n", log_filename.c_str());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this single handly is so nice, i have sometimes had issues trying to log to a file and having confirmation that it is hooked up is awesome

@spencer-lunarg spencer-lunarg force-pushed the spencer-lunarg-settings-9000 branch from b6ea27e to d9f7482 Compare September 17, 2024 01:37
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 257682.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17484 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17484 passed.

@spencer-lunarg spencer-lunarg force-pushed the spencer-lunarg-settings-9000 branch from d9f7482 to 3d8205f Compare September 17, 2024 14:36
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 258125.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17493 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 258142.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17494 running.

tests/framework/test_framework.cpp Outdated Show resolved Hide resolved
scripts/generators/layer_chassis_generator.py Show resolved Hide resolved
docs/settings.md Outdated Show resolved Hide resolved
docs/settings.md Outdated Show resolved Hide resolved
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17494 failed.

@spencer-lunarg spencer-lunarg force-pushed the spencer-lunarg-settings-9000 branch from 94c9f28 to 1fae7ea Compare September 17, 2024 16:05
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 258225.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17498 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17498 passed.

docs/settings.md Outdated Show resolved Hide resolved
docs/settings.md Outdated Show resolved Hide resolved
docs/settings.md Outdated Show resolved Hide resolved
@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build queued with queue ID 258316.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17499 running.

@ci-tester-lunarg
Copy link
Collaborator

CI Vulkan-ValidationLayers build # 17499 passed.

@spencer-lunarg spencer-lunarg merged commit e0feb83 into KhronosGroup:main Sep 17, 2024
21 checks passed
@spencer-lunarg spencer-lunarg deleted the spencer-lunarg-settings-9000 branch September 17, 2024 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Setting report_flags through an env variable or VK_EXT_layer_settings doesn't work
6 participants