From 24032c00390399fd5cb00e8a2aaae3a882af7314 Mon Sep 17 00:00:00 2001 From: baldurk Date: Tue, 8 Jan 2019 11:36:14 +0000 Subject: [PATCH] Update demos project to latest in-application header --- util/test/demos/demos.vcxproj | 1 + util/test/demos/demos.vcxproj.filters | 1 + util/test/demos/renderdoc_app.h | 70 +++++++++++++++++++++------ 3 files changed, 57 insertions(+), 15 deletions(-) diff --git a/util/test/demos/demos.vcxproj b/util/test/demos/demos.vcxproj index e71695470..77b8e240d 100644 --- a/util/test/demos/demos.vcxproj +++ b/util/test/demos/demos.vcxproj @@ -252,6 +252,7 @@ + diff --git a/util/test/demos/demos.vcxproj.filters b/util/test/demos/demos.vcxproj.filters index 890ab5178..e82ff241f 100644 --- a/util/test/demos/demos.vcxproj.filters +++ b/util/test/demos/demos.vcxproj.filters @@ -473,5 +473,6 @@ 3rdparty\vma + \ No newline at end of file diff --git a/util/test/demos/renderdoc_app.h b/util/test/demos/renderdoc_app.h index 931c8c950..e421e066c 100644 --- a/util/test/demos/renderdoc_app.h +++ b/util/test/demos/renderdoc_app.h @@ -126,15 +126,24 @@ typedef enum RENDERDOC_CaptureOption { // eRENDERDOC_Option_DelayForDebugger = 5, - // Verify any writes to mapped buffers, by checking the memory after the - // bounds of the returned pointer to detect any modification. + // Verify buffer access. This includes checking the memory returned by a Map() call to + // detect any out-of-bounds modification, as well as initialising buffers with undefined contents + // to a marker value to catch use of uninitialised memory. + // + // NOTE: This option is only valid for OpenGL and D3D11. Explicit APIs such as D3D12 and Vulkan do + // not do the same kind of interception & checking and undefined contents are really undefined. // // Default - disabled // - // 1 - Verify any writes to mapped buffers - // 0 - No verification is performed, and overwriting bounds may cause - // crashes or corruption in RenderDoc - eRENDERDOC_Option_VerifyMapWrites = 6, + // 1 - Verify buffer access + // 0 - No verification is performed, and overwriting bounds may cause crashes or corruption in + // RenderDoc. + eRENDERDOC_Option_VerifyBufferAccess = 6, + + // The old name for eRENDERDOC_Option_VerifyBufferAccess was eRENDERDOC_Option_VerifyMapWrites. + // This option now controls the filling of uninitialised buffers with 0xdddddddd which was + // previously always enabled + eRENDERDOC_Option_VerifyMapWrites = eRENDERDOC_Option_VerifyBufferAccess, // Hooks any system API calls that create child processes, and injects // RenderDoc into them recursively with the same options. @@ -177,7 +186,7 @@ typedef enum RENDERDOC_CaptureOption { // and replayed many times will not be available and may cause a failure to // capture. // - // Note this is only true for APIs where multithreading is difficult or + // NOTE: This is only true for APIs where multithreading is difficult or // discouraged. Newer APIs like Vulkan and D3D12 will ignore this option // and always capture all command lists since the API is heavily oriented // around it and the overheads have been reduced by API design. @@ -195,6 +204,15 @@ typedef enum RENDERDOC_CaptureOption { // 0 - API debugging is displayed as normal eRENDERDOC_Option_DebugOutputMute = 11, + // Option to allow vendor extensions to be used even when they may be + // incompatible with RenderDoc and cause corrupted replays or crashes. + // + // Default - inactive + // + // No values are documented, this option should only be used when absolutely + // necessary as directed by a RenderDoc developer. + eRENDERDOC_Option_AllowUnsupportedVendorExtensions = 12, + } RENDERDOC_CaptureOption; // Sets an option that controls how RenderDoc behaves on capture. @@ -495,6 +513,13 @@ typedef uint32_t(RENDERDOC_CC *pRENDERDOC_IsFrameCapturing)(); typedef uint32_t(RENDERDOC_CC *pRENDERDOC_EndFrameCapture)(RENDERDOC_DevicePointer device, RENDERDOC_WindowHandle wndHandle); +// Ends capturing immediately and discard any data stored without saving to disk. +// +// This will return 1 if the capture was discarded, and 0 if there was an error or no capture +// was in progress +typedef uint32_t(RENDERDOC_CC *pRENDERDOC_DiscardFrameCapture)(RENDERDOC_DevicePointer device, + RENDERDOC_WindowHandle wndHandle); + ////////////////////////////////////////////////////////////////////////////////////////////////// // RenderDoc API versions // @@ -516,6 +541,8 @@ typedef enum RENDERDOC_Version { eRENDERDOC_API_Version_1_1_1 = 10101, // RENDERDOC_API_1_1_1 = 1 01 01 eRENDERDOC_API_Version_1_1_2 = 10102, // RENDERDOC_API_1_1_2 = 1 01 02 eRENDERDOC_API_Version_1_2_0 = 10200, // RENDERDOC_API_1_2_0 = 1 02 00 + eRENDERDOC_API_Version_1_3_0 = 10300, // RENDERDOC_API_1_3_0 = 1 03 00 + eRENDERDOC_API_Version_1_4_0 = 10400, // RENDERDOC_API_1_4_0 = 1 04 00 } RENDERDOC_Version; // API version changelog: @@ -533,8 +560,16 @@ typedef enum RENDERDOC_Version { // branch. // 1.2.0 - Added feature: SetCaptureFileComments() to add comments to a capture file that will be // displayed in the UI program on load. +// 1.3.0 - Added feature: New capture option eRENDERDOC_Option_AllowUnsupportedVendorExtensions +// which allows users to opt-in to allowing unsupported vendor extensions to function. +// Should be used at the user's own risk. +// Refactor: Renamed eRENDERDOC_Option_VerifyMapWrites to +// eRENDERDOC_Option_VerifyBufferAccess, which now also controls initialisation to +// 0xdddddddd of uninitialised buffer contents. +// 1.4.0 - Added feature: DiscardFrameCapture() to discard a frame capture in progress and stop +// capturing without saving anything to disk. -typedef struct RENDERDOC_API_1_2_0 +typedef struct RENDERDOC_API_1_4_0 { pRENDERDOC_GetAPIVersion GetAPIVersion; @@ -597,14 +632,19 @@ typedef struct RENDERDOC_API_1_2_0 // new function in 1.2.0 pRENDERDOC_SetCaptureFileComments SetCaptureFileComments; -} RENDERDOC_API_1_2_0; -typedef RENDERDOC_API_1_2_0 RENDERDOC_API_1_0_0; -typedef RENDERDOC_API_1_2_0 RENDERDOC_API_1_0_1; -typedef RENDERDOC_API_1_2_0 RENDERDOC_API_1_0_2; -typedef RENDERDOC_API_1_2_0 RENDERDOC_API_1_1_0; -typedef RENDERDOC_API_1_2_0 RENDERDOC_API_1_1_1; -typedef RENDERDOC_API_1_2_0 RENDERDOC_API_1_1_2; + // new function in 1.4.0 + pRENDERDOC_DiscardFrameCapture DiscardFrameCapture; +} RENDERDOC_API_1_4_0; + +typedef RENDERDOC_API_1_4_0 RENDERDOC_API_1_0_0; +typedef RENDERDOC_API_1_4_0 RENDERDOC_API_1_0_1; +typedef RENDERDOC_API_1_4_0 RENDERDOC_API_1_0_2; +typedef RENDERDOC_API_1_4_0 RENDERDOC_API_1_1_0; +typedef RENDERDOC_API_1_4_0 RENDERDOC_API_1_1_1; +typedef RENDERDOC_API_1_4_0 RENDERDOC_API_1_1_2; +typedef RENDERDOC_API_1_4_0 RENDERDOC_API_1_2_0; +typedef RENDERDOC_API_1_4_0 RENDERDOC_API_1_3_0; ////////////////////////////////////////////////////////////////////////////////////////////////// // RenderDoc API entry point