[Fix] (MG_Impl/Texture): validate the bound texture before dereferencing it in TexSubImage2D, and stop recording an error when glDeleteTextures is handed unknown names

This commit is contained in:
2026-07-16 21:34:40 -04:00
parent 8026838563
commit f61675e9ce
3 changed files with 151 additions and 4 deletions
@@ -110,6 +110,9 @@ namespace MobileGL::MG_State::GLState {
BumpTextureBindGeneration();
m_textureObjects.erase(index);
}
// Release the name itself even when GenTextures only reserved it and no bind ever
// instantiated an object: GL 3.3 core 3.8.1 makes a deleted name unused again (so a
// later bind of it must fail), and the reservation has to return to the free list.
m_indexGenerator.Delete(index);
}
}