mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-04-08 17:31:29 -06:00
ShaderCache: theoretical loading speedup by first checking to see if a shader later in the queue is already compiled
This commit is contained in:
parent
55d2ac0e43
commit
a96435a5dd
@ -102,6 +102,18 @@ void LatteShaderCache_removeFromCompileQueue(sint32 index)
|
||||
*/
|
||||
void LatteShaderCache_updateCompileQueue(sint32 maxRemainingEntries)
|
||||
{
|
||||
// remove any shaders that are already done
|
||||
for (size_t i = 0; i < shaderCompileQueue.count; i++)
|
||||
{
|
||||
auto shaderEntry = shaderCompileQueue.entry[i].shader;
|
||||
if (!shaderEntry)
|
||||
continue;
|
||||
if (shaderEntry->shader->IsCompiled())
|
||||
{
|
||||
LatteShader_prepareSeparableUniforms(shaderEntry);
|
||||
LatteShaderCache_removeFromCompileQueue(i);
|
||||
}
|
||||
}
|
||||
while (true)
|
||||
{
|
||||
if (shaderCompileQueue.count <= maxRemainingEntries)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user