mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-24 15:36:33 +00:00
Make RENDERDOC_NeedVulkanLayerRegistration feasible to call from python
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user