[Mesa-dev] [PATCH] [rfc] st/mesa: don't update fb state is raster discard is set.

Dave Airlie airlied at gmail.com
Wed Apr 10 06:10:34 UTC 2019


From: Dave Airlie <airlied at redhat.com>

This avoid softpipe trying to get image when no window has ever
been exposed, and no image will be exposed.

I'm not entirely sure this is correct or useful, but it definitely
helps with some softpipe get images when we haven't got a window.
---
 src/mesa/state_tracker/st_atom.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 49f79ad9d49..3aeb526e56b 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -246,6 +246,9 @@ void st_validate_state( struct st_context *st, enum st_pipeline pipeline )
       unreachable("Invalid pipeline specified");
    }
 
+   if (ctx->RasterDiscard)
+      st->dirty &= ~ST_NEW_FB_STATE;
+
    dirty = st->dirty & pipeline_mask;
    if (!dirty)
       return;
-- 
2.20.1



More information about the mesa-dev mailing list