Skip to content

Instantly share code, notes, and snippets.

@dustin-lunarg
Last active February 14, 2020 01:22
Show Gist options
  • Save dustin-lunarg/27463642aec1d150c4f4ffd0338d8518 to your computer and use it in GitHub Desktop.
Save dustin-lunarg/27463642aec1d150c4f4ffd0338d8518 to your computer and use it in GitHub Desktop.
Remove extensions at replay
diff --git framework/decode/vulkan_replay_consumer_base.cpp framework/decode/vulkan_replay_consumer_base.cpp
index 8a85daf..93c0457 100644
--- framework/decode/vulkan_replay_consumer_base.cpp
+++ framework/decode/vulkan_replay_consumer_base.cpp
@@ -1567,8 +1567,25 @@ VulkanReplayConsumerBase::OverrideCreateDevice(VkResult origina
}
else
{
+ std::vector<const char*> modified_extensions;
+ VkDeviceCreateInfo modified_create_info{};
+
+ for (uint32_t i = 0; i < replay_create_info->enabledExtensionCount; ++i)
+ {
+ const char* e = replay_create_info->ppEnabledExtensionNames[i];
+
+ if ((strcmp(e, "VK_AMD_shader_fragment_mask") != 0) && (strcmp(e, "VK_EXT_shader_demote_to_helper_invocation") != 0))
+ {
+ modified_extensions.push_back(e);
+ }
+ }
+
+ modified_create_info = (*replay_create_info);
+ modified_create_info.enabledExtensionCount = static_cast<uint32_t>(modified_extensions.size());
+ modified_create_info.ppEnabledExtensionNames = modified_extensions.data();
+
result = create_device_proc(
- physical_device, replay_create_info, GetAllocationCallbacks(pAllocator), replay_device);
+ physical_device, &modified_create_info, GetAllocationCallbacks(pAllocator), replay_device);
}
if ((replay_device != nullptr) && (result == VK_SUCCESS))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment