mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 10:18:05 +02:00
mesa: move declaration of buffer var in handle_first_current()
Declare the var in the scopes where it's used. Reviewed-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
c8fdb42c91
commit
1e41c2e135
1 changed files with 4 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue