From: Alyssa Rosenzweig Date: Wed, 21 Aug 2019 16:40:11 +0000 (-0700) Subject: panfrost: Guard against NULL rasterizer explicitly X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=27b6264630144608b5be5b529b97d8c164e05108;p=mesa.git panfrost: Guard against NULL rasterizer explicitly Signed-off-by: Alyssa Rosenzweig --- diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 6c26e7a8a45..5e66adb2f0f 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1596,8 +1596,10 @@ panfrost_draw_vbo( /* Fallback for unsupported modes */ + assert(ctx->rasterizer != NULL); + if (!(ctx->draw_modes & (1 << mode))) { - if (mode == PIPE_PRIM_QUADS && info->count == 4 && ctx->rasterizer && !ctx->rasterizer->base.flatshade) { + if (mode == PIPE_PRIM_QUADS && info->count == 4 && !ctx->rasterizer->base.flatshade) { mode = PIPE_PRIM_TRIANGLE_FAN; } else { if (info->count < 4) {