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

Brian Paul brianp at vmware.com
Wed Apr 10 13:50:17 UTC 2019


On 04/10/2019 12:10 AM, Dave Airlie wrote:
> 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;
> 

Yeah, this looks a little questionable.

Couldn't you add a check for ctx->RasterDiscard in 
st_update_framebuffer_state() and no-op most of that function there?

I think you'd at least want to do this after flushing the bitmap and 
readpix cache.

-Brian


More information about the mesa-dev mailing list