summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/buffers.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2018-04-24 14:19:48 +1000
committerTimothy Arceri <[email protected]>2018-04-25 09:08:26 +1000
commit6ca09f3a608c10f6d2a9f80d2497ac1628188ac9 (patch)
tree598e55a1671070088eb099cb893b9db5a498248a /src/mesa/main/buffers.c
parent2554b8cb006d5466736333ab7b75aa34501278bb (diff)
st/mesa: add new driver function DrawBufferAllocate
Unlike some of the classic drivers the st was only using DrawBuffer() to allocated some buffers on-demand. Creating a separate function will allow us to call it from update_framebuffer() in the following patch without regressing some of the older classic drivers. Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r--src/mesa/main/buffers.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c
index 7bb5725d085..ba970d87dad 100644
--- a/src/mesa/main/buffers.c
+++ b/src/mesa/main/buffers.c
@@ -306,6 +306,8 @@ draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
if (fb == ctx->DrawBuffer) {
if (ctx->Driver.DrawBuffer)
ctx->Driver.DrawBuffer(ctx, buffer);
+ if (ctx->Driver.DrawBufferAllocate)
+ ctx->Driver.DrawBufferAllocate(ctx);
}
}
@@ -587,6 +589,8 @@ draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLsizei n,
if (fb == ctx->DrawBuffer) {
if (ctx->Driver.DrawBuffer)
ctx->Driver.DrawBuffer(ctx, n > 0 ? buffers[0] : GL_NONE);
+ if (ctx->Driver.DrawBufferAllocate)
+ ctx->Driver.DrawBufferAllocate(ctx);
}
}