diff options
Diffstat (limited to 'src/glamor_render.c')
-rw-r--r-- | src/glamor_render.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/glamor_render.c b/src/glamor_render.c index a2141be..4c31fea 100644 --- a/src/glamor_render.c +++ b/src/glamor_render.c @@ -1129,6 +1129,16 @@ Bool glamor_composite_choose_shader(CARD8 op, } #endif + /* If the source and mask are two differently-formatted views of + * the same pixmap bits, and the pixmap was already uploaded (so + * the dynamic code above doesn't apply), then fall back to + * software. We should use texture views to fix this properly. + */ + if (source_pixmap && source_pixmap == mask_pixmap && + source->format != mask->format) { + goto fail; + } + /*Before enter the rendering stage, we need to fixup * transformed source and mask, if the transform is not int translate. */ if (key.source != SHADER_SOURCE_SOLID |