Commit 86463981 authored by Olivier Fourdan's avatar Olivier Fourdan Committed by Eric Anholt

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

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: default avatarOlivier Fourdan <>
Reviewed-by: Eric Anholt's avatarEric Anholt <>
parent e7b8b7b1
......@@ -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;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment