diff options
author | Timothy Arceri <[email protected]> | 2018-04-14 13:42:31 +1000 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2018-04-17 14:17:48 +1000 |
commit | d3cafc18fced872ce60060e792f6faf2b97cc3a9 (patch) | |
tree | bf6b30b84fdaeab6feb8246505bd684f759717d7 /src/mesa/main/buffers.c | |
parent | 268d8f244b3450461de5448f3f9a2ed2aa05e223 (diff) |
mesa: merge the driver functions DrawBuffers and DrawBuffer
The extra params we unused by the drivers that used DrawBuffers.
Tested-by: Dieter Nützel <[email protected]>
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r-- | src/mesa/main/buffers.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 5492227de08..7bb5725d085 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -304,9 +304,7 @@ draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb, /* Call device driver function only if fb is the bound draw buffer */ if (fb == ctx->DrawBuffer) { - if (ctx->Driver.DrawBuffers) - ctx->Driver.DrawBuffers(ctx, 1, &buffer); - else if (ctx->Driver.DrawBuffer) + if (ctx->Driver.DrawBuffer) ctx->Driver.DrawBuffer(ctx, buffer); } } @@ -587,9 +585,7 @@ draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLsizei n, * may not be valid. */ if (fb == ctx->DrawBuffer) { - if (ctx->Driver.DrawBuffers) - ctx->Driver.DrawBuffers(ctx, n, buffers); - else if (ctx->Driver.DrawBuffer) + if (ctx->Driver.DrawBuffer) ctx->Driver.DrawBuffer(ctx, n > 0 ? buffers[0] : GL_NONE); } } |