Refactor device extension handling#1552
Conversation
3abef20 to
a82f6ef
Compare
|
Nit: VK_EXT_DEBUG_MARKER_EXTENSION_NAME is now requested unconditionally (as Optional) in the base request_device_extensions(), whereas before it was only added once the code had already confirmed debug_utils wasn't set via VK_EXT_DEBUG_UTILS. This is harmless (Optional, so no failure) but can enable an unused device extension when debug-utils is already active via the instance extension — a minor cleanliness nit, not a bug. |
|
|
||
| void OITLinkedLists::request_device_extensions(std::unordered_map<std::string, vkb::RequestMode> &requested_extensions) const | ||
| { | ||
| vkb::VulkanSampleC::request_device_extensions(requested_extensions); |
There was a problem hiding this comment.
Is there a way to implicitly call that base class function? Otherwise people might forget to call this and wonder why things might not work as expected. Not a fan of enabling extensions this way.
There was a problem hiding this comment.
Is there a way to implicitly call that base class function?
Sure, would not be hard to do.
But then request_instance_extensions, request_layers, request_layer_settings, request_validation_feature_enables should be changed accordingly as well.
Note: currently, the only function that does not follow that call-the-base-class-function principle is request_gpu_features. Probably just because the base class' implementation is empty.
That is, if requested (pun intended), I could change it, but would prefer to do so in a separate PR for all those functions.
There was a problem hiding this comment.
Good point. If you ask me, consistency should be preferred. So if we want to go with the explicit way of calling the base class function, we should make all similar places use that and also update the sample templates accordingly to make things easier for maintainers ;)
Good point. |
38a7260 to
643ed09
Compare
643ed09 to
236be2a
Compare
Description
Similar to what we've done in #1455, I refactored the device extension handling.
Instead of the
add_device_extensionandget_device_extensionsfunctions, we now have arequest_device_extensions, exactly like we already have arequest_instance_extensions.Build tested on Win11 with VS2026. Run tested on Win11 with NVidia GPU.
General Checklist:
Please ensure the following points are checked:
Note: The Samples CI runs a number of checks including:
If this PR contains framework changes:
batchcommand line argument to make sure all samples still work properlySample Checklist
If your PR contains a new or modified sample, these further checks must be carried out in addition to the General Checklist: