diff options
author | Brian Paul <[email protected]> | 2016-02-23 13:25:43 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2016-02-24 08:31:31 -0700 |
commit | 1e41c2e1350a91b9de4359011328e4de0418b33b (patch) | |
tree | b08dfab1203849abeb1fdab3a7c742f0643d0f8e /src | |
parent | c8fdb42c9138a1b510b4cbf768832a09f6398f96 (diff) |
mesa: move declaration of buffer var in handle_first_current()
Declare the var in the scopes where it's used.
Reviewed-by: Rob Clark <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/context.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c index a6d89394b39..26eee28db4e 100644 --- a/src/mesa/main/context.c +++ b/src/mesa/main/context.c @@ -1600,8 +1600,6 @@ _mesa_check_init_viewport(struct gl_context *ctx, GLuint width, GLuint height) static void handle_first_current(struct gl_context *ctx) { - GLenum buffer; - if (ctx->Version == 0) { /* probably in the process of tearing down the context */ return; @@ -1616,6 +1614,8 @@ handle_first_current(struct gl_context *ctx) * For GLES it is always GL_BACK which has a magic interpretation */ if (!ctx->HasConfig && _mesa_is_desktop_gl(ctx)) { if (ctx->DrawBuffer != _mesa_get_incomplete_framebuffer()) { + GLenum buffer; + if (ctx->DrawBuffer->Visual.doubleBufferMode) buffer = GL_BACK; else @@ -1627,6 +1627,8 @@ handle_first_current(struct gl_context *ctx) if (ctx->ReadBuffer != _mesa_get_incomplete_framebuffer()) { gl_buffer_index bufferIndex; + GLenum buffer; + if (ctx->ReadBuffer->Visual.doubleBufferMode) { buffer = GL_BACK; bufferIndex = BUFFER_BACK_LEFT; |