mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-06 06:51:18 +12:00
Merge pull request #13 from SamoZ256/test
only set concurrent compilation if Metal 3 is available
This commit is contained in:
commit
f71046333d
3 changed files with 8 additions and 4 deletions
|
@ -2,7 +2,6 @@
|
||||||
#include "Cemu/Logging/CemuLogging.h"
|
#include "Cemu/Logging/CemuLogging.h"
|
||||||
#include "HW/Latte/Core/LatteTextureLoader.h"
|
#include "HW/Latte/Core/LatteTextureLoader.h"
|
||||||
#include "HW/Latte/Renderer/Metal/MetalCommon.h"
|
#include "HW/Latte/Renderer/Metal/MetalCommon.h"
|
||||||
#include "Metal/MTLPixelFormat.hpp"
|
|
||||||
|
|
||||||
std::map<Latte::E_GX2SURFFMT, MetalPixelFormatInfo> MTL_COLOR_FORMAT_TABLE = {
|
std::map<Latte::E_GX2SURFFMT, MetalPixelFormatInfo> MTL_COLOR_FORMAT_TABLE = {
|
||||||
{Latte::E_GX2SURFFMT::INVALID_FORMAT, {MTL::PixelFormatInvalid, MetalDataType::NONE, 0}},
|
{Latte::E_GX2SURFFMT::INVALID_FORMAT, {MTL::PixelFormatInvalid, MetalDataType::NONE, 0}},
|
||||||
|
|
|
@ -6,7 +6,6 @@
|
||||||
#include "Cafe/HW/Latte/Renderer/Metal/MetalPerformanceMonitor.h"
|
#include "Cafe/HW/Latte/Renderer/Metal/MetalPerformanceMonitor.h"
|
||||||
#include "Cafe/HW/Latte/Renderer/Metal/MetalOutputShaderCache.h"
|
#include "Cafe/HW/Latte/Renderer/Metal/MetalOutputShaderCache.h"
|
||||||
#include "Cafe/HW/Latte/Renderer/Metal/MetalAttachmentsInfo.h"
|
#include "Cafe/HW/Latte/Renderer/Metal/MetalAttachmentsInfo.h"
|
||||||
#include <cstdint>
|
|
||||||
|
|
||||||
struct MetalBufferAllocation
|
struct MetalBufferAllocation
|
||||||
{
|
{
|
||||||
|
@ -277,6 +276,12 @@ public:
|
||||||
// Helpers
|
// Helpers
|
||||||
MetalPerformanceMonitor& GetPerformanceMonitor() { return m_performanceMonitor; }
|
MetalPerformanceMonitor& GetPerformanceMonitor() { return m_performanceMonitor; }
|
||||||
|
|
||||||
|
void SetShouldMaximizeConcurrentCompilation(bool shouldMaximizeConcurrentCompilation)
|
||||||
|
{
|
||||||
|
if (m_supportsMetal3)
|
||||||
|
m_device->setShouldMaximizeConcurrentCompilation(shouldMaximizeConcurrentCompilation);
|
||||||
|
}
|
||||||
|
|
||||||
bool IsCommandBufferActive() const
|
bool IsCommandBufferActive() const
|
||||||
{
|
{
|
||||||
return (m_currentCommandBuffer.m_commandBuffer && !m_currentCommandBuffer.m_commited);
|
return (m_currentCommandBuffer.m_commandBuffer && !m_currentCommandBuffer.m_commited);
|
||||||
|
|
|
@ -89,12 +89,12 @@ private:
|
||||||
void RendererShaderMtl::ShaderCacheLoading_begin(uint64 cacheTitleId)
|
void RendererShaderMtl::ShaderCacheLoading_begin(uint64 cacheTitleId)
|
||||||
{
|
{
|
||||||
// Maximize shader compilation speed
|
// Maximize shader compilation speed
|
||||||
static_cast<MetalRenderer*>(g_renderer.get())->GetDevice()->setShouldMaximizeConcurrentCompilation(true);
|
static_cast<MetalRenderer*>(g_renderer.get())->SetShouldMaximizeConcurrentCompilation(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RendererShaderMtl::ShaderCacheLoading_end()
|
void RendererShaderMtl::ShaderCacheLoading_end()
|
||||||
{
|
{
|
||||||
static_cast<MetalRenderer*>(g_renderer.get())->GetDevice()->setShouldMaximizeConcurrentCompilation(false);
|
static_cast<MetalRenderer*>(g_renderer.get())->SetShouldMaximizeConcurrentCompilation(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RendererShaderMtl::ShaderCacheLoading_Close()
|
void RendererShaderMtl::ShaderCacheLoading_Close()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue