mirror of
https://github.com/cemu-project/Cemu.git
synced 2026-01-30 11:13:31 +00: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
f5bcba3c9f
commit
4cda08866e
@ -106,6 +106,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