mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
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 <ian.d.romanick@intel.com> Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
39b40ad144
commit
904ed3b315
1 changed files with 2 additions and 7 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue