glgsg: Mark SSBO unbound from all binding points upon deletion

Fixes a consistency issue where the buffer might not be rebound properly
This commit is contained in:
rdb 2025-12-22 22:20:57 +01:00
parent 14b8cd74c2
commit 86d0376054
1 changed files with 12 additions and 0 deletions

View File

@ -7692,6 +7692,12 @@ release_shader_buffer(BufferContext *bc) {
_current_sbuffer_index = 0;
}
for (GLuint &index : _current_sbuffer_base) {
if (index == gbc->_index) {
index = 0;
}
}
_glDeleteBuffers(1, &gbc->_index);
report_my_gl_errors();
@ -7731,6 +7737,12 @@ release_shader_buffers(const pvector<BufferContext *> &contexts) {
_current_sbuffer_index = 0;
}
for (GLuint &index : _current_sbuffer_base) {
if (index == gbc->_index) {
index = 0;
}
}
if (debug) {
GLCAT.debug()
<< "deleting shader buffer " << gbc->_index << "\n";