diff --git a/renderdoc/CMakeLists.txt b/renderdoc/CMakeLists.txt index f87d3a3aba..ebb1d5494a 100644 --- a/renderdoc/CMakeLists.txt +++ b/renderdoc/CMakeLists.txt @@ -585,7 +585,7 @@ if(ENABLE_GL OR ENABLE_GLES) endif() # pull in the NVIDIA folder -if(NOT ANDROID AND NOT APPLE AND (ENABLE_GL OR ENABLE_GLES OR ENABLE_VULKAN)) +if(ENABLE_GL OR ENABLE_GLES OR ENABLE_VULKAN) add_subdirectory(driver/ihv/nv) list(APPEND renderdoc_objects $) endif() diff --git a/renderdoc/driver/ihv/nv/CMakeLists.txt b/renderdoc/driver/ihv/nv/CMakeLists.txt index 08ce21c37d..13a026b0ae 100644 --- a/renderdoc/driver/ihv/nv/CMakeLists.txt +++ b/renderdoc/driver/ihv/nv/CMakeLists.txt @@ -1,17 +1,22 @@ set(sources - nv_counter_enumerator.cpp - nv_counter_enumerator.h - nv_gl_counters.h - nv_vk_counters.h nv_aftermath.h nv_aftermath.cpp) -if(ENABLE_GL OR ENABLE_GLES) - set(sources_gl nv_gl_counters.cpp) -endif() +# only include counters on normal windows/linux platforms, others just get aftermath stubs +if(NOT ANDROID AND NOT ENABLE_APPLE) + list(APPEND sources + nv_counter_enumerator.cpp + nv_counter_enumerator.h + nv_gl_counters.h + nv_vk_counters.h) + + if(ENABLE_GL OR ENABLE_GLES) + set(sources_gl nv_gl_counters.cpp) + endif() -if(ENABLE_VULKAN) - set(sources_vulkan nv_vk_counters.cpp) + if(ENABLE_VULKAN) + set(sources_vulkan nv_vk_counters.cpp) + endif() endif() set(include_dirs diff --git a/renderdoc/driver/ihv/nv/nv_aftermath.cpp b/renderdoc/driver/ihv/nv/nv_aftermath.cpp index ddaeef83bd..918564687c 100644 --- a/renderdoc/driver/ihv/nv/nv_aftermath.cpp +++ b/renderdoc/driver/ihv/nv/nv_aftermath.cpp @@ -41,7 +41,7 @@ RDOC_CONFIG(bool, Replay_Debug_EnableNVRTValidation, false, #include "driver/ihv/nv/official/aftermath/GFSDK_Aftermath_GpuCrashDumpDecoding.h" // assume this macro is only available if we got the real headers -#if defined(GFSDK_AFTERMATH_CALL) +#if defined(GFSDK_AFTERMATH_CALL) && ENABLED(RDOC_WIN32) #include "official/nvapi/nvapi.h"