mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-16 03:38:30 +12:00
fix: CI when metal is disabled
This commit is contained in:
parent
e7ac19979d
commit
7eb8508db4
11 changed files with 50 additions and 15 deletions
|
@ -11,7 +11,7 @@
|
|||
#include "HW/Latte/Renderer/Renderer.h"
|
||||
#include "util/containers/LookupTableL3.h"
|
||||
#include "util/helpers/fspinlock.h"
|
||||
#if BOOST_OS_MACOS
|
||||
#if ENABLE_METAL
|
||||
#include "Cafe/HW/Latte/Renderer/Metal/LatteToMtl.h"
|
||||
#endif
|
||||
#include <openssl/sha.h> /* SHA1_DIGEST_LENGTH */
|
||||
|
@ -166,6 +166,7 @@ void LatteFetchShader::CalculateFetchShaderVkHash()
|
|||
|
||||
void LatteFetchShader::CheckIfVerticesNeedManualFetchMtl(uint32* contextRegister)
|
||||
{
|
||||
#if ENABLE_METAL
|
||||
for (sint32 g = 0; g < bufferGroups.size(); g++)
|
||||
{
|
||||
LatteParsedFetchShaderBufferGroup_t& group = bufferGroups[g];
|
||||
|
@ -183,6 +184,7 @@ void LatteFetchShader::CheckIfVerticesNeedManualFetchMtl(uint32* contextRegister
|
|||
mtlFetchVertexManually = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
void _fetchShaderDecompiler_parseInstruction_VTX_SEMANTIC(LatteFetchShader* parsedFetchShader, uint32* contextRegister, const LatteClauseInstruction_VTX* instr)
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
#include "config/ActiveSettings.h"
|
||||
#include "Cafe/GameProfile/GameProfile.h"
|
||||
#include "util/containers/flat_hash_map.hpp"
|
||||
#if BOOST_OS_MACOS
|
||||
#if ENABLE_METAL
|
||||
#include "Cafe/HW/Latte/Renderer/Metal/LatteToMtl.h"
|
||||
#endif
|
||||
#include <cinttypes>
|
||||
|
@ -591,7 +591,7 @@ void LatteSHRC_UpdatePSBaseHash(uint8* pixelShaderPtr, uint32 pixelShaderSize, b
|
|||
// get vertex shader
|
||||
uint64 psHash = psHash1 + psHash2 + _activePSImportTable.key + (usesGeometryShader ? hashCacheGS.prevHash1 : 0ULL);
|
||||
|
||||
#if BOOST_OS_MACOS
|
||||
#if ENABLE_METAL
|
||||
if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
{
|
||||
for (uint8 i = 0; i < LATTE_NUM_COLOR_TARGET; i++)
|
||||
|
|
|
@ -11,8 +11,10 @@
|
|||
#include "Cafe/HW/Latte/Renderer/Renderer.h"
|
||||
#include "Cafe/HW/Latte/Renderer/OpenGL/RendererShaderGL.h"
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/RendererShaderVk.h"
|
||||
#if ENABLE_METAL
|
||||
#include "Cafe/HW/Latte/Renderer/Metal/RendererShaderMtl.h"
|
||||
#include "Cafe/HW/Latte/Renderer/Metal/MetalPipelineCache.h"
|
||||
#endif
|
||||
#include "Cafe/HW/Latte/Renderer/Vulkan/VulkanPipelineStableCache.h"
|
||||
|
||||
#include <imgui.h>
|
||||
|
@ -163,8 +165,10 @@ void LatteShaderCache_finish()
|
|||
RendererShaderVk::ShaderCacheLoading_end();
|
||||
else if (g_renderer->GetType() == RendererAPI::OpenGL)
|
||||
RendererShaderGL::ShaderCacheLoading_end();
|
||||
#if ENABLE_METAL
|
||||
else if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
RendererShaderMtl::ShaderCacheLoading_end();
|
||||
#endif
|
||||
}
|
||||
|
||||
uint32 LatteShaderCache_getShaderCacheExtraVersion(uint64 titleId)
|
||||
|
@ -247,8 +251,11 @@ void LatteShaderCache_Load()
|
|||
RendererShaderVk::ShaderCacheLoading_begin(cacheTitleId);
|
||||
else if (g_renderer->GetType() == RendererAPI::OpenGL)
|
||||
RendererShaderGL::ShaderCacheLoading_begin(cacheTitleId);
|
||||
#if ENABLE_METAL
|
||||
else if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
RendererShaderMtl::ShaderCacheLoading_begin(cacheTitleId);
|
||||
#endif
|
||||
|
||||
// get cache file name
|
||||
const auto pathGeneric = ActiveSettings::GetCachePath("shaderCache/transferable/{:016x}_shaders.bin", cacheTitleId);
|
||||
const auto pathGenericPre1_25_0 = ActiveSettings::GetCachePath("shaderCache/transferable/{:016x}.bin", cacheTitleId); // before 1.25.0
|
||||
|
@ -508,14 +515,18 @@ void LatteShaderCache_LoadPipelineCache(uint64 cacheTitleId)
|
|||
{
|
||||
if (g_renderer->GetType() == RendererAPI::Vulkan)
|
||||
g_shaderCacheLoaderState.pipelineFileCount = VulkanPipelineStableCache::GetInstance().BeginLoading(cacheTitleId);
|
||||
#if ENABLE_METAL
|
||||
else if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
g_shaderCacheLoaderState.pipelineFileCount = MetalPipelineCache::GetInstance().BeginLoading(cacheTitleId);
|
||||
#endif
|
||||
g_shaderCacheLoaderState.loadedPipelines = 0;
|
||||
LatteShaderCache_ShowProgress(LatteShaderCache_updatePipelineLoadingProgress, true);
|
||||
if (g_renderer->GetType() == RendererAPI::Vulkan)
|
||||
VulkanPipelineStableCache::GetInstance().EndLoading();
|
||||
#if ENABLE_METAL
|
||||
else if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
MetalPipelineCache::GetInstance().EndLoading();
|
||||
#endif
|
||||
if(Latte_GetStopSignal())
|
||||
LatteThread_Exit();
|
||||
}
|
||||
|
@ -525,8 +536,10 @@ bool LatteShaderCache_updatePipelineLoadingProgress()
|
|||
uint32 pipelinesMissingShaders = 0;
|
||||
if (g_renderer->GetType() == RendererAPI::Vulkan)
|
||||
return VulkanPipelineStableCache::GetInstance().UpdateLoading(g_shaderCacheLoaderState.loadedPipelines, pipelinesMissingShaders);
|
||||
#if ENABLE_METAL
|
||||
else if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
return MetalPipelineCache::GetInstance().UpdateLoading(g_shaderCacheLoaderState.loadedPipelines, pipelinesMissingShaders);
|
||||
#endif
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -790,14 +803,18 @@ void LatteShaderCache_Close()
|
|||
RendererShaderVk::ShaderCacheLoading_Close();
|
||||
else if (g_renderer->GetType() == RendererAPI::OpenGL)
|
||||
RendererShaderGL::ShaderCacheLoading_Close();
|
||||
#if ENABLE_METAL
|
||||
else if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
RendererShaderMtl::ShaderCacheLoading_Close();
|
||||
#endif
|
||||
|
||||
// if Vulkan or Metal then also close pipeline cache
|
||||
if (g_renderer->GetType() == RendererAPI::Vulkan)
|
||||
VulkanPipelineStableCache::GetInstance().Close();
|
||||
#if ENABLE_METAL
|
||||
else if (g_renderer->GetType() == RendererAPI::Metal)
|
||||
MetalPipelineCache::GetInstance().Close();
|
||||
#endif
|
||||
}
|
||||
|
||||
#include <wx/msgdlg.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue