Remove new method, change debug utils enabling logic

This commit is contained in:
David Dubois 2023-02-28 15:18:36 -08:00 committed by Charles Giessen
parent 82b7a0ed01
commit a4d4e0690e
2 changed files with 2 additions and 10 deletions

View File

@ -584,7 +584,7 @@ Result<Instance> InstanceBuilder::build() const {
for (auto& ext : info.extensions)
extensions.push_back(ext);
if (info.debug_callback != nullptr && system.debug_utils_available) {
if (info.debug_callback != nullptr && info.use_debug_messenger && system.debug_utils_available) {
extensions.push_back(VK_EXT_DEBUG_UTILS_EXTENSION_NAME);
}
bool properties2_ext_enabled =
@ -795,12 +795,6 @@ InstanceBuilder& InstanceBuilder::request_validation_layers(bool enable_validati
return *this;
}
InstanceBuilder & InstanceBuilder::disable_debug_messenger() {
info.use_debug_messenger = false;
info.debug_callback = nullptr;
return *this;
}
InstanceBuilder& InstanceBuilder::use_default_debug_messenger() {
info.use_debug_messenger = true;
info.debug_callback = default_debug_callback;

View File

@ -381,8 +381,6 @@ class InstanceBuilder {
// Checks if the validation layers are available and loads them if they are.
InstanceBuilder& request_validation_layers(bool enable_validation = true);
// Disables the debug messenger and clears the debug callback
InstanceBuilder& disable_debug_messenger();
// Use a default debug callback that prints to standard out.
InstanceBuilder& use_default_debug_messenger();
// Provide a user defined debug callback.