summaryrefslogtreecommitdiff
path: root/glamor
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2017-01-24 18:08:30 +0100
committerAdam Jackson <ajax@redhat.com>2017-02-23 14:27:16 -0500
commite2243e5b805df387cb3881b2298bffaac4f02942 (patch)
treecb7347ac9131078602bc8ddfdd1e8e7fd097afb1 /glamor
parentada5328290f444e3fc0e6a05557d5963dec626e5 (diff)
glamor: Two pass won't work on memory pixmaps
When selecting "CA_TWO_PASS" in glamor_composite_clipped_region() when the hardware does not support "GL_ARB_blend_func_extended", we call glamor_composite_choose_shader() twice in a row, which in turn calls glamor_pixmap_ensure_fbo(). On memory pixmaps, the first call will set the FBO and the second one will fail an assertion in glamor_upload_picture_to_texture() because the FBO is already set. Bail out earlier when the mask pixmap is in memory and the hardware capabilities would require to use two pass, so that the assertion is not failed and the rendering is correct. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99346 Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Eric Anholt <eric@anholt.net> (cherry picked from commit 86463981361064dd0352ec215abf1696ce7fc5ea)
Diffstat (limited to 'glamor')
-rw-r--r--glamor/glamor_render.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
index e04dd2141..52f073d05 100644
--- a/glamor/glamor_render.c
+++ b/glamor/glamor_render.c
@@ -1494,6 +1494,10 @@ glamor_composite_clipped_region(CARD8 op,
ca_state = CA_DUAL_BLEND;
} else {
if (op == PictOpOver) {
+ if (glamor_pixmap_is_memory(mask_pixmap)) {
+ glamor_fallback("two pass not supported on memory pximaps\n");
+ goto out;
+ }
ca_state = CA_TWO_PASS;
op = PictOpOutReverse;
}