mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-12 21:10:42 +00:00
Add GGP build support
- Disable GL and GLES drivers on GGP - Add flags to keep symbols in release builds. Adds minimal debug info that preserves backtraces. - Disable python modules and qrenderdoc for GGP
This commit is contained in:
committed by
baldurk
parent
26d823905e
commit
7c0365679f
+21
-1
@@ -147,6 +147,7 @@ option(ENABLE_PYRENDERDOC "Enable renderdoc python modules" ON)
|
||||
|
||||
option(ENABLE_XLIB "Enable xlib windowing support" ON)
|
||||
option(ENABLE_XCB "Enable xcb windowing support" ON)
|
||||
option(ENABLE_GGP "Enable GGP support" OFF)
|
||||
|
||||
option(ENABLE_ASAN "Enable address sanitizer" OFF)
|
||||
option(ENABLE_TSAN "Enable thread sanitizer" OFF)
|
||||
@@ -210,6 +211,19 @@ if(ANDROID)
|
||||
message(STATUS "Using Android native API level ${ANDROID_NATIVE_API_LEVEL}")
|
||||
endif()
|
||||
|
||||
if(ENABLE_GGP)
|
||||
message(STATUS "Disabling GL, GLES driver on ggp")
|
||||
set(ENABLE_GL OFF CACHE BOOL "" FORCE)
|
||||
set(ENABLE_GLES OFF CACHE BOOL "" FORCE)
|
||||
|
||||
# GGP doesn't support the Qt UI
|
||||
message(STATUS "Disabling qrenderdoc for ggp build")
|
||||
set(ENABLE_QRENDERDOC OFF CACHE BOOL "" FORCE)
|
||||
|
||||
message(STATUS "Disabling renderdoc python modules for ggp build")
|
||||
set(ENABLE_PYRENDERDOC OFF CACHE BOOL "" FORCE)
|
||||
endif()
|
||||
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
@@ -232,6 +246,9 @@ endif()
|
||||
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fstrict-aliasing")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
|
||||
if(ENABLE_GGP)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -gline-tables-only -fno-omit-frame-pointer")
|
||||
endif()
|
||||
|
||||
set(warning_flags
|
||||
-Wall
|
||||
@@ -269,6 +286,9 @@ if(ANDROID)
|
||||
add_definitions(-DRENDERDOC_PLATFORM_ANDROID)
|
||||
elseif(APPLE)
|
||||
add_definitions(-DRENDERDOC_PLATFORM_APPLE)
|
||||
elseif(ENABLE_GGP)
|
||||
add_definitions(-DRENDERDOC_PLATFORM_GGP)
|
||||
add_definitions(-DRENDERDOC_WINDOWING_GGP)
|
||||
elseif(UNIX)
|
||||
add_definitions(-DRENDERDOC_PLATFORM_LINUX)
|
||||
|
||||
@@ -320,7 +340,7 @@ if(ENABLE_VULKAN)
|
||||
message(STATUS " - Vulkan")
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT ANDROID AND NOT APPLE)
|
||||
if(UNIX AND NOT ANDROID AND NOT APPLE AND NOT ENABLE_GGP)
|
||||
message(STATUS "Enabled Window System Support:")
|
||||
|
||||
if(ENABLE_XLIB)
|
||||
|
||||
@@ -31,6 +31,14 @@ elseif(APPLE)
|
||||
find_library(OPENGL_LIBRARY OpenGL)
|
||||
list(APPEND RDOC_LIBRARIES PRIVATE ${OPENGL_LIBRARY})
|
||||
endif()
|
||||
elseif(ENABLE_GGP)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
list(APPEND RDOC_LIBRARIES
|
||||
PRIVATE -lm
|
||||
PRIVATE -ldl
|
||||
PRIVATE -lrt)
|
||||
elseif(UNIX)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
find_package(Threads REQUIRED)
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
#define RENDERDOC_CC __cdecl
|
||||
|
||||
#elif defined(RENDERDOC_PLATFORM_LINUX) || defined(RENDERDOC_PLATFORM_APPLE) || \
|
||||
defined(RENDERDOC_PLATFORM_ANDROID)
|
||||
defined(RENDERDOC_PLATFORM_ANDROID) || defined(RENDERDOC_PLATFORM_GGP)
|
||||
|
||||
#define RENDERDOC_EXPORT_API __attribute__((visibility("default")))
|
||||
#define RENDERDOC_IMPORT_API
|
||||
|
||||
@@ -66,6 +66,7 @@
|
||||
#define RDOC_LINUX OPTION_OFF
|
||||
#define RDOC_APPLE OPTION_OFF
|
||||
#define RDOC_POSIX OPTION_OFF
|
||||
#define RDOC_GGP OPTION_OFF
|
||||
|
||||
#elif defined(RENDERDOC_PLATFORM_ANDROID)
|
||||
|
||||
@@ -74,6 +75,7 @@
|
||||
#define RDOC_LINUX OPTION_OFF
|
||||
#define RDOC_APPLE OPTION_OFF
|
||||
#define RDOC_POSIX OPTION_ON
|
||||
#define RDOC_GGP OPTION_OFF
|
||||
|
||||
#elif defined(RENDERDOC_PLATFORM_LINUX)
|
||||
|
||||
@@ -82,6 +84,7 @@
|
||||
#define RDOC_LINUX OPTION_ON
|
||||
#define RDOC_APPLE OPTION_OFF
|
||||
#define RDOC_POSIX OPTION_ON
|
||||
#define RDOC_GGP OPTION_OFF
|
||||
|
||||
#elif defined(RENDERDOC_PLATFORM_APPLE)
|
||||
|
||||
@@ -90,6 +93,16 @@
|
||||
#define RDOC_LINUX OPTION_OFF
|
||||
#define RDOC_APPLE OPTION_ON
|
||||
#define RDOC_POSIX OPTION_ON
|
||||
#define RDOC_GGP OPTION_OFF
|
||||
|
||||
#elif defined(RENDERDOC_PLATFORM_GGP)
|
||||
|
||||
#define RDOC_WIN32 OPTION_OFF
|
||||
#define RDOC_ANDROID OPTION_OFF
|
||||
#define RDOC_LINUX OPTION_OFF
|
||||
#define RDOC_APPLE OPTION_OFF
|
||||
#define RDOC_POSIX OPTION_ON
|
||||
#define RDOC_GGP OPTION_ON
|
||||
|
||||
#else
|
||||
|
||||
|
||||
@@ -301,6 +301,8 @@ void RenderDoc::Initialise()
|
||||
"Android";
|
||||
#elif ENABLED(RDOC_APPLE)
|
||||
"macOS";
|
||||
#elif ENABLED(RDOC_GGP)
|
||||
"GGP";
|
||||
#else
|
||||
"Unknown";
|
||||
#endif
|
||||
|
||||
@@ -85,6 +85,8 @@ elseif(APPLE)
|
||||
list(APPEND sources vk_posix.cpp vk_apple.cpp vk_apple.mm)
|
||||
|
||||
add_definitions(-DVK_USE_PLATFORM_MACOS_MVK)
|
||||
elseif(ENABLE_GGP)
|
||||
# TODO
|
||||
elseif(UNIX)
|
||||
list(APPEND sources vk_posix.cpp vk_linux.cpp)
|
||||
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
RDCEraseEl(xlib); \
|
||||
RDCEraseEl(xcb);
|
||||
|
||||
#elif ENABLED(RDOC_APPLE)
|
||||
#elif ENABLED(RDOC_APPLE) || ENABLED(RDOC_GGP)
|
||||
|
||||
#define WINDOW_HANDLE_DECL void *wnd;
|
||||
#define WINDOW_HANDLE_INIT wnd = NULL;
|
||||
|
||||
@@ -18,6 +18,11 @@ elseif(ANDROID)
|
||||
|
||||
set_source_files_properties(renderdoccmd.cpp PROPERTIES COMPILE_FLAGS "-fexceptions -frtti")
|
||||
set_source_files_properties(renderdoccmd_android.cpp PROPERTIES COMPILE_FLAGS "-fexceptions")
|
||||
elseif(ENABLE_GGP)
|
||||
list(APPEND sources renderdoccmd_ggp.cpp)
|
||||
find_library(GGP_LIBRARY ggp)
|
||||
list(APPEND libraries PRIVATE ${GGP_LIBRARY})
|
||||
set(LINKER_FLAGS "-Wl,--no-as-needed")
|
||||
elseif(UNIX)
|
||||
list(APPEND sources renderdoccmd_linux.cpp)
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/******************************************************************************
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 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 "renderdoccmd.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user