mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 04:38:03 +02:00
move oldFb decl into tighter scopes
This commit is contained in:
parent
9fbb2e9e76
commit
a8ba888a35
1 changed files with 3 additions and 3 deletions
|
|
@ -938,7 +938,7 @@ check_end_texture_render(GLcontext *ctx, struct gl_framebuffer *fb)
|
|||
void GLAPIENTRY
|
||||
_mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
|
||||
{
|
||||
struct gl_framebuffer *newFb, *oldFb;
|
||||
struct gl_framebuffer *newFb;
|
||||
GLboolean bindReadBuf, bindDrawBuf;
|
||||
GET_CURRENT_CONTEXT(ctx);
|
||||
|
||||
|
|
@ -1020,7 +1020,7 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
|
|||
*/
|
||||
|
||||
if (bindReadBuf) {
|
||||
oldFb = ctx->ReadBuffer;
|
||||
struct gl_framebuffer *oldFb = ctx->ReadBuffer;
|
||||
if (oldFb && oldFb->Name != 0) {
|
||||
_mesa_dereference_framebuffer(&oldFb);
|
||||
}
|
||||
|
|
@ -1028,7 +1028,7 @@ _mesa_BindFramebufferEXT(GLenum target, GLuint framebuffer)
|
|||
}
|
||||
|
||||
if (bindDrawBuf) {
|
||||
oldFb = ctx->DrawBuffer;
|
||||
struct gl_framebuffer *oldFb = ctx->DrawBuffer;
|
||||
if (oldFb && oldFb->Name != 0) {
|
||||
/* check if old FB had any texture attachments */
|
||||
check_end_texture_render(ctx, oldFb);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue