radeonsi: make sure that blend state != NULL and remove all NULL checking
[mesa.git] / src / gallium / drivers / radeonsi / si_pipe.c
index 74d58d4993c65eaf25ff1f89cb2750b1641a17ec..98f15db8cad5654fa7b3f9f156283eda4d218960 100644 (file)
@@ -543,6 +543,10 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
                        goto fail;
                sctx->blitter->skip_viewport_restore = true;
 
+               /* Some states are expected to be always non-NULL. */
+               sctx->noop_blend = util_blitter_get_noop_blend_state(sctx->blitter);
+               sctx->queued.named.blend = sctx->noop_blend;
+
                si_init_draw_functions(sctx);
                si_initialize_prim_discard_tunables(sctx);
        }