Fix PCH build failures (on linux) when USE_VMA allocator option enabled

This commit is contained in:
Stephen Saunders 2023-02-15 23:00:50 -05:00
parent 86a6e486d5
commit 8ac44895e1
4 changed files with 10 additions and 4 deletions

View file

@ -1603,6 +1603,9 @@ if(MSVC)
list(REMOVE_ITEM RBDOOM3_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/renderer/jobs/prelightshadowvolume/PreLightShadowVolume.cpp)
list(REMOVE_ITEM RBDOOM3_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/renderer/jobs/staticshadowvolume/StaticShadowVolume.cpp)
list(REMOVE_ITEM RBDOOM3_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/renderer/jobs/ShadowShared.cpp)
if(USE_VULKAN AND USE_VMA)
list(REMOVE_ITEM RBDOOM3_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sys/DeviceManager_VK.cpp)
endif()
#foreach( src_file ${RBDOOM3_PRECOMPILED_SOURCES} )
# message(STATUS "-include precompiled.h for ${src_file}")
@ -1754,6 +1757,9 @@ else()
list(REMOVE_ITEM RBDOOM3_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/renderer/jobs/prelightshadowvolume/PreLightShadowVolume.cpp)
list(REMOVE_ITEM RBDOOM3_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/renderer/jobs/staticshadowvolume/StaticShadowVolume.cpp)
list(REMOVE_ITEM RBDOOM3_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/renderer/jobs/ShadowShared.cpp)
if(USE_VULKAN AND USE_VMA)
list(REMOVE_ITEM RBDOOM3_PRECOMPILED_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sys/DeviceManager_VK.cpp)
endif()
foreach( src_file ${RBDOOM3_PRECOMPILED_SOURCES} )
#message(STATUS "-include precompiled.h for ${src_file}")

View file

@ -38,6 +38,7 @@ If you have questions concerning this license or the applicable additional terms
#include <nvrhi/nvrhi.h>
#if defined( USE_AMD_ALLOCATOR )
#include <nvrhi/vulkan.h>
#include "vk_mem_alloc.h"
#endif
#endif

View file

@ -288,10 +288,6 @@ typedef void ( *ImageGeneratorFunction )( idImage* image, nvrhi::ICommandList* c
#include "BinaryImage.h"
#if defined( USE_AMD_ALLOCATOR )
#include "vk_mem_alloc.h"
#endif
#define MAX_IMAGE_NAME 256
class idImage

View file

@ -20,8 +20,11 @@
* DEALINGS IN THE SOFTWARE.
*/
// SRS - Disable PCH for USE_AMD_ALLOCATOR option, otherwise get Vulkan header mismatch failures
#if !defined( USE_AMD_ALLOCATOR )
#include <precompiled.h>
#pragma hdrstop
#endif
#include <string>
#include <queue>