Skip to content
Draft
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
22 changes: 14 additions & 8 deletions renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2299,14 +2299,20 @@ bool WrappedVulkan::Serialise_vkCreateDevice(SerialiserType &ser, VkPhysicalDevi
VkPhysicalDeviceFeatures availFeatures = {0};
ObjDisp(physicalDevice)->GetPhysicalDeviceFeatures(Unwrap(physicalDevice), &availFeatures);

#define CHECK_PHYS_FEATURE(feature) \
if(enabledFeatures.feature && !availFeatures.feature) \
{ \
SET_ERROR_RESULT(m_FailedReplayResult, ResultCode::APIHardwareUnsupported, \
"Capture requires physical device feature '" #feature \
"' which is not supported\n\n%s", \
GetPhysDeviceCompatString(false, false).c_str()); \
return false; \
// If the replay device lacks a feature the capture enabled, don't hard-fail: strip the feature
// from the device creation and warn. This handles captures made with a newer/updatable driver
// (e.g. Adreno gpudrivers) replayed against a slightly different driver that doesn't advertise
// the same optional features. The frame usually doesn't actually exercise the stripped feature.
#define CHECK_PHYS_FEATURE(feature) \
if(enabledFeatures.feature && !availFeatures.feature) \
{ \
RDCWARN("Capture enabled physical device feature '" #feature \
"' not supported on the replay device - disabling it for replay."); \
enabledFeatures.feature = VK_FALSE; \
if(enabledFeatures2) \
enabledFeatures2->features.feature = VK_FALSE; \
if(createInfo.pEnabledFeatures) \
((VkPhysicalDeviceFeatures *)createInfo.pEnabledFeatures)->feature = VK_FALSE; \
}

CHECK_PHYS_FEATURE(robustBufferAccess);
Expand Down