summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2019-08-21 09:40:11 -0700
committerAlyssa Rosenzweig <[email protected]>2019-08-21 10:38:31 -0700
commit27b6264630144608b5be5b529b97d8c164e05108 (patch)
tree019bdb542f1d2e3abc03a0fffdf9085b616746af /src/gallium
parent5ebdd10eaf0cd0bb641125f7721c502945dfe93e (diff)
panfrost: Guard against NULL rasterizer explicitly
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/panfrost/pan_context.c4
1 files changed, 3 insertions, 1 deletions
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) {