Make RENDERDOC_NeedVulkanLayerRegistration feasible to call from python

This commit is contained in:
baldurk
2018-11-26 16:39:00 +00:00
parent 8ed9670601
commit 26511c546c
4 changed files with 52 additions and 47 deletions
+15 -2
View File
@@ -2144,9 +2144,22 @@ extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_EndSelfHostCapture(const ch
// Vulkan layer handling
//////////////////////////////////////////////////////////////////////////
DOCUMENT("Structure containing all the information about vulkan layer registration");
struct VulkanLayerRegistrationInfo
{
DOCUMENT(":class:`VulkanLayerFlags` detailing the current registration.");
VulkanLayerFlags flags;
DOCUMENT("A list of jsons that should be registered");
rdcarray<rdcstr> myJSONs;
DOCUMENT("A list of jsons that should be unregistered / updated");
rdcarray<rdcstr> otherJSONs;
};
DOCUMENT("Internal function for determining vulkan layer registration status.");
extern "C" RENDERDOC_API bool RENDERDOC_CC RENDERDOC_NeedVulkanLayerRegistration(
VulkanLayerFlags *flags, rdcarray<rdcstr> *myJSONs, rdcarray<rdcstr> *otherJSONs);
extern "C" RENDERDOC_API bool RENDERDOC_CC
RENDERDOC_NeedVulkanLayerRegistration(VulkanLayerRegistrationInfo *info);
DOCUMENT("Internal function for updating vulkan layer registration.");
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_UpdateVulkanLayerRegistration(bool systemLevel);
+9 -13
View File
@@ -485,8 +485,8 @@ extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_EndSelfHostCapture(const ch
rdoc->EndFrameCapture(NULL, NULL);
}
extern "C" RENDERDOC_API bool RENDERDOC_CC RENDERDOC_NeedVulkanLayerRegistration(
VulkanLayerFlags *flagsPtr, rdcarray<rdcstr> *myJSONsPtr, rdcarray<rdcstr> *otherJSONsPtr)
extern "C" RENDERDOC_API bool RENDERDOC_CC
RENDERDOC_NeedVulkanLayerRegistration(VulkanLayerRegistrationInfo *info)
{
VulkanLayerFlags flags = VulkanLayerFlags::NoFlags;
std::vector<std::string> myJSONs;
@@ -494,21 +494,17 @@ extern "C" RENDERDOC_API bool RENDERDOC_CC RENDERDOC_NeedVulkanLayerRegistration
bool ret = RenderDoc::Inst().NeedVulkanLayerRegistration(flags, myJSONs, otherJSONs);
if(flagsPtr)
*flagsPtr = flags;
if(myJSONsPtr)
if(info)
{
myJSONsPtr->resize(myJSONs.size());
info->flags = flags;
info->myJSONs.resize(myJSONs.size());
for(size_t i = 0; i < myJSONs.size(); i++)
(*myJSONsPtr)[i] = myJSONs[i];
}
info->myJSONs[i] = myJSONs[i];
if(otherJSONsPtr)
{
otherJSONsPtr->resize(otherJSONs.size());
info->otherJSONs.resize(otherJSONs.size());
for(size_t i = 0; i < otherJSONs.size(); i++)
(*otherJSONsPtr)[i] = otherJSONs[i];
info->otherJSONs[i] = otherJSONs[i];
}
return ret;