Skip to content

Commit 50b87dd

Browse files
committed
layers: Remove extra properties pretty print setting
1 parent 40ecf3c commit 50b87dd

7 files changed

Lines changed: 12 additions & 34 deletions

File tree

layers/VkLayer_khronos_validation.json.in

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -437,20 +437,6 @@
437437
{ "key": "validate_sync", "value": true }
438438
]
439439
}
440-
},
441-
{
442-
"key": "syncval_message_extra_properties_pretty_print",
443-
"label": "Pretty print extra properties",
444-
"description": "Enable formatted output of key-value properties. Disabled by default to simplify pattern matching when filtering errors.",
445-
"type": "BOOL",
446-
"default": false,
447-
"dependence": {
448-
"mode": "ALL",
449-
"settings": [
450-
{ "key": "validate_sync", "value": true },
451-
{ "key": "syncval_message_extra_properties", "value": true }
452-
]
453-
}
454440
}
455441
]
456442
}

layers/layer_options.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ const char *VK_LAYER_GPUAV_DEBUG_PRINT_INSTRUMENTATION_INFO = "gpuav_debug_print
223223
const char *VK_LAYER_SYNCVAL_SUBMIT_TIME_VALIDATION = "syncval_submit_time_validation";
224224
const char *VK_LAYER_SYNCVAL_SHADER_ACCESSES_HEURISTIC = "syncval_shader_accesses_heuristic";
225225
const char *VK_LAYER_SYNCVAL_MESSAGE_EXTRA_PROPERTIES = "syncval_message_extra_properties";
226-
const char *VK_LAYER_SYNCVAL_MESSAGE_EXTRA_PROPERTIES_PRETTY_PRINT = "syncval_message_extra_properties_pretty_print";
227226

228227
// Message Formatting
229228
// ---
@@ -632,8 +631,6 @@ static void ValidateLayerSettingsProvided(const VkLayerSettingsCreateInfoEXT *la
632631
required_type = VK_LAYER_SETTING_TYPE_BOOL32_EXT;
633632
} else if (strcmp(VK_LAYER_SYNCVAL_MESSAGE_EXTRA_PROPERTIES, setting.pSettingName) == 0) {
634633
required_type = VK_LAYER_SETTING_TYPE_BOOL32_EXT;
635-
} else if (strcmp(VK_LAYER_SYNCVAL_MESSAGE_EXTRA_PROPERTIES_PRETTY_PRINT, setting.pSettingName) == 0) {
636-
required_type = VK_LAYER_SETTING_TYPE_BOOL32_EXT;
637634
} else if (strcmp(VK_LAYER_MESSAGE_FORMAT_JSON, setting.pSettingName) == 0) {
638635
required_type = VK_LAYER_SETTING_TYPE_BOOL32_EXT;
639636
} else if (strcmp(VK_LAYER_MESSAGE_FORMAT_DISPLAY_APPLICATION_NAME, setting.pSettingName) == 0) {
@@ -1226,9 +1223,11 @@ void ProcessConfigAndEnvSettings(ConfigAndEnvSettings *settings_data) {
12261223
syncval_settings.message_extra_properties);
12271224
}
12281225

1229-
if (vkuHasLayerSetting(layer_setting_set, VK_LAYER_SYNCVAL_MESSAGE_EXTRA_PROPERTIES_PRETTY_PRINT)) {
1230-
vkuGetLayerSettingValue(layer_setting_set, VK_LAYER_SYNCVAL_MESSAGE_EXTRA_PROPERTIES_PRETTY_PRINT,
1231-
syncval_settings.message_extra_properties_pretty_print);
1226+
const char *REMOVED_VK_LAYER_SYNCVAL_MESSAGE_EXTRA_PROPERTIES_PRETTY_PRINT = "syncval_message_extra_properties_pretty_print";
1227+
if (vkuHasLayerSetting(layer_setting_set, REMOVED_VK_LAYER_SYNCVAL_MESSAGE_EXTRA_PROPERTIES_PRETTY_PRINT)) {
1228+
setting_warnings.emplace_back(std::string(REMOVED_VK_LAYER_SYNCVAL_MESSAGE_EXTRA_PROPERTIES_PRETTY_PRINT) +
1229+
" was removed. The main purpose of the extra properties section is to filter syncval error "
1230+
"messages. The priority is to have a fixed and easy-to-parse layout.");
12321231
}
12331232

12341233
const auto *validation_features_ext = vku::FindStructInPNextChain<VkValidationFeaturesEXT>(settings_data->create_info);

layers/sync/sync_error_messages.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ std::string ErrorMessages::Error(const HazardResult& hazard, const CommandExecut
4242
message += '\n';
4343
}
4444
const ReportProperties properties = GetErrorMessageProperties(hazard, context, command, message_type, additional_info);
45-
message += properties.FormatExtraPropertiesSection(validator_.syncval_settings.message_extra_properties_pretty_print);
45+
message += properties.FormatExtraPropertiesSection();
4646
}
4747
return message;
4848
}

layers/sync/sync_reporting.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,10 @@ void ReportProperties::Add(std::string_view property_name, uint64_t value) {
325325
name_values.emplace_back(NameValue{std::string(property_name), std::to_string(value)});
326326
}
327327

328-
std::string ReportProperties::FormatExtraPropertiesSection(bool pretty_print) const {
328+
std::string ReportProperties::FormatExtraPropertiesSection() const {
329329
if (name_values.empty()) {
330330
return {};
331331
}
332-
const uint32_t pretty_print_alignment = 18;
333332
const auto sorted = SortKeyValues(name_values);
334333
std::stringstream ss;
335334
ss << "[Extra properties]\n";
@@ -339,11 +338,7 @@ std::string ReportProperties::FormatExtraPropertiesSection(bool pretty_print) co
339338
ss << "\n";
340339
}
341340
first = false;
342-
uint32_t extra_space_count = 0;
343-
if (pretty_print && property.name.length() < pretty_print_alignment) {
344-
extra_space_count = pretty_print_alignment - (uint32_t)property.name.length();
345-
}
346-
ss << property.name << std::string(extra_space_count, ' ') << " = " << property.value;
341+
ss << property.name << " = " << property.value;
347342
}
348343
return ss.str();
349344
}

layers/sync/sync_reporting.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ struct ReportProperties {
4040

4141
void Add(std::string_view property_name, std::string_view value);
4242
void Add(std::string_view property_name, uint64_t value);
43-
std::string FormatExtraPropertiesSection(bool pretty_print) const;
43+
std::string FormatExtraPropertiesSection() const;
4444
};
4545

4646
// Customization options to modify the standard form of the synchronization error message.

layers/sync/sync_settings.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
/* Copyright (c) 2024 The Khronos Group Inc.
2-
* Copyright (c) 2024 Valve Corporation
3-
* Copyright (c) 2024 LunarG, Inc.
1+
/* Copyright (c) 2025 The Khronos Group Inc.
2+
* Copyright (c) 2025 Valve Corporation
3+
* Copyright (c) 2025 LunarG, Inc.
44
*
55
* Licensed under the Apache License, Version 2.0 (the "License");
66
* you may not use this file except in compliance with the License.
@@ -21,5 +21,4 @@ struct SyncValSettings {
2121
bool submit_time_validation = true;
2222
bool shader_accesses_heuristic = false;
2323
bool message_extra_properties = false;
24-
bool message_extra_properties_pretty_print = false;
2524
};

tests/unit/layer_settings_positive.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ TEST_F(PositiveLayerSettings, AllSettings) {
7474
{OBJECT_LAYER_NAME, "syncval_submit_time_validation", VK_LAYER_SETTING_TYPE_BOOL32_EXT, 1, &disable},
7575
{OBJECT_LAYER_NAME, "syncval_shader_accesses_heuristic", VK_LAYER_SETTING_TYPE_BOOL32_EXT, 1, &disable},
7676
{OBJECT_LAYER_NAME, "syncval_message_extra_properties", VK_LAYER_SETTING_TYPE_BOOL32_EXT, 1, &disable},
77-
{OBJECT_LAYER_NAME, "syncval_message_extra_properties_pretty_print", VK_LAYER_SETTING_TYPE_BOOL32_EXT, 1, &disable},
7877
{OBJECT_LAYER_NAME, "message_format_display_application_name", VK_LAYER_SETTING_TYPE_BOOL32_EXT, 1, &disable},
7978
{OBJECT_LAYER_NAME, "message_format_json", VK_LAYER_SETTING_TYPE_BOOL32_EXT, 1, &disable},
8079
{OBJECT_LAYER_NAME, "debug_action", VK_LAYER_SETTING_TYPE_STRING_EXT, 1, &action_ignore},

0 commit comments

Comments
 (0)