[Mesa-dev] [RFC] radeonsi: guard against indexbuf not being set

Roman Gilg subdiff at gmail.com
Mon Mar 5 21:42:36 UTC 2018


This is a RFC because I don't really know what I'm doing here. But we
have this problem with AMD and KWin already for quite a long time and
I hope it can be fixed now.

I followed the debug output and tried this guard. On my system this
fixed the issue with Alt+Tab crashing KWin. Still this might be not
the right solution to the problem.

According to git-blame 330d0607 was the last time this condition was touched.

On Mon, Mar 5, 2018 at 10:31 PM, Roman Gilg <subdiff at gmail.com> wrote:
> Fixes crashes of clients when index_size != 0, but there was no indexbuf
> set in si_draw_vbo.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103234
>
> Signed-off-by: Roman Gilg <subdiff at gmail.com>
> ---
>  src/gallium/drivers/radeonsi/si_state_draw.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
> index ad470fd..e53da38 100644
> --- a/src/gallium/drivers/radeonsi/si_state_draw.c
> +++ b/src/gallium/drivers/radeonsi/si_state_draw.c
> @@ -680,7 +680,7 @@ static void si_emit_draw_packets(struct si_context *sctx,
>         }
>
>         /* draw packet */
> -       if (index_size) {
> +       if (index_size && indexbuf) {
>                 if (index_size != sctx->last_index_size) {
>                         unsigned index_type;
>
> --
> 2.7.4
>


More information about the mesa-dev mailing list