mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-01 14:58:14 +00:00
Buildfix
This commit is contained in:
1 parent
8b4e93021e
commit
d3ab52b4b3
6 files changed
+27
-4
No files matched your search
@@ -179,6 +179,7 @@ add_library(Common STATIC
|
|||||||
GPU/Vulkan/VulkanDebug.h
|
GPU/Vulkan/VulkanDebug.h
|
||||||
GPU/Vulkan/VulkanContext.cpp
|
GPU/Vulkan/VulkanContext.cpp
|
||||||
GPU/Vulkan/VulkanContext.h
|
GPU/Vulkan/VulkanContext.h
|
||||||
|
GPU/Vulkan/FixedSPIRVCache.h
|
||||||
GPU/Vulkan/VulkanDescSet.cpp
|
GPU/Vulkan/VulkanDescSet.cpp
|
||||||
GPU/Vulkan/VulkanDescSet.h
|
GPU/Vulkan/VulkanDescSet.h
|
||||||
GPU/Vulkan/VulkanFramebuffer.cpp
|
GPU/Vulkan/VulkanFramebuffer.cpp
|
||||||
|
|||||||
@@ -451,6 +451,7 @@
|
|||||||
<ClInclude Include="GPU\Vulkan\VulkanAlloc.h" />
|
<ClInclude Include="GPU\Vulkan\VulkanAlloc.h" />
|
||||||
<ClInclude Include="GPU\Vulkan\VulkanBarrier.h" />
|
<ClInclude Include="GPU\Vulkan\VulkanBarrier.h" />
|
||||||
<ClInclude Include="GPU\Vulkan\VulkanContext.h" />
|
<ClInclude Include="GPU\Vulkan\VulkanContext.h" />
|
||||||
|
<ClInclude Include="GPU\Vulkan\FixedSPIRVCache.h" />
|
||||||
<ClInclude Include="GPU\Vulkan\VulkanDebug.h" />
|
<ClInclude Include="GPU\Vulkan\VulkanDebug.h" />
|
||||||
<ClInclude Include="GPU\Vulkan\VulkanDescSet.h" />
|
<ClInclude Include="GPU\Vulkan\VulkanDescSet.h" />
|
||||||
<ClInclude Include="GPU\Vulkan\VulkanFramebuffer.h" />
|
<ClInclude Include="GPU\Vulkan\VulkanFramebuffer.h" />
|
||||||
|
|||||||
@@ -305,6 +305,9 @@
|
|||||||
<ClInclude Include="GPU\Vulkan\VulkanContext.h">
|
<ClInclude Include="GPU\Vulkan\VulkanContext.h">
|
||||||
<Filter>GPU\Vulkan</Filter>
|
<Filter>GPU\Vulkan</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="GPU\Vulkan\FixedSPIRVCache.h">
|
||||||
|
<Filter>GPU\Vulkan</Filter>
|
||||||
|
</ClInclude>
|
||||||
<ClInclude Include="GPU\Vulkan\VulkanDebug.h">
|
<ClInclude Include="GPU\Vulkan\VulkanDebug.h">
|
||||||
<Filter>GPU\Vulkan</Filter>
|
<Filter>GPU\Vulkan</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "Common/File/Path.h"
|
||||||
|
|
||||||
|
// The SPIR-V cache of thin3d's and other fixed shaders (g_spirvCache in VulkanContext.h), for code
|
||||||
|
// that shouldn't include the Vulkan headers: on Linux they pull in X11, whose macros (None and
|
||||||
|
// friends) break unrelated headers.
|
||||||
|
void SetFixedSPIRVCachePath(const Path &path, int maxEntries);
|
||||||
|
void SaveFixedSPIRVCache();
|
||||||
@@ -12,6 +12,7 @@
|
|||||||
#include "Common/GPU/MiscTypes.h"
|
#include "Common/GPU/MiscTypes.h"
|
||||||
#include "Common/GPU/Vulkan/VulkanContext.h"
|
#include "Common/GPU/Vulkan/VulkanContext.h"
|
||||||
#include "Common/GPU/Vulkan/VulkanDebug.h"
|
#include "Common/GPU/Vulkan/VulkanDebug.h"
|
||||||
|
#include "Common/GPU/Vulkan/FixedSPIRVCache.h"
|
||||||
#include "Common/StringUtils.h"
|
#include "Common/StringUtils.h"
|
||||||
#include "Common/File/FileUtil.h"
|
#include "Common/File/FileUtil.h"
|
||||||
#include "ext/xxhash.h"
|
#include "ext/xxhash.h"
|
||||||
@@ -1800,6 +1801,14 @@ struct SPIRVCacheEntryHeader {
|
|||||||
|
|
||||||
SPIRVCache g_spirvCache;
|
SPIRVCache g_spirvCache;
|
||||||
|
|
||||||
|
void SetFixedSPIRVCachePath(const Path &path, int maxEntries) {
|
||||||
|
g_spirvCache.SetPath(path, maxEntries);
|
||||||
|
}
|
||||||
|
|
||||||
|
void SaveFixedSPIRVCache() {
|
||||||
|
g_spirvCache.SaveIfDirty();
|
||||||
|
}
|
||||||
|
|
||||||
SPIRVCache::Key SPIRVCache::MakeKey(VkShaderStageFlagBits stage, GLSLVariant variant, const char *source) {
|
SPIRVCache::Key SPIRVCache::MakeKey(VkShaderStageFlagBits stage, GLSLVariant variant, const char *source) {
|
||||||
const size_t length = strlen(source);
|
const size_t length = strlen(source);
|
||||||
const uint32_t seed = (SPIRV_CACHE_VERSION << 16) | ((uint32_t)stage << 4) | (uint32_t)variant;
|
const uint32_t seed = (SPIRV_CACHE_VERSION << 16) | ((uint32_t)stage << 4) | (uint32_t)variant;
|
||||||
|
|||||||
+4
-4
@@ -62,7 +62,7 @@
|
|||||||
#include "Common/Render/Text/draw_text.h"
|
#include "Common/Render/Text/draw_text.h"
|
||||||
#include "Common/GPU/OpenGL/GLFeatures.h"
|
#include "Common/GPU/OpenGL/GLFeatures.h"
|
||||||
#include "Common/GPU/thin3d.h"
|
#include "Common/GPU/thin3d.h"
|
||||||
#include "Common/GPU/Vulkan/VulkanContext.h"
|
#include "Common/GPU/Vulkan/FixedSPIRVCache.h"
|
||||||
#include "Common/UI/UI.h"
|
#include "Common/UI/UI.h"
|
||||||
#include "Common/UI/Screen.h"
|
#include "Common/UI/Screen.h"
|
||||||
#include "Common/UI/ScreenManager.h"
|
#include "Common/UI/ScreenManager.h"
|
||||||
@@ -805,7 +805,7 @@ void NativeInit(int argc, const char *argv[], const CommandLineOptions &cmdLineO
|
|||||||
File::CreateFullPath(GetSysDirectory(DIRECTORY_APP_CACHE));
|
File::CreateFullPath(GetSysDirectory(DIRECTORY_APP_CACHE));
|
||||||
// About twice what a session compiles (menu and a game: 10, a few more with post-processing
|
// About twice what a session compiles (menu and a game: 10, a few more with post-processing
|
||||||
// or texture upscaling), so it's flushed once outdated entries have piled up.
|
// or texture upscaling), so it's flushed once outdated entries have piled up.
|
||||||
g_spirvCache.SetPath(GetSysDirectory(DIRECTORY_APP_CACHE) / "vulkan_spirv.cache", 32);
|
SetFixedSPIRVCachePath(GetSysDirectory(DIRECTORY_APP_CACHE) / "vulkan_spirv.cache", 32);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -979,7 +979,7 @@ bool NativeInitGraphics(GraphicsContext *graphicsContext) {
|
|||||||
|
|
||||||
#if !PPSSPP_PLATFORM(UWP)
|
#if !PPSSPP_PLATFORM(UWP)
|
||||||
// Now, rather than only at shutdown: on mobile the app can be killed without one.
|
// Now, rather than only at shutdown: on mobile the app can be killed without one.
|
||||||
g_spirvCache.SaveIfDirty();
|
SaveFixedSPIRVCache();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
INFO_LOG(Log::System, "NativeInitGraphics completed");
|
INFO_LOG(Log::System, "NativeInitGraphics completed");
|
||||||
@@ -1043,7 +1043,7 @@ void NativeShutdownGraphics(GraphicsContext *graphicsContext) {
|
|||||||
INFO_LOG(Log::System, "NativeShutdownGraphics begin");
|
INFO_LOG(Log::System, "NativeShutdownGraphics begin");
|
||||||
|
|
||||||
#if !PPSSPP_PLATFORM(UWP)
|
#if !PPSSPP_PLATFORM(UWP)
|
||||||
g_spirvCache.SaveIfDirty();
|
SaveFixedSPIRVCache();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
graphicsContext->NotifyEmuThreadExit();
|
graphicsContext->NotifyEmuThreadExit();
|
||||||
|
|||||||
Reference in new issue
Block a user