From: Marek Olšák Date: Wed, 22 Feb 2017 20:39:55 +0000 (+0100) Subject: st/mesa: set blend state for PBO readbacks X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc2f92b09f8ab0470106185585fdc1282da523e6;p=mesa.git st/mesa: set blend state for PBO readbacks v2: restore the state Cc: 13.0 17.0 Reviewed-by: Brian Paul --- diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 5ce2421bbfb..78ea0c7bf8c 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -131,6 +131,7 @@ try_pbo_readpixels(struct st_context *st, struct st_renderbuffer *strb, cso_save_state(cso, (CSO_BIT_FRAGMENT_SAMPLER_VIEWS | CSO_BIT_FRAGMENT_SAMPLERS | CSO_BIT_FRAGMENT_IMAGE0 | + CSO_BIT_BLEND | CSO_BIT_VERTEX_ELEMENTS | CSO_BIT_AUX_VERTEX_BUFFER_SLOT | CSO_BIT_FRAMEBUFFER | @@ -213,6 +214,11 @@ try_pbo_readpixels(struct st_context *st, struct st_renderbuffer *strb, fb.layers = 1; cso_set_framebuffer(cso, &fb); + /* Any blend state would do. Set this just to prevent drivers having + * blend == NULL. + */ + cso_set_blend(cso, &st->pbo.upload_blend); + cso_set_viewport_dims(cso, fb.width, fb.height, invert_y); if (invert_y)