diff options
author | Brian Paul <[email protected]> | 2014-08-08 15:10:31 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-08-11 09:44:51 -0600 |
commit | 904ed3b3153a73b601085ed22d2ba3693812b1cf (patch) | |
tree | 742615899599e4df0f387fca04ab3f5cab71e5f0 /src/mesa/main | |
parent | 39b40ad144f5f587e505b45048e33a03641ba857 (diff) |
mesa: simplify _mesa_update_draw_buffers()
There's no need to copy the array of DrawBuffer enums to a temp array.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/buffers.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 6b4fac9f58d..140cf6e82eb 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -567,16 +567,11 @@ _mesa_drawbuffers(struct gl_context *ctx, GLuint n, const GLenum *buffers, void _mesa_update_draw_buffers(struct gl_context *ctx) { - GLenum buffers[MAX_DRAW_BUFFERS]; - GLuint i; - /* should be a window system FBO */ assert(_mesa_is_winsys_fbo(ctx->DrawBuffer)); - for (i = 0; i < ctx->Const.MaxDrawBuffers; i++) - buffers[i] = ctx->Color.DrawBuffer[i]; - - _mesa_drawbuffers(ctx, ctx->Const.MaxDrawBuffers, buffers, NULL); + _mesa_drawbuffers(ctx, ctx->Const.MaxDrawBuffers, + ctx->Color.DrawBuffer, NULL); } |