aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-02-22 21:39:55 +0100
committerMarek Olšák <[email protected]>2017-02-25 00:03:09 +0100
commitcc2f92b09f8ab0470106185585fdc1282da523e6 (patch)
treedd55fbaac3429125fce1d958b38d626b520c83b8 /src
parenta40b76143d8b929412bed6fbed04810902844c40 (diff)
st/mesa: set blend state for PBO readbacks
v2: restore the state Cc: 13.0 17.0 <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/state_tracker/st_cb_readpixels.c6
1 files changed, 6 insertions, 0 deletions
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)