From 64437157d0c5b7d3d22ec3f66001e9cf4acc2706 Mon Sep 17 00:00:00 2001 From: Aliya Pazylbekova Date: Wed, 13 Feb 2019 16:10:10 -0500 Subject: [PATCH] Add GGP capture support --- renderdoc/api/replay/renderdoc_replay.h | 15 ++++ renderdoc/driver/vulkan/CMakeLists.txt | 12 ++- .../vulkan/official/vk_layer_dispatch_table.h | 5 ++ renderdoc/driver/vulkan/official/vulkan.h | 6 ++ .../driver/vulkan/official/vulkan_core.h | 2 + renderdoc/driver/vulkan/official/vulkan_ggp.h | 70 +++++++++++++++ .../driver/vulkan/renderdoc_vulkan.vcxproj | 4 + .../vulkan/renderdoc_vulkan.vcxproj.filters | 6 ++ renderdoc/driver/vulkan/vk_core.cpp | 10 +++ renderdoc/driver/vulkan/vk_core.h | 7 ++ renderdoc/driver/vulkan/vk_ggp.cpp | 90 +++++++++++++++++++ renderdoc/driver/vulkan/vk_hookset_defs.h | 16 ++++ renderdoc/driver/vulkan/vk_next_chains.cpp | 2 + renderdoc/driver/vulkan/vk_posix.cpp | 23 ++++- renderdoc/driver/vulkan/vk_serialise.cpp | 6 ++ .../vulkan/wrappers/vk_device_funcs.cpp | 2 +- 16 files changed, 273 insertions(+), 3 deletions(-) create mode 100644 renderdoc/driver/vulkan/official/vulkan_ggp.h create mode 100644 renderdoc/driver/vulkan/vk_ggp.cpp diff --git a/renderdoc/api/replay/renderdoc_replay.h b/renderdoc/api/replay/renderdoc_replay.h index 37aad0899..3b85edce8 100644 --- a/renderdoc/api/replay/renderdoc_replay.h +++ b/renderdoc/api/replay/renderdoc_replay.h @@ -342,6 +342,7 @@ enum class WindowingSystem : uint32_t XCB, Android, MacOS, + GGP, }; DECLARE_REFLECTION_ENUM(WindowingSystem); @@ -480,6 +481,20 @@ inline const WindowingData CreateXCBWindowingData(xcb_connection_t *connection, return ret; } +DOCUMENT(R"(Create a :class:`WindowingData` for a GGP application. + +:return: A :class:`WindowingData` corresponding to the given system. +:rtype: WindowingData +)"); +inline const WindowingData CreateGgpWindowingData() +{ + WindowingData ret = {}; + + ret.system = WindowingSystem::GGP; + + return ret; +} + DOCUMENT(R"(Create a :class:`WindowingData` for an Android ``ANativeWindow`` handle. :param ANativeWindow window: The native ``ANativeWindow`` handle for this window. diff --git a/renderdoc/driver/vulkan/CMakeLists.txt b/renderdoc/driver/vulkan/CMakeLists.txt index 91b1dae5f..6af076ffa 100644 --- a/renderdoc/driver/vulkan/CMakeLists.txt +++ b/renderdoc/driver/vulkan/CMakeLists.txt @@ -86,7 +86,17 @@ elseif(APPLE) add_definitions(-DVK_USE_PLATFORM_MACOS_MVK) elseif(ENABLE_GGP) - # TODO + list(APPEND sources vk_posix.cpp vk_ggp.cpp) + add_definitions(-DVK_USE_PLATFORM_GGP) + + set(json_in ${CMAKE_CURRENT_SOURCE_DIR}/renderdoc.json) + set(json_out ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/renderdoc_capture.json) + add_custom_command(OUTPUT ${json_out} + COMMAND sed '{s%\\[MAJOR\\]%${RENDERDOC_VERSION_MAJOR}%\; s%\\[MINOR\\]%${RENDERDOC_VERSION_MINOR}%\; s%...renderdoc.dll%${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/${LIB_SUBFOLDER_TRAIL_SLASH}librenderdoc.so%}' < ${json_in} > ${json_out} + DEPENDS ${json_in}) + add_custom_target(generate-json ALL DEPENDS ${json_out}) + + install (FILES ${json_out} DESTINATION ${VULKAN_LAYER_FOLDER}) elseif(UNIX) list(APPEND sources vk_posix.cpp vk_linux.cpp) diff --git a/renderdoc/driver/vulkan/official/vk_layer_dispatch_table.h b/renderdoc/driver/vulkan/official/vk_layer_dispatch_table.h index 10e076aad..2a040e608 100644 --- a/renderdoc/driver/vulkan/official/vk_layer_dispatch_table.h +++ b/renderdoc/driver/vulkan/official/vk_layer_dispatch_table.h @@ -119,6 +119,11 @@ typedef struct VkLayerInstanceDispatchTable_ { PFN_vkGetPhysicalDeviceWin32PresentationSupportKHR GetPhysicalDeviceWin32PresentationSupportKHR; #endif // VK_USE_PLATFORM_WIN32_KHR + // ---- VK_GGP_stream_descriptor_surface extension commands +#ifdef VK_USE_PLATFORM_GGP + PFN_vkCreateStreamDescriptorSurfaceGGP CreateStreamDescriptorSurfaceGGP; +#endif // VK_USE_PLATFORM_GGP + // ---- VK_KHR_get_physical_device_properties2 extension commands PFN_vkGetPhysicalDeviceFeatures2KHR GetPhysicalDeviceFeatures2KHR; PFN_vkGetPhysicalDeviceProperties2KHR GetPhysicalDeviceProperties2KHR; diff --git a/renderdoc/driver/vulkan/official/vulkan.h b/renderdoc/driver/vulkan/official/vulkan.h index 196de564f..9eac0e767 100644 --- a/renderdoc/driver/vulkan/official/vulkan.h +++ b/renderdoc/driver/vulkan/official/vulkan.h @@ -80,4 +80,10 @@ typedef unsigned int RROutput; #include "vulkan_xlib_xrandr.h" #endif + +#ifdef VK_USE_PLATFORM_GGP +#include +#include "vulkan_ggp.h" +#endif + #endif // VULKAN_H_ diff --git a/renderdoc/driver/vulkan/official/vulkan_core.h b/renderdoc/driver/vulkan/official/vulkan_core.h index b16863be3..a7b121c58 100644 --- a/renderdoc/driver/vulkan/official/vulkan_core.h +++ b/renderdoc/driver/vulkan/official/vulkan_core.h @@ -300,6 +300,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_TRANSFORM_FEEDBACK_PROPERTIES_EXT = 1000028001, VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_STREAM_CREATE_INFO_EXT = 1000028002, VK_STRUCTURE_TYPE_TEXTURE_LOD_GATHER_FORMAT_PROPERTIES_AMD = 1000041000, + VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP = 1000049000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CORNER_SAMPLED_IMAGE_FEATURES_NV = 1000050000, VK_STRUCTURE_TYPE_EXTERNAL_MEMORY_IMAGE_CREATE_INFO_NV = 1000056000, VK_STRUCTURE_TYPE_EXPORT_MEMORY_ALLOCATE_INFO_NV = 1000056001, @@ -445,6 +446,7 @@ typedef enum VkStructureType { VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT = 1000190000, VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_DIVISOR_STATE_CREATE_INFO_EXT = 1000190001, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_FEATURES_EXT = 1000190002, + VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP = 1000191000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DRIVER_PROPERTIES_KHR = 1000196000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR = 1000197000, VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_STENCIL_RESOLVE_PROPERTIES_KHR = 1000199000, diff --git a/renderdoc/driver/vulkan/official/vulkan_ggp.h b/renderdoc/driver/vulkan/official/vulkan_ggp.h new file mode 100644 index 000000000..3502dac5d --- /dev/null +++ b/renderdoc/driver/vulkan/official/vulkan_ggp.h @@ -0,0 +1,70 @@ +#ifndef VULKAN_GGP_H_ +#define VULKAN_GGP_H_ 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* +** Copyright (c) 2015-2018 The Khronos Group Inc. +** +** Licensed under the Apache License, Version 2.0 (the "License"); +** you may not use this file except in compliance with the License. +** You may obtain a copy of the License at +** +** http://www.apache.org/licenses/LICENSE-2.0 +** +** Unless required by applicable law or agreed to in writing, software +** distributed under the License is distributed on an "AS IS" BASIS, +** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +** See the License for the specific language governing permissions and +** limitations under the License. +*/ + +/* +** This header is generated from the Khronos Vulkan XML API Registry. +** +*/ + + +#define VK_GGP_stream_descriptor_surface 1 +#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION 1 +#define VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME "VK_GGP_stream_descriptor_surface" + +typedef VkFlags VkStreamDescriptorSurfaceCreateFlagsGGP; + +typedef struct VkStreamDescriptorSurfaceCreateInfoGGP { + VkStructureType sType; + const void* pNext; + VkStreamDescriptorSurfaceCreateFlagsGGP flags; + GgpStreamDescriptor streamDescriptor; +} VkStreamDescriptorSurfaceCreateInfoGGP; + + +typedef VkResult (VKAPI_PTR *PFN_vkCreateStreamDescriptorSurfaceGGP)(VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, const VkAllocationCallbacks* pAllocator, VkSurfaceKHR* pSurface); + +#ifndef VK_NO_PROTOTYPES +VKAPI_ATTR VkResult VKAPI_CALL vkCreateStreamDescriptorSurfaceGGP( + VkInstance instance, + const VkStreamDescriptorSurfaceCreateInfoGGP* pCreateInfo, + const VkAllocationCallbacks* pAllocator, + VkSurfaceKHR* pSurface); +#endif + +#define VK_GGP_frame_token 1 +#define VK_GGP_FRAME_TOKEN_SPEC_VERSION 1 +#define VK_GGP_FRAME_TOKEN_EXTENSION_NAME "VK_GGP_frame_token" + +typedef struct VkPresentFrameTokenGGP { + VkStructureType sType; + const void* pNext; + GgpFrameToken frameToken; +} VkPresentFrameTokenGGP; + + + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj index 0314cc41a..c78e6761f 100644 --- a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj +++ b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj @@ -142,6 +142,9 @@ true + + true + @@ -164,6 +167,7 @@ + diff --git a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters index ce8458a71..cb4dce50c 100644 --- a/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters +++ b/renderdoc/driver/vulkan/renderdoc_vulkan.vcxproj.filters @@ -88,6 +88,9 @@ OS\Posix + + OS\Posix + OS\Posix @@ -219,6 +222,9 @@ official + + official + diff --git a/renderdoc/driver/vulkan/vk_core.cpp b/renderdoc/driver/vulkan/vk_core.cpp index 867396d64..35e942688 100644 --- a/renderdoc/driver/vulkan/vk_core.cpp +++ b/renderdoc/driver/vulkan/vk_core.cpp @@ -739,6 +739,16 @@ static const VkExtensionProperties supportedExtensions[] = { { VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME, VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_SPEC_VERSION, }, +#ifdef VK_GGP_frame_token + { + VK_GGP_FRAME_TOKEN_EXTENSION_NAME, VK_GGP_FRAME_TOKEN_SPEC_VERSION, + }, +#endif +#ifdef VK_GGP_stream_descriptor_surface + { + VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME, VK_GGP_STREAM_DESCRIPTOR_SURFACE_SPEC_VERSION, + }, +#endif { VK_GOOGLE_DECORATE_STRING_EXTENSION_NAME, VK_GOOGLE_DECORATE_STRING_SPEC_VERSION, }, diff --git a/renderdoc/driver/vulkan/vk_core.h b/renderdoc/driver/vulkan/vk_core.h index 299923b72..b4e235815 100644 --- a/renderdoc/driver/vulkan/vk_core.h +++ b/renderdoc/driver/vulkan/vk_core.h @@ -1638,6 +1638,13 @@ public: #endif +#if defined(VK_USE_PLATFORM_GGP) + VkResult vkCreateStreamDescriptorSurfaceGGP(VkInstance instance, + const VkStreamDescriptorSurfaceCreateInfoGGP *pCreateInfo, + const VkAllocationCallbacks *pAllocator, + VkSurfaceKHR *pSurface); +#endif + // VK_KHR_display and VK_KHR_display_swapchain. These have no library or include dependencies so // wecan just compile them in on all platforms to reduce platform-specific code. They are mostly // only actually used though on *nix. diff --git a/renderdoc/driver/vulkan/vk_ggp.cpp b/renderdoc/driver/vulkan/vk_ggp.cpp new file mode 100644 index 000000000..9c3186a61 --- /dev/null +++ b/renderdoc/driver/vulkan/vk_ggp.cpp @@ -0,0 +1,90 @@ +/****************************************************************************** + * The MIT License (MIT) + * + * Copyright (c) 2016-2019 Baldur Karlsson + * + * 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 "api/replay/renderdoc_replay.h" + +#include "vk_core.h" +#include "vk_replay.h" + +VkResult WrappedVulkan::vkCreateStreamDescriptorSurfaceGGP( + const VkInstance instance, const VkStreamDescriptorSurfaceCreateInfoGGP *pCreateInfo, + const VkAllocationCallbacks *pAllocator, VkSurfaceKHR *pSurface) +{ + // should not come in here at all on replay + RDCASSERT(IsCaptureMode(m_State)); + + VkResult ret = ObjDisp(instance)->CreateStreamDescriptorSurfaceGGP(Unwrap(instance), pCreateInfo, + pAllocator, pSurface); + + if(ret == VK_SUCCESS) + { + GetResourceManager()->WrapResource(Unwrap(instance), *pSurface); + + WrappedVkSurfaceKHR *wrapped = GetWrapped(*pSurface); + + wrapped->record = (VkResourceRecord *)(uintptr_t)pCreateInfo->streamDescriptor; + } + return ret; +} + +void VulkanReplay::OutputWindow::SetWindowHandle(WindowingData window) +{ + RDCASSERT(window.system == WindowingSystem::GGP, window.system); + return; // there are no OS specific handles to save. +} + +void VulkanReplay::OutputWindow::CreateSurface(VkInstance inst) +{ + VkStreamDescriptorSurfaceCreateInfoGGP createInfo; + + createInfo.sType = VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP; + createInfo.pNext = NULL; + createInfo.streamDescriptor = 1; + + VkResult vkr = + ObjDisp(inst)->CreateStreamDescriptorSurfaceGGP(Unwrap(inst), &createInfo, NULL, &surface); + RDCASSERTEQUAL(vkr, VK_SUCCESS); + + return; +} + +void VulkanReplay::GetOutputWindowDimensions(uint64_t id, int32_t &w, int32_t &h) +{ + if(id == 0 || m_OutputWindows.find(id) == m_OutputWindows.end()) + return; + + OutputWindow &outw = m_OutputWindows[id]; + + RDCLOG("Window system is GGP (%d), size is %d, %d", outw.m_WindowSystem, outw.width, + outw.height); + // No window, specify default resolution. + w = outw.width != 0 ? outw.width : 1920; + h = outw.height != 0 ? outw.height : 1080; + return; +} + +void *LoadVulkanLibrary() +{ + return Process::LoadModule("libvulkan.so.1"); +} diff --git a/renderdoc/driver/vulkan/vk_hookset_defs.h b/renderdoc/driver/vulkan/vk_hookset_defs.h index 6918c666b..a6715183b 100644 --- a/renderdoc/driver/vulkan/vk_hookset_defs.h +++ b/renderdoc/driver/vulkan/vk_hookset_defs.h @@ -94,6 +94,18 @@ const VkAndroidSurfaceCreateInfoKHR *, pCreateInfo, const VkAllocationCallbacks *, \ pAllocator, VkSurfaceKHR *, pSurface); +#elif defined(VK_USE_PLATFORM_GGP) + +#define HookInitInstance_PlatformSpecific() \ + HookInitExtension(VK_GGP_stream_descriptor_surface, CreateStreamDescriptorSurfaceGGP); + +#define HookInitDevice_PlatformSpecific() + +#define HookDefine_PlatformSpecific() \ + HookDefine4(VkResult, vkCreateStreamDescriptorSurfaceGGP, VkInstance, instance, \ + const VkStreamDescriptorSurfaceCreateInfoGGP *, pCreateInfo, \ + const VkAllocationCallbacks *, pAllocator, VkSurfaceKHR *, pSurface); + #else #if defined(VK_USE_PLATFORM_XCB_KHR) @@ -300,6 +312,7 @@ DeclExt(KHR_android_surface); \ DeclExt(MVK_macos_surface); \ DeclExt(KHR_surface); \ + DeclExt(GGP_stream_descriptor_surface); \ DeclExt(EXT_debug_report); \ DeclExt(KHR_display); \ DeclExt(NV_external_memory_capabilities); \ @@ -317,6 +330,7 @@ DeclExt(KHR_get_display_properties2); \ /* device extensions */ \ DeclExt(EXT_debug_marker); \ + DeclExt(GGP_frame_token); \ DeclExt(KHR_swapchain); \ DeclExt(KHR_display_swapchain); \ DeclExt(NV_external_memory); \ @@ -367,6 +381,7 @@ CheckExt(KHR_android_surface, VKXX); \ CheckExt(MVK_macos_surface, VKXX); \ CheckExt(KHR_surface, VKXX); \ + CheckExt(GGP_stream_descriptor_surface, VKXX); \ CheckExt(EXT_debug_report, VKXX); \ CheckExt(KHR_display, VKXX); \ CheckExt(NV_external_memory_capabilities, VKXX); \ @@ -387,6 +402,7 @@ #define CheckDeviceExts() \ CheckExt(EXT_debug_marker, VKXX); \ + CheckExt(GGP_frame_token, VKXX); \ CheckExt(KHR_swapchain, VKXX); \ CheckExt(KHR_display_swapchain, VKXX); \ CheckExt(NV_external_memory, VKXX); \ diff --git a/renderdoc/driver/vulkan/vk_next_chains.cpp b/renderdoc/driver/vulkan/vk_next_chains.cpp index a07a9a2f0..55ae03206 100644 --- a/renderdoc/driver/vulkan/vk_next_chains.cpp +++ b/renderdoc/driver/vulkan/vk_next_chains.cpp @@ -420,6 +420,8 @@ static void AppendModifiedChainedStruct(byte *&tempMem, VkStruct *outputStruct, case VK_STRUCTURE_TYPE_IMAGEPIPE_SURFACE_CREATE_INFO_FUCHSIA: \ case VK_STRUCTURE_TYPE_IOS_SURFACE_CREATE_INFO_MVK: \ case VK_STRUCTURE_TYPE_MACOS_SURFACE_CREATE_INFO_MVK: \ + case VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP: \ + case VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP: \ case VK_STRUCTURE_TYPE_VI_SURFACE_CREATE_INFO_NN: \ case VK_STRUCTURE_TYPE_WAYLAND_SURFACE_CREATE_INFO_KHR: \ case VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR: \ diff --git a/renderdoc/driver/vulkan/vk_posix.cpp b/renderdoc/driver/vulkan/vk_posix.cpp index f03dd1ceb..e97eec0f6 100644 --- a/renderdoc/driver/vulkan/vk_posix.cpp +++ b/renderdoc/driver/vulkan/vk_posix.cpp @@ -50,7 +50,8 @@ void WrappedVulkan::AddRequiredExtensions(bool instance, vector &extensi #define EXPECT_WSI 0 #if(defined(VK_USE_PLATFORM_ANDROID_KHR) || defined(VK_USE_PLATFORM_XCB_KHR) || \ - defined(VK_USE_PLATFORM_XLIB_KHR) || defined(VK_USE_PLATFORM_MACOS_MVK)) + defined(VK_USE_PLATFORM_XLIB_KHR) || defined(VK_USE_PLATFORM_MACOS_MVK) || \ + defined(VK_USE_PLATFORM_GGP)) #undef EXPECT_WSI #define EXPECT_WSI 1 @@ -124,6 +125,21 @@ void WrappedVulkan::AddRequiredExtensions(bool instance, vector &extensi } #endif +#if defined(VK_USE_PLATFORM_GGP) + // must be supported + RDCASSERT(supportedExtensions.find(VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME) != + supportedExtensions.end()); + + m_SupportedWindowSystems.push_back(WindowingSystem::GGP); + + // don't add duplicates, application will have added this but just be sure + if(std::find(extensionList.begin(), extensionList.end(), + VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME) == extensionList.end()) + { + extensionList.push_back(VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME); + } +#endif + #if EXPECT_WSI // we must have VK_KHR_surface to support WSI at all if(supportedExtensions.find(VK_KHR_SURFACE_EXTENSION_NAME) == supportedExtensions.end()) @@ -161,6 +177,11 @@ void WrappedVulkan::AddRequiredExtensions(bool instance, vector &extensi RDCWARN("XLib Output requires the '%s' extension to be present", VK_KHR_XLIB_SURFACE_EXTENSION_NAME); #endif + +#if defined(VK_USE_PLATFORM_GGP) + RDCWARN("GGP Output requires the '%s' extension to be present", + VK_GGP_STREAM_DESCRIPTOR_SURFACE_EXTENSION_NAME); +#endif } #endif diff --git a/renderdoc/driver/vulkan/vk_serialise.cpp b/renderdoc/driver/vulkan/vk_serialise.cpp index a8a0a1144..56b1e088a 100644 --- a/renderdoc/driver/vulkan/vk_serialise.cpp +++ b/renderdoc/driver/vulkan/vk_serialise.cpp @@ -839,6 +839,12 @@ SERIALISE_VK_HANDLES(); PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_VIEW_IMAGE_FORMAT_INFO_EXT) \ PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_FILTER_CUBIC_IMAGE_VIEW_IMAGE_FORMAT_PROPERTIES_EXT) \ \ + /* VK_GGP_frame_token */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PRESENT_FRAME_TOKEN_GGP) \ + \ + /* VK_GGP_stream_descriptor_surface */ \ + PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_STREAM_DESCRIPTOR_SURFACE_CREATE_INFO_GGP) \ + \ /* VK_GOOGLE_display_timing */ \ PNEXT_UNSUPPORTED(VK_STRUCTURE_TYPE_PRESENT_TIMES_INFO_GOOGLE) \ \ diff --git a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp index 15ff79ec4..a3b2ade09 100644 --- a/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp +++ b/renderdoc/driver/vulkan/wrappers/vk_device_funcs.cpp @@ -151,7 +151,7 @@ static void StripUnwantedExtensions(std::vector &Extensions) if(*it == "VK_KHR_xlib_surface" || *it == "VK_KHR_xcb_surface" || *it == "VK_KHR_wayland_surface" || *it == "VK_KHR_mir_surface" || *it == "VK_MVK_macos_surface" || *it == "VK_KHR_android_surface" || - *it == "VK_KHR_win32_surface") + *it == "VK_KHR_win32_surface" || *it == "VK_GGP_stream_descriptor_surface") { it = Extensions.erase(it); continue;