Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/rendervulkan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,27 @@ bool CVulkanDevice::createDevice()
for ( auto& extension : GetBackend()->GetDeviceExtensions( physDev() ) )
enabledExtensions.push_back( extension );

uint32_t devExtPropCount = 0;
vk.EnumerateDeviceExtensionProperties( physDev(), nullptr, &devExtPropCount, nullptr );
std::vector<VkExtensionProperties> devExtProp( devExtPropCount );
vk.EnumerateDeviceExtensionProperties( physDev(), nullptr, &devExtPropCount, devExtProp.data() );
bool anyMissing = false;
for ( auto& requiredExt : enabledExtensions ) {
bool extFound = false;
for ( auto & availableExt : devExtProp ) {
if ( strcmp( requiredExt, availableExt.extensionName ) == 0 ) {
extFound = true;
break;
}
}
if ( !extFound ) {
vk_log.errorf( "Missing required extension: %s", requiredExt );
anyMissing = true;
}
}
if ( anyMissing )
return false;

#if 0
VkPhysicalDeviceMaintenance5FeaturesKHR maintenance5 = {
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_MAINTENANCE_5_FEATURES_KHR,
Expand Down