mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-07-28 18:31:40 +00:00
Re-organise external-facing headers to be more easily used
* renderdoc/api/replay/ contains all the headers for using the replay and analysis side of renderdoc (like in a UI or auto-testing tool) * renderdoc/api/app/ contains the headers if you wanted to write a renderdoc-aware application.
This commit is contained in:
+7
-2
@@ -12,7 +12,7 @@ OBJDIR=.obj
|
||||
OBJECTS=replay/replay_output.o \
|
||||
replay/replay_renderer.o \
|
||||
replay/entry_points.o \
|
||||
replay/basic_types.o \
|
||||
replay/type_helpers.o \
|
||||
hooks/hooks.o \
|
||||
hooks/gl_linux_hooks.o \
|
||||
serialise/serialiser.o \
|
||||
@@ -88,7 +88,12 @@ $(OBJDIR)/%.frago: %.frag
|
||||
cd $$(dirname $<) && objcopy --input binary --output elf64-x86-64 --binary-architecture i386 $$(basename $<) $$(basename $@)
|
||||
@mv $$(dirname $<)/$$(basename $@) $@
|
||||
|
||||
librenderdoc.so: $(addprefix $(OBJDIR)/, $(SHADERS) $(OBJECTS))
|
||||
OBJDIR_OBJECTS=$(addprefix $(OBJDIR)/, $(OBJECTS))
|
||||
OBJDIR_SHADERS=$(addprefix $(OBJDIR)/, $(SHADERS))
|
||||
|
||||
-include $(OBJDIR_OBJECTS:.o=.d)
|
||||
|
||||
librenderdoc.so: $(OBJDIR_OBJECTS) $(OBJDIR_SHADERS)
|
||||
g++ -o librenderdoc.so $^ $(LDFLAGS)
|
||||
|
||||
.PHONY: clean
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
This folder can be extracted out and placed into your source tree if you want to use RenderDoc.
|
||||
|
||||
* If you want to access RenderDoc while it's injected into your program, the app/ folder is what you want. This also contains functions for injecting RenderDoc into existing or new processes.
|
||||
* If you want to write a program that utilises RenderDoc's replay and analysis capabilities (e.g. writing a new UI, or an auto-testing/offline analysis tool), the replay/ folder is what you want.
|
||||
|
||||
You will need both folders if you want to launch processes with RenderDoc injected.
|
||||
@@ -0,0 +1,186 @@
|
||||
/******************************************************************************
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014 Crytek
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
typedef uint8_t byte;
|
||||
typedef uint32_t bool32;
|
||||
|
||||
#ifdef WIN32
|
||||
|
||||
#ifdef RENDERDOC_EXPORTS
|
||||
#define RENDERDOC_API __declspec(dllexport)
|
||||
#else
|
||||
#define RENDERDOC_API __declspec(dllimport)
|
||||
#endif
|
||||
#define RENDERDOC_CC __cdecl
|
||||
|
||||
#elif defined(LINUX)
|
||||
|
||||
#ifdef RENDERDOC_EXPORTS
|
||||
#define RENDERDOC_API __attribute__ ((visibility ("default")))
|
||||
#else
|
||||
#define RENDERDOC_API
|
||||
#endif
|
||||
|
||||
#define RENDERDOC_CC
|
||||
|
||||
#else
|
||||
|
||||
#error "Unknown platform"
|
||||
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <sstream> // istringstream/ostringstream used to avoid other dependencies
|
||||
|
||||
struct CaptureOptions
|
||||
{
|
||||
CaptureOptions()
|
||||
: AllowVSync(true),
|
||||
AllowFullscreen(true),
|
||||
DebugDeviceMode(false),
|
||||
CaptureCallstacks(false),
|
||||
CaptureCallstacksOnlyDraws(false),
|
||||
DelayForDebugger(0),
|
||||
CacheStateObjects(true),
|
||||
HookIntoChildren(false),
|
||||
RefAllResources(false),
|
||||
SaveAllInitials(false),
|
||||
CaptureAllCmdLists(false)
|
||||
{}
|
||||
|
||||
bool32 AllowVSync;
|
||||
bool32 AllowFullscreen;
|
||||
bool32 DebugDeviceMode;
|
||||
bool32 CaptureCallstacks;
|
||||
bool32 CaptureCallstacksOnlyDraws;
|
||||
uint32_t DelayForDebugger;
|
||||
bool32 CacheStateObjects;
|
||||
bool32 HookIntoChildren;
|
||||
bool32 RefAllResources;
|
||||
bool32 SaveAllInitials;
|
||||
bool32 CaptureAllCmdLists;
|
||||
|
||||
#ifdef __cplusplus
|
||||
void FromString(std::string str)
|
||||
{
|
||||
std::istringstream iss(str);
|
||||
|
||||
iss >> AllowFullscreen
|
||||
>> AllowVSync
|
||||
>> DebugDeviceMode
|
||||
>> CaptureCallstacks
|
||||
>> CaptureCallstacksOnlyDraws
|
||||
>> DelayForDebugger
|
||||
>> CacheStateObjects
|
||||
>> HookIntoChildren
|
||||
>> RefAllResources
|
||||
>> SaveAllInitials
|
||||
>> CaptureAllCmdLists;
|
||||
}
|
||||
|
||||
std::string ToString() const
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << AllowFullscreen << " "
|
||||
<< AllowVSync << " "
|
||||
<< DebugDeviceMode << " "
|
||||
<< CaptureCallstacks << " "
|
||||
<< CaptureCallstacksOnlyDraws << " "
|
||||
<< DelayForDebugger << " "
|
||||
<< CacheStateObjects << " "
|
||||
<< HookIntoChildren << " "
|
||||
<< RefAllResources << " "
|
||||
<< SaveAllInitials << " "
|
||||
<< CaptureAllCmdLists << " ";
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
enum InAppOverlay
|
||||
{
|
||||
eOverlay_Enabled = 0x1,
|
||||
eOverlay_FrameRate = 0x2,
|
||||
eOverlay_FrameNumber = 0x4,
|
||||
eOverlay_CaptureList = 0x8,
|
||||
|
||||
eOverlay_Default = (eOverlay_Enabled|eOverlay_FrameRate|eOverlay_FrameNumber|eOverlay_CaptureList),
|
||||
eOverlay_All = ~0U,
|
||||
eOverlay_None = 0,
|
||||
};
|
||||
|
||||
#define RENDERDOC_API_VERSION 1
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// In-program functions
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
extern "C" RENDERDOC_API int RENDERDOC_CC RENDERDOC_GetAPIVersion();
|
||||
typedef int (RENDERDOC_CC *pRENDERDOC_GetAPIVersion)();
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SetLogFile(const wchar_t *logfile);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_SetLogFile)(const wchar_t *logfile);
|
||||
|
||||
extern "C" RENDERDOC_API const wchar_t* RENDERDOC_CC RENDERDOC_GetLogFile();
|
||||
typedef const wchar_t* (RENDERDOC_CC *pRENDERDOC_GetLogFile)();
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SetCaptureOptions(const CaptureOptions *opts);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_SetCaptureOptions)(const CaptureOptions *opts);
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SetActiveWindow(void *wndHandle);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_SetActiveWindow)(void *wndHandle);
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_TriggerCapture();
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_TriggerCapture)();
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_StartFrameCapture(void *wndHandle);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_StartFrameCapture)(void *wndHandle);
|
||||
|
||||
extern "C" RENDERDOC_API bool RENDERDOC_CC RENDERDOC_EndFrameCapture(void *wndHandle);
|
||||
typedef bool (RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(void *wndHandle);
|
||||
|
||||
extern "C" RENDERDOC_API uint32_t RENDERDOC_CC RENDERDOC_GetOverlayBits();
|
||||
typedef uint32_t (RENDERDOC_CC *pRENDERDOC_GetOverlayBits)();
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_MaskOverlayBits(uint32_t And, uint32_t Or);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_MaskOverlayBits)(uint32_t And, uint32_t Or);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Injection/execution capture functions.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
extern "C" RENDERDOC_API uint32_t RENDERDOC_CC RENDERDOC_ExecuteAndInject(const wchar_t *app, const wchar_t *workingDir, const wchar_t *cmdLine,
|
||||
const wchar_t *logfile, const CaptureOptions *opts, bool waitForExit);
|
||||
typedef uint32_t (RENDERDOC_CC *pRENDERDOC_ExecuteAndInject)(const wchar_t *app, const wchar_t *workingDir, const wchar_t *cmdLine,
|
||||
const wchar_t *logfile, const CaptureOptions *opts, bool waitForExit);
|
||||
|
||||
extern "C" RENDERDOC_API uint32_t RENDERDOC_CC RENDERDOC_InjectIntoProcess(uint32_t pid, const wchar_t *logfile, const CaptureOptions *opts, bool waitForExit);
|
||||
typedef uint32_t (RENDERDOC_CC *pRENDERDOC_InjectIntoProcess)(uint32_t pid, const wchar_t *logfile, const CaptureOptions *opts, bool waitForExit);
|
||||
@@ -168,4 +168,4 @@ struct wstr : public rdctype::array<wchar_t>
|
||||
}
|
||||
};
|
||||
|
||||
}; // namespace rdctype
|
||||
}; // namespace rdctype
|
||||
@@ -26,7 +26,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
#include <math.h>
|
||||
|
||||
typedef uint8_t byte;
|
||||
typedef uint32_t bool32;
|
||||
|
||||
#include "basic_types.h"
|
||||
|
||||
@@ -55,7 +57,34 @@
|
||||
|
||||
#endif
|
||||
|
||||
#include "capture_options.h"
|
||||
// We give every resource a globally unique ID so that we can differentiate
|
||||
// between two textures allocated in the same memory (after the first is freed)
|
||||
//
|
||||
// it's a struct around a uint64_t to aid in template selection
|
||||
struct ResourceId
|
||||
{
|
||||
uint64_t id;
|
||||
|
||||
#ifdef __cplusplus
|
||||
ResourceId() : id() {}
|
||||
ResourceId(uint64_t val, bool) { id = val; }
|
||||
|
||||
bool operator ==(const ResourceId u) const
|
||||
{
|
||||
return id == u.id;
|
||||
}
|
||||
|
||||
bool operator !=(const ResourceId u) const
|
||||
{
|
||||
return id != u.id;
|
||||
}
|
||||
|
||||
bool operator <(const ResourceId u) const
|
||||
{
|
||||
return id < u.id;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
#include "replay_enums.h"
|
||||
|
||||
@@ -194,59 +223,6 @@ typedef bool (RENDERDOC_CC *pRENDERDOC_SupportLocalReplay)(const wchar_t *logfil
|
||||
extern "C" RENDERDOC_API ReplayCreateStatus RENDERDOC_CC RENDERDOC_CreateReplayRenderer(const wchar_t *logfile, float *progress, ReplayRenderer **rend);
|
||||
typedef ReplayCreateStatus (RENDERDOC_CC *pRENDERDOC_CreateReplayRenderer)(const wchar_t *logfile, float *progress, ReplayRenderer **rend);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Injection/voluntary capture functions.
|
||||
//
|
||||
// InjectAndExecute takes an exe path, destination filename and capture options.
|
||||
// It will launch the exe and then call...
|
||||
//
|
||||
// InjectIntoProcess will inject RenderDoc and its dependent dlls into the target process
|
||||
// if it's able to, and pass in the given options. NOTE: RenderDoc automatically hooks
|
||||
// any app the dll is loaded into, except where explicitly disallowed or disabled.
|
||||
//
|
||||
// SetLogfile and SetCaptureOptions will set the destination filename of any capture
|
||||
// and the configuration options, respectively.
|
||||
//
|
||||
// Takes the filename of the log. Returns NULL in the case of any error.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define RENDERDOC_API_VERSION 1
|
||||
|
||||
extern "C" RENDERDOC_API int RENDERDOC_CC RENDERDOC_GetAPIVersion();
|
||||
typedef int (RENDERDOC_CC *pRENDERDOC_GetAPIVersion)();
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SetLogFile(const wchar_t *logfile);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_SetLogFile)(const wchar_t *logfile);
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SetCaptureOptions(const CaptureOptions *opts);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_SetCaptureOptions)(const CaptureOptions *opts);
|
||||
|
||||
extern "C" RENDERDOC_API uint32_t RENDERDOC_CC RENDERDOC_ExecuteAndInject(const wchar_t *app, const wchar_t *workingDir, const wchar_t *cmdLine,
|
||||
const wchar_t *logfile, const CaptureOptions *opts, bool waitForExit);
|
||||
typedef uint32_t (RENDERDOC_CC *pRENDERDOC_ExecuteAndInject)(const wchar_t *app, const wchar_t *workingDir, const wchar_t *cmdLine,
|
||||
const wchar_t *logfile, const CaptureOptions *opts, bool waitForExit);
|
||||
|
||||
extern "C" RENDERDOC_API uint32_t RENDERDOC_CC RENDERDOC_InjectIntoProcess(uint32_t pid, const wchar_t *logfile, const CaptureOptions *opts, bool waitForExit);
|
||||
typedef uint32_t (RENDERDOC_CC *pRENDERDOC_InjectIntoProcess)(uint32_t pid, const wchar_t *logfile, const CaptureOptions *opts, bool waitForExit);
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_SetActiveWindow(void *wndHandle);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_SetActiveWindow)(void *wndHandle);
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_TriggerCapture();
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_TriggerCapture)();
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_StartFrameCapture(void *wndHandle);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_StartFrameCapture)(void *wndHandle);
|
||||
|
||||
extern "C" RENDERDOC_API bool RENDERDOC_CC RENDERDOC_EndFrameCapture(void *wndHandle);
|
||||
typedef bool (RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(void *wndHandle);
|
||||
|
||||
extern "C" RENDERDOC_API uint32_t RENDERDOC_CC RENDERDOC_GetOverlayBits();
|
||||
typedef uint32_t (RENDERDOC_CC *pRENDERDOC_GetOverlayBits)();
|
||||
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_MaskOverlayBits(uint32_t And, uint32_t Or);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_MaskOverlayBits)(uint32_t And, uint32_t Or);
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Remote access and control
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -276,9 +252,6 @@ typedef void (RENDERDOC_CC *pRENDERDOC_TriggerExceptionHandler)(void *exceptionP
|
||||
extern "C" RENDERDOC_API void RENDERDOC_CC RENDERDOC_LogText(const wchar_t *text);
|
||||
typedef void (RENDERDOC_CC *pRENDERDOC_LogText)(const wchar_t *text);
|
||||
|
||||
extern "C" RENDERDOC_API const wchar_t* RENDERDOC_CC RENDERDOC_GetLogFilename();
|
||||
typedef const wchar_t* (RENDERDOC_CC *pRENDERDOC_GetLogFilename)();
|
||||
|
||||
extern "C" RENDERDOC_API bool RENDERDOC_CC RENDERDOC_GetThumbnail(const wchar_t *filename, byte *buf, uint32_t &len);
|
||||
typedef bool (RENDERDOC_CC *pRENDERDOC_GetThumbnail)(const wchar_t *filename, byte *buf, uint32_t &len);
|
||||
|
||||
+2
-14
@@ -39,8 +39,8 @@ using std::set;
|
||||
class Serialiser;
|
||||
class Chunk;
|
||||
|
||||
#include "replay/capture_options.h"
|
||||
#include "replay/replay_enums.h"
|
||||
#include "api/app/renderdoc_app.h"
|
||||
#include "api/replay/replay_enums.h"
|
||||
#include "os/os_specific.h"
|
||||
#include "common/threading.h"
|
||||
|
||||
@@ -104,18 +104,6 @@ enum RDCDriver
|
||||
RDC_Custom9,
|
||||
};
|
||||
|
||||
enum InAppOverlay
|
||||
{
|
||||
eOverlay_Enabled = 0x1,
|
||||
eOverlay_FrameRate = 0x2,
|
||||
eOverlay_FrameNumber = 0x4,
|
||||
eOverlay_CaptureList = 0x8,
|
||||
|
||||
eOverlay_Default = (eOverlay_Enabled|eOverlay_FrameRate|eOverlay_FrameNumber|eOverlay_CaptureList),
|
||||
eOverlay_All = ~0U,
|
||||
eOverlay_None = 0,
|
||||
};
|
||||
|
||||
namespace DXBC { class DXBCFile; }
|
||||
namespace Callstack { class StackResolver; }
|
||||
|
||||
|
||||
@@ -23,8 +23,8 @@
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "replay/type_helpers.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "core/core.h"
|
||||
#include "os/os_specific.h"
|
||||
#include "serialise/serialiser.h"
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "replay/replay_renderer.h"
|
||||
#include "core/core.h"
|
||||
#include "os/os_specific.h"
|
||||
|
||||
@@ -27,6 +27,8 @@
|
||||
|
||||
#include "core/core.h"
|
||||
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
#include "os/os_specific.h"
|
||||
|
||||
#include "serialise/serialiser.h"
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <dxgi.h>
|
||||
#include <d3d11.h>
|
||||
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "core/core.h"
|
||||
|
||||
class WrappedID3D11Device;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "core/core.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
#if defined(INCLUDE_D3D_11_1)
|
||||
#include <d3d11_1.h>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
using std::pair;
|
||||
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
#include "driver/d3d11/shaders/dxbc_debug.h"
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "common/timing.h"
|
||||
|
||||
#include "core/core.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
#if defined(INCLUDE_D3D_11_1)
|
||||
#include <d3d11_1.h>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include "driver/d3d11/d3d11_common.h"
|
||||
|
||||
#include "core/core.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
#include "serialise/serialiser.h"
|
||||
#include "common/wrapped_pool.h"
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "replay/replay_driver.h"
|
||||
#include "core/core.h"
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "dxbc_debug.h"
|
||||
#include "dxbc_inspect.h"
|
||||
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
using namespace DXBC;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ using std::map;
|
||||
#pragma once
|
||||
|
||||
#include "common/common.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
#include "dxbc_disassemble.h"
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ struct GLWindowingData
|
||||
#error "Unknown platform"
|
||||
#endif
|
||||
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
// similar to RDCUNIMPLEMENTED but for things that are hit often so we don't want to fire the debugbreak.
|
||||
#define GLNOTIMP(...) RDCDEBUG("OpenGL not implemented - " __VA_ARGS__)
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "gl_common.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "replay/replay_driver.h"
|
||||
#include "core/core.h"
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
|
||||
#include "core/core.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
#include "hooks.h"
|
||||
|
||||
|
||||
+10
-10
@@ -230,6 +230,16 @@
|
||||
<ClInclude Include="3rdparty\mhook\mhook-lib\mhook.h" />
|
||||
<ClInclude Include="3rdparty\stb\stb_image.h" />
|
||||
<ClInclude Include="3rdparty\stb\stb_image_write.h" />
|
||||
<ClInclude Include="api\app\renderdoc_app.h" />
|
||||
<ClInclude Include="api\replay\basic_types.h" />
|
||||
<ClInclude Include="api\replay\capture_options.h" />
|
||||
<ClInclude Include="api\replay\control_types.h" />
|
||||
<ClInclude Include="api\replay\d3d11_pipestate.h" />
|
||||
<ClInclude Include="api\replay\data_types.h" />
|
||||
<ClInclude Include="api\replay\gl_pipestate.h" />
|
||||
<ClInclude Include="api\replay\renderdoc_replay.h" />
|
||||
<ClInclude Include="api\replay\replay_enums.h" />
|
||||
<ClInclude Include="api\replay\shader_types.h" />
|
||||
<ClInclude Include="common\common.h" />
|
||||
<ClInclude Include="common\globalconfig.h" />
|
||||
<ClInclude Include="common\string_utils.h" />
|
||||
@@ -281,17 +291,8 @@
|
||||
<ClInclude Include="os\os_specific.h" />
|
||||
<ClInclude Include="os\win32\win32_hook.h" />
|
||||
<ClInclude Include="os\win32_specific.h" />
|
||||
<ClInclude Include="replay\basic_types.h" />
|
||||
<ClInclude Include="replay\capture_options.h" />
|
||||
<ClInclude Include="replay\control_types.h" />
|
||||
<ClInclude Include="replay\d3d11_pipestate.h" />
|
||||
<ClInclude Include="replay\data_types.h" />
|
||||
<ClInclude Include="replay\gl_pipestate.h" />
|
||||
<ClInclude Include="replay\renderdoc.h" />
|
||||
<ClInclude Include="replay\replay_driver.h" />
|
||||
<ClInclude Include="replay\replay_enums.h" />
|
||||
<ClInclude Include="replay\replay_renderer.h" />
|
||||
<ClInclude Include="replay\shader_types.h" />
|
||||
<ClInclude Include="replay\type_helpers.h" />
|
||||
<ClInclude Include="serialise\serialiser.h" />
|
||||
</ItemGroup>
|
||||
@@ -369,7 +370,6 @@
|
||||
<ClCompile Include="os\win32\win32_shellext.cpp" />
|
||||
<ClCompile Include="os\win32\win32_stringio.cpp" />
|
||||
<ClCompile Include="os\win32\win32_threading.cpp" />
|
||||
<ClCompile Include="replay\basic_types.cpp" />
|
||||
<ClCompile Include="replay\entry_points.cpp" />
|
||||
<ClCompile Include="replay\replay_output.cpp" />
|
||||
<ClCompile Include="replay\replay_renderer.cpp" />
|
||||
|
||||
@@ -64,9 +64,6 @@
|
||||
<Filter Include="3rdparty\lz4">
|
||||
<UniqueIdentifier>{911d2076-eaea-4783-b0c3-789e5b6eff1f}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Replay\external interface">
|
||||
<UniqueIdentifier>{e2f5b1f2-ae41-4e3c-999e-5ade627a91d1}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Resources\hlsl">
|
||||
<UniqueIdentifier>{0ecdcd74-a30b-457e-8b22-92bd58405c56}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@@ -79,6 +76,15 @@
|
||||
<Filter Include="3rdparty\stb">
|
||||
<UniqueIdentifier>{f22a6629-346c-400d-9706-7f999d539f6b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="API">
|
||||
<UniqueIdentifier>{7d6b0f22-1180-4767-b284-cc87f54ec012}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="API\Replay">
|
||||
<UniqueIdentifier>{4e047f61-a78b-4a09-abbb-6c839a4fe177}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="API\In-App">
|
||||
<UniqueIdentifier>{188b97fd-b9d4-47a6-a51a-48bc00e6fc5c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="maths\camera.h">
|
||||
@@ -234,30 +240,9 @@
|
||||
<ClInclude Include="driver\gl\gl_enum.h">
|
||||
<Filter>Drivers\OpenGL</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\capture_options.h">
|
||||
<Filter>Replay\external interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\replay_enums.h">
|
||||
<Filter>Replay\external interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\basic_types.h">
|
||||
<Filter>Replay\external interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\type_helpers.h">
|
||||
<Filter>Replay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\control_types.h">
|
||||
<Filter>Replay\external interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\data_types.h">
|
||||
<Filter>Replay\external interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\shader_types.h">
|
||||
<Filter>Replay\external interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\d3d11_pipestate.h">
|
||||
<Filter>Replay\external interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\replay_driver.h">
|
||||
<Filter>Replay</Filter>
|
||||
</ClInclude>
|
||||
@@ -273,9 +258,6 @@
|
||||
<ClInclude Include="maths\half_convert.h">
|
||||
<Filter>Common\Maths</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\renderdoc.h">
|
||||
<Filter>Replay\external interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="common\string_utils.h">
|
||||
<Filter>Common</Filter>
|
||||
</ClInclude>
|
||||
@@ -285,9 +267,6 @@
|
||||
<ClInclude Include="data\hlsl\debugcbuffers.h">
|
||||
<Filter>Resources\hlsl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="replay\gl_pipestate.h">
|
||||
<Filter>Replay\external interface</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="driver\gl\gl_renderstate.h">
|
||||
<Filter>Drivers\OpenGL</Filter>
|
||||
</ClInclude>
|
||||
@@ -306,6 +285,36 @@
|
||||
<ClInclude Include="data\version.h">
|
||||
<Filter>Resources</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\replay\basic_types.h">
|
||||
<Filter>API\Replay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\replay\capture_options.h">
|
||||
<Filter>API\Replay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\replay\control_types.h">
|
||||
<Filter>API\Replay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\replay\d3d11_pipestate.h">
|
||||
<Filter>API\Replay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\replay\data_types.h">
|
||||
<Filter>API\Replay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\replay\gl_pipestate.h">
|
||||
<Filter>API\Replay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\replay\replay_enums.h">
|
||||
<Filter>API\Replay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\replay\shader_types.h">
|
||||
<Filter>API\Replay</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\app\renderdoc_app.h">
|
||||
<Filter>API\In-App</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="api\replay\renderdoc_replay.h">
|
||||
<Filter>API\Replay</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="maths\camera.cpp">
|
||||
@@ -458,9 +467,6 @@
|
||||
<ClCompile Include="replay\type_helpers.cpp">
|
||||
<Filter>Replay</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="replay\basic_types.cpp">
|
||||
<Filter>Replay</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="replay\entry_points.cpp">
|
||||
<Filter>Replay</Filter>
|
||||
</ClCompile>
|
||||
|
||||
@@ -1,102 +0,0 @@
|
||||
/******************************************************************************
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014 Crytek
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
#include "basic_types.h"
|
||||
|
||||
namespace rdctype
|
||||
{
|
||||
|
||||
wstr &wstr::operator =(const std::wstring &in)
|
||||
{
|
||||
Delete();
|
||||
count = (int32_t)in.size();
|
||||
if(count == 0)
|
||||
{
|
||||
elems = (wchar_t*)allocate(sizeof(wchar_t));
|
||||
elems[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
elems = (wchar_t*)allocate(sizeof(wchar_t)*(count+1));
|
||||
memcpy(elems, &in[0], sizeof(wchar_t)*in.size());
|
||||
elems[count] = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
str &str::operator =(const std::string &in)
|
||||
{
|
||||
Delete();
|
||||
count = (int32_t)in.size();
|
||||
if(count == 0)
|
||||
{
|
||||
elems = (char*)allocate(sizeof(char));
|
||||
elems[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
elems = (char*)allocate(sizeof(char)*(count+1));
|
||||
memcpy(elems, &in[0], sizeof(char)*in.size());
|
||||
elems[count] = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
wstr &wstr::operator =(const wchar_t *const in)
|
||||
{
|
||||
Delete();
|
||||
count = (int32_t)wcslen(in);
|
||||
if(count == 0)
|
||||
{
|
||||
elems = (wchar_t*)allocate(sizeof(wchar_t));
|
||||
elems[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
elems = (wchar_t*)allocate(sizeof(wchar_t)*(count+1));
|
||||
memcpy(elems, &in[0], sizeof(wchar_t)*count);
|
||||
elems[count] = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
str &str::operator =(const char *const in)
|
||||
{
|
||||
Delete();
|
||||
count = (int32_t)strlen(in);
|
||||
if(count == 0)
|
||||
{
|
||||
elems = (char*)allocate(sizeof(char));
|
||||
elems[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
elems = (char*)allocate(sizeof(char)*(count+1));
|
||||
memcpy(elems, &in[0], sizeof(char)*count);
|
||||
elems[count] = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
}; // namespace rdctype
|
||||
@@ -1,128 +0,0 @@
|
||||
/******************************************************************************
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2014 Crytek
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
******************************************************************************/
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <sstream> // istringstream/ostringstream used to avoid other dependencies
|
||||
|
||||
typedef uint8_t byte;
|
||||
typedef uint32_t bool32;
|
||||
|
||||
// We give every resource a globally unique ID so that we can differentiate
|
||||
// between two textures allocated in the same memory (after the first is freed)
|
||||
//
|
||||
// it's a struct around a uint64_t to aid in template selection
|
||||
struct ResourceId
|
||||
{
|
||||
ResourceId() : id() {}
|
||||
ResourceId(uint64_t val, bool) { id = val; }
|
||||
|
||||
bool operator ==(const ResourceId u) const
|
||||
{
|
||||
return id == u.id;
|
||||
}
|
||||
|
||||
bool operator !=(const ResourceId u) const
|
||||
{
|
||||
return id != u.id;
|
||||
}
|
||||
|
||||
bool operator <(const ResourceId u) const
|
||||
{
|
||||
return id < u.id;
|
||||
}
|
||||
|
||||
uint64_t id;
|
||||
};
|
||||
|
||||
struct CaptureOptions
|
||||
{
|
||||
CaptureOptions()
|
||||
: AllowVSync(true),
|
||||
AllowFullscreen(true),
|
||||
DebugDeviceMode(false),
|
||||
CaptureCallstacks(false),
|
||||
CaptureCallstacksOnlyDraws(false),
|
||||
DelayForDebugger(0),
|
||||
CacheStateObjects(true),
|
||||
HookIntoChildren(false),
|
||||
RefAllResources(false),
|
||||
SaveAllInitials(false),
|
||||
CaptureAllCmdLists(false)
|
||||
{}
|
||||
|
||||
bool32 AllowVSync;
|
||||
bool32 AllowFullscreen;
|
||||
bool32 DebugDeviceMode;
|
||||
bool32 CaptureCallstacks;
|
||||
bool32 CaptureCallstacksOnlyDraws;
|
||||
uint32_t DelayForDebugger;
|
||||
bool32 CacheStateObjects;
|
||||
bool32 HookIntoChildren;
|
||||
bool32 RefAllResources;
|
||||
bool32 SaveAllInitials;
|
||||
bool32 CaptureAllCmdLists;
|
||||
|
||||
#ifdef __cplusplus
|
||||
void FromString(std::string str)
|
||||
{
|
||||
std::istringstream iss(str);
|
||||
|
||||
iss >> AllowFullscreen
|
||||
>> AllowVSync
|
||||
>> DebugDeviceMode
|
||||
>> CaptureCallstacks
|
||||
>> CaptureCallstacksOnlyDraws
|
||||
>> DelayForDebugger
|
||||
>> CacheStateObjects
|
||||
>> HookIntoChildren
|
||||
>> RefAllResources
|
||||
>> SaveAllInitials
|
||||
>> CaptureAllCmdLists;
|
||||
}
|
||||
|
||||
std::string ToString() const
|
||||
{
|
||||
std::ostringstream oss;
|
||||
|
||||
oss << AllowFullscreen << " "
|
||||
<< AllowVSync << " "
|
||||
<< DebugDeviceMode << " "
|
||||
<< CaptureCallstacks << " "
|
||||
<< CaptureCallstacksOnlyDraws << " "
|
||||
<< DelayForDebugger << " "
|
||||
<< CacheStateObjects << " "
|
||||
<< HookIntoChildren << " "
|
||||
<< RefAllResources << " "
|
||||
<< SaveAllInitials << " "
|
||||
<< CaptureAllCmdLists << " ";
|
||||
|
||||
return oss.str();
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "serialise/serialiser.h"
|
||||
#include "core/core.h"
|
||||
#include "replay/replay_renderer.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
extern "C" RENDERDOC_API float RENDERDOC_CC Maths_HalfToFloat(uint16_t half)
|
||||
{
|
||||
@@ -97,7 +97,7 @@ void RENDERDOC_CC RENDERDOC_LogText(const wchar_t *text)
|
||||
}
|
||||
|
||||
extern "C" RENDERDOC_API
|
||||
const wchar_t* RENDERDOC_CC RENDERDOC_GetLogFilename()
|
||||
const wchar_t* RENDERDOC_CC RENDERDOC_GetLogFile()
|
||||
{
|
||||
return RDCGETLOGFILE();
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "maths/vec.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "replay/replay_driver.h"
|
||||
#include "core/core.h"
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "common/common.h"
|
||||
#include "core/core.h"
|
||||
#include "replay/renderdoc.h"
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
#include "replay/replay_driver.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
#include "type_helpers.h"
|
||||
|
||||
#include "api/replay/renderdoc_replay.h"
|
||||
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include "serialise/serialiser.h"
|
||||
@@ -40,3 +42,90 @@ string ToStrHelper<false, rdctype::wstr>::Get(const rdctype::wstr &el)
|
||||
{
|
||||
return narrow(wstring(el.elems, el.elems+el.count));
|
||||
}
|
||||
|
||||
template<>
|
||||
string ToStrHelper<false, ResourceId>::Get(const ResourceId &el)
|
||||
{
|
||||
char tostrBuf[256] = {0};
|
||||
|
||||
StringFormat::snprintf(tostrBuf, 255, "Resource ID %llu", el.id);
|
||||
|
||||
return tostrBuf;
|
||||
}
|
||||
|
||||
namespace rdctype
|
||||
{
|
||||
|
||||
wstr &wstr::operator =(const std::wstring &in)
|
||||
{
|
||||
Delete();
|
||||
count = (int32_t)in.size();
|
||||
if(count == 0)
|
||||
{
|
||||
elems = (wchar_t*)allocate(sizeof(wchar_t));
|
||||
elems[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
elems = (wchar_t*)allocate(sizeof(wchar_t)*(count+1));
|
||||
memcpy(elems, &in[0], sizeof(wchar_t)*in.size());
|
||||
elems[count] = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
str &str::operator =(const std::string &in)
|
||||
{
|
||||
Delete();
|
||||
count = (int32_t)in.size();
|
||||
if(count == 0)
|
||||
{
|
||||
elems = (char*)allocate(sizeof(char));
|
||||
elems[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
elems = (char*)allocate(sizeof(char)*(count+1));
|
||||
memcpy(elems, &in[0], sizeof(char)*in.size());
|
||||
elems[count] = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
wstr &wstr::operator =(const wchar_t *const in)
|
||||
{
|
||||
Delete();
|
||||
count = (int32_t)wcslen(in);
|
||||
if(count == 0)
|
||||
{
|
||||
elems = (wchar_t*)allocate(sizeof(wchar_t));
|
||||
elems[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
elems = (wchar_t*)allocate(sizeof(wchar_t)*(count+1));
|
||||
memcpy(elems, &in[0], sizeof(wchar_t)*count);
|
||||
elems[count] = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
str &str::operator =(const char *const in)
|
||||
{
|
||||
Delete();
|
||||
count = (int32_t)strlen(in);
|
||||
if(count == 0)
|
||||
{
|
||||
elems = (char*)allocate(sizeof(char));
|
||||
elems[0] = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
elems = (char*)allocate(sizeof(char)*(count+1));
|
||||
memcpy(elems, &in[0], sizeof(char)*count);
|
||||
elems[count] = 0;
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
}; // namespace rdctype
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "basic_types.h"
|
||||
#include "api/replay/basic_types.h"
|
||||
|
||||
#include <vector>
|
||||
|
||||
|
||||
@@ -1052,16 +1052,6 @@ string ToStrHelper<false, void *>::Get(void* const &el)
|
||||
return tostrBuf;
|
||||
}
|
||||
|
||||
template<>
|
||||
string ToStrHelper<false, ResourceId>::Get(const ResourceId &el)
|
||||
{
|
||||
char tostrBuf[256] = {0};
|
||||
|
||||
StringFormat::snprintf(tostrBuf, 255, "Resource ID %llu", el.id);
|
||||
|
||||
return tostrBuf;
|
||||
}
|
||||
|
||||
template<>
|
||||
string ToStrHelper<false, uint64_t>::Get(const uint64_t &el)
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
#include "common/common.h"
|
||||
#include "os/os_specific.h"
|
||||
#include "replay/basic_types.h"
|
||||
#include "api/replay/basic_types.h"
|
||||
|
||||
#include "replay/type_helpers.h"
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ MACROS=-DLINUX \
|
||||
-DRENDERDOC_PLATFORM=linux \
|
||||
-DRENDERDOC_EXPORTS \
|
||||
-DGIT_COMMIT_HASH="\"$(COMMIT)\""
|
||||
CFLAGS=-c -Wall -Werror -fPIC $(MACROS) -I../renderdoc/
|
||||
CFLAGS=-c -Wall -Werror -fPIC $(MACROS) -I../renderdoc/api/
|
||||
CPPFLAGS=-std=c++11 -g -Wno-unused -Wno-unknown-pragmas -Wno-reorder
|
||||
LDFLAGS=-L../renderdoc -lrenderdoc -lGL
|
||||
LDFLAGS=-L../renderdoc/ -lrenderdoc -lGL
|
||||
OBJDIR=.obj
|
||||
OBJECTS=renderdoccmd.o renderdoccmd_linux.o
|
||||
|
||||
@@ -24,7 +24,9 @@ $(OBJDIR)/%.o: %.c
|
||||
$(CC) $(CFLAGS) -c -o $@ $<
|
||||
@$(CC) $(CFLAGS) -MM -MT $(OBJDIR)/$*.o $*.c > $(OBJDIR)/$*.d
|
||||
|
||||
OBJDIR_OBJECTS=$(addprefix $(OBJDIR)/, $(SHADERS) $(OBJECTS))
|
||||
OBJDIR_OBJECTS=$(addprefix $(OBJDIR)/, $(OBJECTS))
|
||||
|
||||
-include $(OBJDIR_OBJECTS:.o=.d)
|
||||
|
||||
bin/renderdoccmd: $(OBJDIR_OBJECTS) ../renderdoc/librenderdoc.so
|
||||
mkdir -p bin/
|
||||
|
||||
@@ -24,7 +24,8 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
#include <replay/renderdoc.h>
|
||||
#include <replay/renderdoc_replay.h>
|
||||
#include <app/renderdoc_app.h>
|
||||
|
||||
using std::string;
|
||||
using std::wstring;
|
||||
|
||||
@@ -93,7 +93,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;RENDERDOC_PLATFORM=win32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\renderdoc\</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\renderdoc\api\</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
@@ -110,7 +110,7 @@
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<Optimization>Disabled</Optimization>
|
||||
<PreprocessorDefinitions>WIN32;RENDERDOC_PLATFORM=win32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\renderdoc\</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\renderdoc\api\</AdditionalIncludeDirectories>
|
||||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
@@ -129,7 +129,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;RENDERDOC_PLATFORM=win32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\renderdoc\</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\renderdoc\api\</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
@@ -149,7 +149,7 @@
|
||||
<FunctionLevelLinking>true</FunctionLevelLinking>
|
||||
<IntrinsicFunctions>true</IntrinsicFunctions>
|
||||
<PreprocessorDefinitions>WIN32;RENDERDOC_PLATFORM=win32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
<AdditionalIncludeDirectories>..\renderdoc\</AdditionalIncludeDirectories>
|
||||
<AdditionalIncludeDirectories>..\renderdoc\api\</AdditionalIncludeDirectories>
|
||||
<TreatWarningAsError>true</TreatWarningAsError>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
#include <replay/renderdoc.h>
|
||||
#include <replay/renderdoc_replay.h>
|
||||
|
||||
using std::wstring;
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <replay/renderdoc.h>
|
||||
#include <replay/renderdoc_replay.h>
|
||||
#include <app/renderdoc_app.h>
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace renderdoc
|
||||
private static extern void RENDERDOC_LogText(string text);
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern IntPtr RENDERDOC_GetLogFilename();
|
||||
private static extern IntPtr RENDERDOC_GetLogFile();
|
||||
|
||||
[DllImport("renderdoc.dll", CharSet = CharSet.Unicode, CallingConvention = CallingConvention.Cdecl)]
|
||||
private static extern bool RENDERDOC_GetThumbnail(string filename, byte[] outmem, ref UInt32 len);
|
||||
@@ -165,7 +165,7 @@ namespace renderdoc
|
||||
|
||||
public static string GetLogFilename()
|
||||
{
|
||||
return Marshal.PtrToStringUni(RENDERDOC_GetLogFilename());
|
||||
return Marshal.PtrToStringUni(RENDERDOC_GetLogFile());
|
||||
}
|
||||
|
||||
public static byte[] GetThumbnail(string filename)
|
||||
|
||||
Reference in New Issue
Block a user