mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-13 22:58:30 +09:00
[Fix] (DirectGLES): route default-framebuffer binds through the FBO-binding shadow - the raw glBindFramebuffer(0) in BindCurrentFBO/SyncAndBindFramebufferObject left the shadow claiming the previous user FBO, false-skipping its next re-bind and letting scoped guards restore a stale binding (caught by adversarial review); also scrub buffer-binding shadows when VAO client-attribute staging buffers are deleted, include cube-map arrays in the pack-image-params gate, and make the delete-recording test hook assertion-unwind safe
This commit is contained in:
@@ -863,6 +863,16 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
g_boundPixelUnpackBufferKnown = false;
|
||||
}
|
||||
|
||||
void NoteBufferIdDeleted(Uint id) {
|
||||
if (id == 0) {
|
||||
return;
|
||||
}
|
||||
if (g_boundArrayBufferKnown && g_boundArrayBufferId == id) {
|
||||
InvalidateArrayBufferBindingCache();
|
||||
}
|
||||
ScrubBufferBindingShadowsForId(id);
|
||||
}
|
||||
|
||||
namespace {
|
||||
// Shadow of the GL indexed buffer bindings so redundant glBindBufferBase/Range
|
||||
// (same index + id + range) are skipped. isBase distinguishes a whole-buffer
|
||||
@@ -1202,6 +1212,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
|
||||
}
|
||||
for (auto& bufferId : m_clientAttributeBufferIds) {
|
||||
if (bufferId != 0) {
|
||||
BufferImpl::NoteBufferIdDeleted(bufferId);
|
||||
g_GLESFuncs.glDeleteBuffers(1, &bufferId);
|
||||
bufferId = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user