mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-12-01 21:44:17 +01:00
save pipeline even if compilation failed
This commit is contained in:
parent
b140984264
commit
c5bef60dbb
@ -416,7 +416,7 @@ void MetalPipelineCache::LoadPipelineFromCache(std::span<uint8> fileData)
|
|||||||
vertexShader = LatteSHRC_FindVertexShader(cachedPipeline->vsHash.baseHash, cachedPipeline->vsHash.auxHash);
|
vertexShader = LatteSHRC_FindVertexShader(cachedPipeline->vsHash.baseHash, cachedPipeline->vsHash.auxHash);
|
||||||
if (!vertexShader)
|
if (!vertexShader)
|
||||||
{
|
{
|
||||||
cemuLog_logDebug(LogType::Force, "Vertex shader not found in cache");
|
cemuLog_log(LogType::Force, "Vertex shader not found in cache");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -426,7 +426,7 @@ void MetalPipelineCache::LoadPipelineFromCache(std::span<uint8> fileData)
|
|||||||
geometryShader = LatteSHRC_FindGeometryShader(cachedPipeline->gsHash.baseHash, cachedPipeline->gsHash.auxHash);
|
geometryShader = LatteSHRC_FindGeometryShader(cachedPipeline->gsHash.baseHash, cachedPipeline->gsHash.auxHash);
|
||||||
if (!geometryShader)
|
if (!geometryShader)
|
||||||
{
|
{
|
||||||
cemuLog_logDebug(LogType::Force, "Geometry shader not found in cache");
|
cemuLog_log(LogType::Force, "Geometry shader not found in cache");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -436,7 +436,7 @@ void MetalPipelineCache::LoadPipelineFromCache(std::span<uint8> fileData)
|
|||||||
pixelShader = LatteSHRC_FindPixelShader(cachedPipeline->psHash.baseHash, cachedPipeline->psHash.auxHash);
|
pixelShader = LatteSHRC_FindPixelShader(cachedPipeline->psHash.baseHash, cachedPipeline->psHash.auxHash);
|
||||||
if (!pixelShader)
|
if (!pixelShader)
|
||||||
{
|
{
|
||||||
cemuLog_logDebug(LogType::Force, "Pixel shader not found in cache");
|
cemuLog_log(LogType::Force, "Pixel shader not found in cache");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -459,14 +459,11 @@ void MetalPipelineCache::LoadPipelineFromCache(std::span<uint8> fileData)
|
|||||||
// destroy pp early
|
// destroy pp early
|
||||||
}
|
}
|
||||||
|
|
||||||
// on success, cache the pipeline
|
// Cache the pipeline
|
||||||
if (pipelineObject->m_pipeline)
|
uint64 pipelineStateHash = CalculatePipelineHash(vertexShader->compatibleFetchShader, vertexShader, geometryShader, pixelShader, cachedPipeline->lastUsedAttachmentsInfo, attachmentsInfo, *lcr);
|
||||||
{
|
m_pipelineCacheLock.lock();
|
||||||
uint64 pipelineStateHash = CalculatePipelineHash(vertexShader->compatibleFetchShader, vertexShader, geometryShader, pixelShader, cachedPipeline->lastUsedAttachmentsInfo, attachmentsInfo, *lcr);
|
m_pipelineCache[pipelineStateHash] = pipelineObject;
|
||||||
m_pipelineCacheLock.lock();
|
m_pipelineCacheLock.unlock();
|
||||||
m_pipelineCache[pipelineStateHash] = pipelineObject;
|
|
||||||
m_pipelineCacheLock.unlock();
|
|
||||||
}
|
|
||||||
|
|
||||||
// clean up
|
// clean up
|
||||||
s_spinlockSharedInternal.lock();
|
s_spinlockSharedInternal.lock();
|
||||||
|
Loading…
Reference in New Issue
Block a user