Remove RENDERDOC_GetDefaultCaptureOptions, initialise in constructor

This commit is contained in:
baldurk
2026-08-13 17:46:46 +01:00
parent e3b0fa0a24
commit 3f653cfbf2
12 changed files with 27 additions and 53 deletions
+18 -5
View File
@@ -38,11 +38,24 @@ initialisation time that the user can enable or disable at will.
)");
struct CaptureOptions
{
// for convenience, don't export the constructor but allow it within the module
// for constructing defaults
#ifdef RENDERDOC_EXPORTS
CaptureOptions();
#endif
DOCUMENT("");
CaptureOptions()
{
// since we're reading from all bytes even padding etc in EncodeAsString, memset to 0
memset(this, 0, sizeof(CaptureOptions));
allowVSync = true;
allowFullscreen = true;
apiValidation = false;
captureCallstacks = false;
captureCallstacksOnlyActions = false;
delayForDebugger = 0;
verifyBufferAccess = false;
hookIntoChildren = false;
refAllResources = false;
captureAllCmdLists = false;
debugOutputMute = true;
softMemoryLimit = 0;
}
DOCUMENT(R"(Encode the current options to a string suitable for passing around between processes.
-9
View File
@@ -34,7 +34,6 @@
#define RENDERDOC_AllocArrayMem RDOCSELF_AllocArrayMem
#define RENDERDOC_FreeArrayMem RDOCSELF_FreeArrayMem
#define RENDERDOC_GetDefaultCaptureOptions RDOCSELF_GetDefaultCaptureOptions
#define RENDERDOC_NeedVulkanLayerRegistration RDOCSELF_NeedVulkanLayerRegistration
#define RENDERDOC_UpdateVulkanLayerRegistration RDOCSELF_UpdateVulkanLayerRegistration
#define RENDERDOC_ExecuteAndInject RDOCSELF_ExecuteAndInject
@@ -2034,14 +2033,6 @@ extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_BecomeRemoteServer(
// Injection/execution capture functions.
//////////////////////////////////////////////////////////////////////////
DOCUMENT(R"(Retrieve the default and recommended set of capture options.
:return: The default capture options.
:rtype: CaptureOptions
)");
extern "C" RENDERDOC_API void RENDERDOC_CC
RENDERDOC_GetDefaultCaptureOptions(CaptureOptions *defaultOpts);
DOCUMENT(R"(Begin injecting speculatively into all new processes started on the system. Where
supported by platform, configuration, and setup begin injecting speculatively into all new processes
started on the system.
-1
View File
@@ -21,7 +21,6 @@
RENDERDOC_GetAPI;
RDOCSELF_AllocArrayMem;
RDOCSELF_FreeArrayMem;
RDOCSELF_GetDefaultCaptureOptions;
RDOCSELF_NeedVulkanLayerRegistration;
RDOCSELF_UpdateVulkanLayerRegistration;
RDOCSELF_ExecuteAndInject;
-18
View File
@@ -175,24 +175,6 @@ float RENDERDOC_CC GetCaptureOptionF32(RENDERDOC_CaptureOption opt)
return -FLT_MAX;
}
CaptureOptions::CaptureOptions()
{
// since we're reading from all bytes even padding etc, memset to 0
RDCEraseEl(*this);
allowVSync = true;
allowFullscreen = true;
apiValidation = false;
captureCallstacks = false;
captureCallstacksOnlyActions = false;
delayForDebugger = 0;
verifyBufferAccess = false;
hookIntoChildren = false;
refAllResources = false;
captureAllCmdLists = false;
debugOutputMute = true;
softMemoryLimit = 0;
}
#if ENABLED(ENABLE_UNIT_TESTS)
#undef None
-5
View File
@@ -377,11 +377,6 @@ RENDERDOC_ExecuteAndInject(const rdcstr &app, const rdcstr &workingDir, const rd
return ret;
}
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_GetDefaultCaptureOptions(CaptureOptions *opts)
{
*opts = CaptureOptions();
}
extern "C" RENDERDOC_API ResultDetails RENDERDOC_CC RENDERDOC_StartGlobalHook(
const rdcstr &pathmatch, const rdcstr &capturefile, const CaptureOptions &opts)
{