GL: Remove lingering image binds
This updates image bind tracking to be the same as texture binds. Adding a new bind flag to avoid conflict when the texture is used in both slots. Fixes a gl error in glBindImageTextures about invalid image binds.
This commit is contained in:
@@ -563,14 +563,14 @@ void GLStateManager::image_bind(Texture *tex_, int unit)
|
||||
}
|
||||
images_[unit] = tex->tex_id_;
|
||||
formats_[unit] = to_gl_internal_format(tex->format_);
|
||||
tex->is_bound_ = true;
|
||||
tex->is_bound_image_ = true;
|
||||
dirty_image_binds_ |= 1ULL << unit;
|
||||
}
|
||||
|
||||
void GLStateManager::image_unbind(Texture *tex_)
|
||||
{
|
||||
GLTexture *tex = static_cast<GLTexture *>(tex_);
|
||||
if (!tex->is_bound_) {
|
||||
if (!tex->is_bound_image_) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -581,7 +581,7 @@ void GLStateManager::image_unbind(Texture *tex_)
|
||||
dirty_image_binds_ |= 1ULL << i;
|
||||
}
|
||||
}
|
||||
tex->is_bound_ = false;
|
||||
tex->is_bound_image_ = false;
|
||||
}
|
||||
|
||||
void GLStateManager::image_unbind_all()
|
||||
|
||||
Reference in New Issue
Block a user