[Mesa-dev] [PATCH] [rfc] st/mesa: don't update fb state is raster discard is set.
Marek Olšák
maraeo at gmail.com
Thu Apr 11 01:34:27 UTC 2019
Consider this sequence of calls:
1) Enable rasterizer discard
2) Update the framebuffer (skipped by your patch)
3) Draw
4) Disable rasterizer discard
5) Draw (not using the correct framebuffer)
Marek
On Wed, Apr 10, 2019 at 2:10 AM Dave Airlie <airlied at gmail.com> 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;
> --
> 2.20.1
>
> _______________________________________________
> 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/20190410/5baf690d/attachment.html>
More information about the mesa-dev
mailing list