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

Add availability checks for debug report extension usage #1072

Merged
merged 5 commits into from
Jul 1, 2024

Conversation

kocdemir
Copy link
Contributor

Description

Adding the missing condition checks before using the structures and functions from the VK_EXT_debug_report extension in the samples.

Normal functionality should not change when the extension is supported, tested on a device where the extension is missing.

@CLAassistant
Copy link

CLAassistant commented Jun 15, 2024

CLA assistant check
All committers have signed the CLA.

@SaschaWillems
Copy link
Collaborator

Thank you very much for your contribution. Note that CI fails at the clang format step, which means you need to properly format your changes with clang-format, see https://github.com/KhronosGroup/Vulkan-Samples/actions/runs/9530177624/job/26297193969?pr=1072

Formatting fix on volkInitialize.
@kocdemir
Copy link
Contributor Author

Thanks, I've updated the file now.

break;
}
}
if (has_debug_report)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe you can replace this loop with something like

bool has_debug_report = std::any_of(instance_extensions.begin(),
                                    instance_extensions.end(),
                                    [](VkExtensionProperties const &ep) { return strcmp(ep.extensionName, VK_EXT_DEBUG_REPORT_EXTENSION_NAME) == 0; });

@marty-johnson59 marty-johnson59 merged commit 6209344 into KhronosGroup:main Jul 1, 2024
23 checks passed
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.

None yet

6 participants