diff --git a/src/gallium/drivers/panfrost/pan_context.c b/src/gallium/drivers/panfrost/pan_context.c index 2e0bda518ea..f234d9435c3 100644 --- a/src/gallium/drivers/panfrost/pan_context.c +++ b/src/gallium/drivers/panfrost/pan_context.c @@ -1588,12 +1588,11 @@ panfrost_bind_rasterizer_state( { struct panfrost_context *ctx = pan_context(pctx); - /* TODO: Why can't rasterizer be NULL ever? Other drivers are fine.. */ + ctx->rasterizer = hwcso; + if (!hwcso) return; - ctx->rasterizer = hwcso; - ctx->fragment_shader_core.depth_units = ctx->rasterizer->base.offset_units * 2.0f; ctx->fragment_shader_core.depth_factor = ctx->rasterizer->base.offset_scale;