mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-12-22 13:37:06 +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
55d2ac0e43
commit
a96435a5dd
1 changed files with 12 additions and 0 deletions
|
|
@ -102,6 +102,18 @@ void LatteShaderCache_removeFromCompileQueue(sint32 index)
|
||||||
*/
|
*/
|
||||||
void LatteShaderCache_updateCompileQueue(sint32 maxRemainingEntries)
|
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)
|
while (true)
|
||||||
{
|
{
|
||||||
if (shaderCompileQueue.count <= maxRemainingEntries)
|
if (shaderCompileQueue.count <= maxRemainingEntries)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue