aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta_generate_mipmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/common/meta_generate_mipmap.c')
-rw-r--r--src/mesa/drivers/common/meta_generate_mipmap.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mesa/drivers/common/meta_generate_mipmap.c b/src/mesa/drivers/common/meta_generate_mipmap.c
index a9da0a21ba3..bde170fcf6f 100644
--- a/src/mesa/drivers/common/meta_generate_mipmap.c
+++ b/src/mesa/drivers/common/meta_generate_mipmap.c
@@ -102,13 +102,13 @@ fallback_required(struct gl_context *ctx, GLenum target,
*/
if (!mipmap->FBO)
_mesa_GenFramebuffers(1, &mipmap->FBO);
- _mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, mipmap->FBO);
+ _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, mipmap->FBO);
- _mesa_meta_bind_fbo_image(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, baseImage, 0);
+ _mesa_meta_bind_fbo_image(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, baseImage, 0);
- status = _mesa_CheckFramebufferStatus(GL_FRAMEBUFFER_EXT);
+ status = _mesa_CheckFramebufferStatus(GL_DRAW_FRAMEBUFFER);
- _mesa_BindFramebuffer(GL_FRAMEBUFFER_EXT, fboSave);
+ _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, fboSave);
if (status != GL_FRAMEBUFFER_COMPLETE_EXT) {
_mesa_perf_debug(ctx, MESA_DEBUG_SEVERITY_HIGH,
@@ -131,6 +131,11 @@ _mesa_meta_glsl_generate_mipmap_cleanup(struct gen_mipmap_state *mipmap)
_mesa_DeleteSamplers(1, &mipmap->Sampler);
mipmap->Sampler = 0;
+ if (mipmap->FBO != 0) {
+ _mesa_DeleteFramebuffers(1, &mipmap->FBO);
+ mipmap->FBO = 0;
+ }
+
_mesa_meta_blit_shader_table_cleanup(&mipmap->shaders);
}