If index_size > 0, indexbuf should always be non-NULL. This is a bug somewhere else.
Marek On Mon, Mar 5, 2018 at 4:42 PM, Roman Gilg <[email protected]> wrote: > 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 <[email protected]> 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 <[email protected]> >> --- >> 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 >> > _______________________________________________ > mesa-dev mailing list > [email protected] > https://lists.freedesktop.org/mailman/listinfo/mesa-dev _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
