metal: initial (bad/slow) setShader tracking

This commit is contained in:
Alex Szpakowski
2021-03-29 18:28:06 -03:00
parent 3a1c85c13e
commit aad0810e11
5 changed files with 45 additions and 3 deletions
+3 -1
View File
@@ -441,7 +441,9 @@ void Shader::attach()
{
if (current != this)
{
Graphics::flushBatchedDrawsGlobal();
Graphics *gfx = Module::getInstance<Graphics>(Module::M_GRAPHICS);
gfx->flushBatchedDrawsGlobal();
gfx->attachShader(this);
current = this;
}
}