X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fmain%2Ffbobject.c;h=c4454550dbca3fcd3238cfd759db2a58050b2c1c;hb=6b68482e6869bdc03339ef5380d7273e14a61a56;hp=319d0f2ce9773379c0b907f2a34890a70d38a5dc;hpb=8df81bca1704aef2f5cdc4052ef313d8f84f5d06;p=mesa.git diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 319d0f2ce97..c4454550dbc 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -233,9 +233,13 @@ _mesa_set_texture_attachment(GLcontext *ctx, if (att->Texture == texObj) { /* re-attaching same texture */ ASSERT(att->Type == GL_TEXTURE); + if (ctx->Driver.FinishRenderTexture) + ctx->Driver.FinishRenderTexture(ctx, att); } else { /* new attachment */ + if (ctx->Driver.FinishRenderTexture && att->Texture) + ctx->Driver.FinishRenderTexture(ctx, att); _mesa_remove_attachment(ctx, att); att->Type = GL_TEXTURE; assert(!att->Texture);