mirror of
https://github.com/charles-lunarg/vk-bootstrap.git
synced 2024-11-22 15:24:34 +00:00
Fixed pNext chain setup function and added validation flags/enables to run_tests
This commit is contained in:
parent
fb3a7c4689
commit
b171ced11e
@ -148,14 +148,13 @@ bool check_extensions_supported (std::vector<const char*> extension_names) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
void setup_pNext_chain (T& structure, std::vector<VkBaseOutStructure*>& structs) {
|
void setup_pNext_chain (T& structure, std::vector<VkBaseOutStructure*> const& structs) {
|
||||||
structure.pNext = nullptr;
|
structure.pNext = nullptr;
|
||||||
if (structs.size () <= 0) return;
|
if (structs.size () <= 0) return;
|
||||||
for (int i = 0; i < structs.size () - 1; i++) {
|
for (int i = 0; i < structs.size () - 1; i++) {
|
||||||
VkBaseOutStructure* cur = reinterpret_cast<VkBaseOutStructure*> (&structs[i]);
|
structs.at (i)->pNext = structs.at (i + 1);
|
||||||
cur = reinterpret_cast<VkBaseOutStructure*> (&structs[i + 1]);
|
|
||||||
}
|
}
|
||||||
structure.pNext = &structs.at (0);
|
structure.pNext = structs.at (0);
|
||||||
}
|
}
|
||||||
} // namespace detail
|
} // namespace detail
|
||||||
|
|
||||||
|
@ -69,14 +69,18 @@ int test_instance_headless () {
|
|||||||
|
|
||||||
vkb::InstanceBuilder builder;
|
vkb::InstanceBuilder builder;
|
||||||
|
|
||||||
auto instance_ret = builder.setup_validation_layers ()
|
auto instance_ret =
|
||||||
.set_headless ()
|
builder.setup_validation_layers ()
|
||||||
.set_app_version (4, 5, 6)
|
.set_headless ()
|
||||||
.set_app_name ("headless")
|
.set_app_version (4, 5, 6)
|
||||||
.set_engine_name ("nick")
|
.set_app_name ("headless")
|
||||||
.set_api_version (1, 0, 34)
|
.set_engine_name ("nick")
|
||||||
.set_default_debug_messenger ()
|
.set_api_version (1, 0, 34)
|
||||||
.build ();
|
.set_default_debug_messenger ()
|
||||||
|
.add_validation_feature_enable (VkValidationFeatureEnableEXT::VK_VALIDATION_FEATURE_ENABLE_GPU_ASSISTED_EXT)
|
||||||
|
.add_validation_feature_disable (VkValidationFeatureDisableEXT::VK_VALIDATION_FEATURE_DISABLE_OBJECT_LIFETIMES_EXT)
|
||||||
|
.add_validation_disable (VkValidationCheckEXT::VK_VALIDATION_CHECK_SHADERS_EXT)
|
||||||
|
.build ();
|
||||||
if (!instance_ret.has_value ()) {
|
if (!instance_ret.has_value ()) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user