From cc2f92b09f8ab0470106185585fdc1282da523e6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 22 Feb 2017 21:39:55 +0100 Subject: [PATCH] st/mesa: set blend state for PBO readbacks v2: restore the state Cc: 13.0 17.0 Reviewed-by: Brian Paul --- src/mesa/state_tracker/st_cb_readpixels.c | 6 ++++++ 1 file changed, 6 insertions(+) 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) -- 2.30.2