Mesa (staging/20.0): i965: Do not set front_buffer_dirty if there is no front buffer

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Feb 5 17:05:47 UTC 2020


Module: Mesa
Branch: staging/20.0
Commit: 27e39daa4b5ca522f1a4f4d3c6cd939ba053cdc6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=27e39daa4b5ca522f1a4f4d3c6cd939ba053cdc6

Author: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Date:   Wed Jan 29 14:34:50 2020 +0200

i965: Do not set front_buffer_dirty if there is no front buffer

Otherwise there will be a warning:
 "libEGL warning: FIXME: egl/x11 doesn't support front buffer rendering."

Happens with EGL_KHR_surfaceless_context:

 eglMakeCurrent(egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, egl_context)
 eglMakeCurrent(egl_display, egl_surface, egl_surface, egl_context)
 glFlush() // Here will be a warning

Cc: <mesa-stable at lists.freedesktop.org>
Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/1525
Signed-off-by: Danylo Piliaiev <danylo.piliaiev at globallogic.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3628>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3628>
(cherry picked from commit 36126b6211f1ac2da0aa94411608b2320553dbb6)

---

 .pick_status.json                       | 2 +-
 src/mesa/drivers/dri/i965/brw_context.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 715d678fee7..ebda662f3d4 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -490,7 +490,7 @@
         "description": "i965: Do not set front_buffer_dirty if there is no front buffer",
         "nominated": true,
         "nomination_type": 0,
-        "resolution": 0,
+        "resolution": 1,
         "master_sha": null,
         "because_sha": null
     },
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 2676382b489..16f987812fc 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -1523,8 +1523,10 @@ intel_prepare_render(struct brw_context *brw)
     * that will happen next will probably dirty the front buffer.  So
     * mark it as dirty here.
     */
-   if (_mesa_is_front_buffer_drawing(ctx->DrawBuffer))
+   if (_mesa_is_front_buffer_drawing(ctx->DrawBuffer) &&
+       ctx->DrawBuffer != _mesa_get_incomplete_framebuffer()) {
       brw->front_buffer_dirty = true;
+   }
 
    if (brw->is_shared_buffer_bound) {
       /* Subsequent rendering will probably dirty the shared buffer. */



More information about the mesa-commit mailing list