[Mesa-dev] [PATCH] mesa: call DrawBuffer(s) driver hook in update_framebuffer for windows-system FB
Manolova, Plamena
plamena.manolova at intel.com
Fri Jan 20 14:18:17 UTC 2017
This looks good to me :)
Reviewed-by: Plamena Manolova <plamena.manolova at intel.com>
On Fri, Jan 20, 2017 at 9:38 AM, Boyan Ding <boyan.j.ding at gmail.com> wrote:
> When draw buffers are changed on a bound framebuffer, DrawBuffer(s) hook
> should be called. However, it is missing in update_framebuffer with
> window-system framebuffer, in which FB's draw buffer state should match
> context state, potentially resulting in a change.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99116
> Signed-off-by: Boyan Ding <boyan.j.ding at gmail.com>
> ---
> src/mesa/main/framebuffer.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/src/mesa/main/framebuffer.c b/src/mesa/main/framebuffer.c
> index c06130dc8d..55a6d5c004 100644
> --- a/src/mesa/main/framebuffer.c
> +++ b/src/mesa/main/framebuffer.c
> @@ -670,6 +670,16 @@ update_framebuffer(struct gl_context *ctx, struct
> gl_framebuffer *fb)
> if (fb->ColorDrawBuffer[0] != ctx->Color.DrawBuffer[0]) {
> _mesa_drawbuffers(ctx, fb, ctx->Const.MaxDrawBuffers,
> ctx->Color.DrawBuffer, NULL);
> +
> + /* Call device driver function if fb is the bound draw buffer. */
> + if (fb == ctx->DrawBuffer) {
> + if (ctx->Driver.DrawBuffers) {
> + ctx->Driver.DrawBuffers(ctx, ctx->Const.MaxDrawBuffers,
> + ctx->Color.DrawBuffer);
> + } else if (ctx->Driver.DrawBuffer) {
> + ctx->Driver.DrawBuffer(ctx, ctx->Color.DrawBuffer[0]);
> + }
> + }
> }
> }
> else {
> --
> 2.11.0
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170120/bca52998/attachment.html>
More information about the mesa-dev
mailing list