|
| 1 | +#ifndef EXTERN_H |
| 2 | +#define EXTERN_H |
| 3 | + |
| 4 | +#include <cstdint> |
| 5 | + |
| 6 | +#include "../../renderdoc/renderdoc/api/replay/replay_enums.h" |
| 7 | + |
| 8 | +class Camera; |
| 9 | +class CaptureFile; |
| 10 | +struct CaptureOptions; |
| 11 | +struct EnvironmentModification; |
| 12 | +class RemoteServer; |
| 13 | +class TargetControl; |
| 14 | + |
| 15 | +typedef uint32_t bool32; |
| 16 | + |
| 17 | +namespace RENDERDOC { |
| 18 | + Camera *InitCamera(CameraType type); |
| 19 | + |
| 20 | + CaptureFile *OpenCaptureFile(const char *logfile); |
| 21 | + |
| 22 | + TargetControl *CreateTargetControl(const char *host, uint32_t ident, |
| 23 | + const char *clientName, |
| 24 | + bool32 forceConnection); |
| 25 | + |
| 26 | + ReplayStatus CreateRemoteServerConnection(const char *host, uint32_t port, |
| 27 | + RemoteServer **rend); |
| 28 | +} |
| 29 | + |
| 30 | +////////////////////////////////////////////////////////////////////////// |
| 31 | +// Maths/format/misc related exports |
| 32 | +////////////////////////////////////////////////////////////////////////// |
| 33 | + |
| 34 | +float RENDERDOC_HalfToFloat(uint16_t half); |
| 35 | + |
| 36 | +uint16_t RENDERDOC_FloatToHalf(float flt); |
| 37 | + |
| 38 | +uint32_t RENDERDOC_NumVerticesPerPrimitive(Topology topology); |
| 39 | + |
| 40 | +uint32_t RENDERDOC_VertexOffset(Topology topology, uint32_t primitive); |
| 41 | + |
| 42 | +////////////////////////////////////////////////////////////////////////// |
| 43 | +// Target Control |
| 44 | +////////////////////////////////////////////////////////////////////////// |
| 45 | + |
| 46 | +uint32_t RENDERDOC_EnumerateRemoteTargets(const char *host, uint32_t nextIdent); |
| 47 | + |
| 48 | +////////////////////////////////////////////////////////////////////////// |
| 49 | +// Remote server |
| 50 | +////////////////////////////////////////////////////////////////////////// |
| 51 | + |
| 52 | +uint32_t RENDERDOC_GetDefaultRemoteServerPort(); |
| 53 | + |
| 54 | +void RENDERDOC_BecomeRemoteServer(const char *listenhost, uint32_t port, |
| 55 | + volatile bool32 *killReplay); |
| 56 | + |
| 57 | +////////////////////////////////////////////////////////////////////////// |
| 58 | +// Injection/execution capture functions. |
| 59 | +////////////////////////////////////////////////////////////////////////// |
| 60 | + |
| 61 | +void RENDERDOC_GetDefaultCaptureOptions(CaptureOptions *opts); |
| 62 | + |
| 63 | +bool32 RENDERDOC_StartGlobalHook(const char *pathmatch, const char *logfile, |
| 64 | + const CaptureOptions &opts); |
| 65 | + |
| 66 | +void RENDERDOC_StopGlobalHook(); |
| 67 | + |
| 68 | +bool32 RENDERDOC_IsGlobalHookActive(); |
| 69 | + |
| 70 | +bool32 RENDERDOC_CanGlobalHook(); |
| 71 | + |
| 72 | +uint32_t RENDERDOC_ExecuteAndInject( |
| 73 | + const char *app, |
| 74 | + const char *workingDir, |
| 75 | + const char *cmdLine, |
| 76 | + const rdctype::array<EnvironmentModification> &env, |
| 77 | + const char *logfile, |
| 78 | + const CaptureOptions &opts, |
| 79 | + bool32 waitForExit |
| 80 | +); |
| 81 | + |
| 82 | +uint32_t RENDERDOC_InjectIntoProcess( |
| 83 | + uint32_t pid, |
| 84 | + const rdctype::array<EnvironmentModification> &env, |
| 85 | + const char *logfile, |
| 86 | + const CaptureOptions &opts, |
| 87 | + bool32 waitForExit |
| 88 | +); |
| 89 | + |
| 90 | +void RENDERDOC_StartSelfHostCapture(const char *dllname); |
| 91 | + |
| 92 | +void RENDERDOC_EndSelfHostCapture(const char *dllname); |
| 93 | + |
| 94 | +////////////////////////////////////////////////////////////////////////// |
| 95 | +// Vulkan layer handling |
| 96 | +////////////////////////////////////////////////////////////////////////// |
| 97 | + |
| 98 | +bool RENDERDOC_NeedVulkanLayerRegistration( |
| 99 | + VulkanLayerFlags *flags, |
| 100 | + rdctype::array<rdctype::str> *myJSONs, |
| 101 | + rdctype::array<rdctype::str> *otherJSONs |
| 102 | +); |
| 103 | + |
| 104 | +void RENDERDOC_UpdateVulkanLayerRegistration(bool systemLevel); |
| 105 | + |
| 106 | +////////////////////////////////////////////////////////////////////////// |
| 107 | +// Miscellaneous! |
| 108 | +////////////////////////////////////////////////////////////////////////// |
| 109 | + |
| 110 | +void RENDERDOC_InitGlobalEnv(GlobalEnvironment env, |
| 111 | + const rdctype::array<rdctype::str> &args); |
| 112 | + |
| 113 | +void RENDERDOC_TriggerExceptionHandler(void *exceptionPtrs, bool32 crashed); |
| 114 | + |
| 115 | +void RENDERDOC_SetDebugLogFile(const char *filename); |
| 116 | + |
| 117 | +const char *RENDERDOC_GetLogFile(); |
| 118 | + |
| 119 | +void RENDERDOC_LogText(const char *text); |
| 120 | + |
| 121 | +void RENDERDOC_LogMessage(LogType type, const char *project, const char *file, |
| 122 | + unsigned int line, const char *text); |
| 123 | + |
| 124 | +const char *RENDERDOC_GetVersionString(); |
| 125 | + |
| 126 | +const char *RENDERDOC_GetConfigSetting(const char *name); |
| 127 | + |
| 128 | +void RENDERDOC_SetConfigSetting(const char *name, const char *value); |
| 129 | + |
| 130 | +void RENDERDOC_GetAndroidFriendlyName(const rdctype::str &device, |
| 131 | + rdctype::str &friendly); |
| 132 | + |
| 133 | +void RENDERDOC_EnumerateAndroidDevices(rdctype::str *deviceList); |
| 134 | + |
| 135 | +void RENDERDOC_StartAndroidRemoteServer(const char *device); |
| 136 | + |
| 137 | +void RENDERDOC_CheckAndroidPackage(const char *host, const char *exe, |
| 138 | + AndroidFlags *flags); |
| 139 | + |
| 140 | +bool RENDERDOC_AddLayerToAndroidPackage(const char *host, const char *exe, |
| 141 | + float *progress); |
| 142 | + |
| 143 | +#endif // EXTERN_H |
0 commit comments