mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-18 11:45:55 +00:00
Don't try and create our own layer on replay if it was in createInfo
This commit is contained in:
@@ -43,11 +43,21 @@ void WrappedVulkan::Initialise(VkInitParams ¶ms)
|
||||
{
|
||||
m_InitParams = params;
|
||||
|
||||
params.AppName = string("RenderDoc (") + params.AppName + ")";
|
||||
params.EngineName = string("RenderDoc (") + params.EngineName + ")";
|
||||
params.AppName = string("RenderDoc @ ") + params.AppName;
|
||||
params.EngineName = string("RenderDoc @ ") + params.EngineName;
|
||||
|
||||
// VKTODOLOW verify that layers/extensions are available
|
||||
|
||||
// don't try and create our own layer on replay!
|
||||
for(auto it = params.Layers.begin(); it != params.Layers.end(); ++it)
|
||||
{
|
||||
if(*it == "RenderDoc")
|
||||
{
|
||||
params.Layers.erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
const char **layerscstr = new const char *[params.Layers.size()];
|
||||
for(size_t i=0; i < params.Layers.size(); i++)
|
||||
layerscstr[i] = params.Layers[i].c_str();
|
||||
@@ -360,6 +370,18 @@ bool WrappedVulkan::Serialise_vkCreateDevice(
|
||||
// we must make any modifications locally, so the free of pointers
|
||||
// in the serialised VkDeviceCreateInfo don't double-free
|
||||
VkDeviceCreateInfo createInfo = serCreateInfo;
|
||||
|
||||
// don't try and create our own layer on replay!
|
||||
for(uint32_t i=0; i < createInfo.layerCount; i++)
|
||||
{
|
||||
const char **layerNames = (const char **)createInfo.ppEnabledLayerNames;
|
||||
if(!strcmp(layerNames[i], "RenderDoc"))
|
||||
{
|
||||
for(uint32_t j=i; j < createInfo.layerCount-1; j++)
|
||||
layerNames[j] = layerNames[j+1];
|
||||
createInfo.layerCount--;
|
||||
}
|
||||
}
|
||||
|
||||
physicalDevice = GetResourceManager()->GetLiveHandle<VkPhysicalDevice>(physId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user