Skip to content

Commit fda2e14

Browse files
committed
Enable dependent extension for KHR_bda
1 parent 6c985c7 commit fda2e14

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp

+16-2
Original file line numberDiff line numberDiff line change
@@ -314,9 +314,9 @@ RDResult WrappedVulkan::Initialise(VkInitParams &params, uint64_t sectionVersion
314314

315315
AddRequiredExtensions(true, params.Extensions, supportedExtensions);
316316

317-
// after 1.0, VK_KHR_get_physical_device_properties2 is promoted to core, but enable it if it's
317+
// after 1.1, VK_KHR_get_physical_device_properties2 is promoted to core, but enable it if it's
318318
// reported as available, just in case.
319-
if(params.APIVersion >= VK_API_VERSION_1_0)
319+
if(params.APIVersion >= VK_API_VERSION_1_1)
320320
{
321321
if(supportedExtensions.find(VK_KHR_GET_PHYSICAL_DEVICE_PROPERTIES_2_EXTENSION_NAME) !=
322322
supportedExtensions.end())
@@ -340,6 +340,17 @@ RDResult WrappedVulkan::Initialise(VkInitParams &params, uint64_t sectionVersion
340340
}
341341
}
342342

343+
// enable device group extension if on 1.0, so we can use BDA. Shuts the validation layers up
344+
if(params.APIVersion <= VK_API_VERSION_1_0)
345+
{
346+
if(supportedExtensions.find(VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME) !=
347+
supportedExtensions.end())
348+
{
349+
if(!params.Extensions.contains(VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME))
350+
params.Extensions.push_back(VK_KHR_DEVICE_GROUP_CREATION_EXTENSION_NAME);
351+
}
352+
}
353+
343354
// verify that extensions are supported
344355
for(size_t i = 0; i < params.Extensions.size(); i++)
345356
{
@@ -1916,6 +1927,9 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
19161927
Extensions.push_back(VK_KHR_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME);
19171928
RDCLOG("Enabling VK_KHR_buffer_device_address");
19181929

1930+
if(!Extensions.contains(VK_KHR_DEVICE_GROUP_EXTENSION_NAME))
1931+
Extensions.push_back(VK_KHR_DEVICE_GROUP_EXTENSION_NAME);
1932+
19191933
KHRbuffer = true;
19201934
}
19211935
else if(supportedExtensions.find(VK_EXT_BUFFER_DEVICE_ADDRESS_EXTENSION_NAME) !=

0 commit comments

Comments
 (0)