diff options
Diffstat (limited to 'glamor/glamor_spans.c')
-rw-r--r-- | glamor/glamor_spans.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/glamor/glamor_spans.c b/glamor/glamor_spans.c index 9a2aecd9d..b3c028d67 100644 --- a/glamor/glamor_spans.c +++ b/glamor/glamor_spans.c @@ -56,6 +56,7 @@ glamor_fill_spans_gl(DrawablePtr drawable, char *vbo_offset; int c; int box_index; + Bool ret = FALSE; pixmap_priv = glamor_get_pixmap_private(pixmap); if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(pixmap_priv)) @@ -123,8 +124,9 @@ glamor_fill_spans_gl(DrawablePtr drawable, int nbox = RegionNumRects(gc->pCompositeClip); BoxPtr box = RegionRects(gc->pCompositeClip); - glamor_set_destination_drawable(drawable, box_index, FALSE, FALSE, - prog->matrix_uniform, &off_x, &off_y); + if (!glamor_set_destination_drawable(drawable, box_index, FALSE, FALSE, + prog->matrix_uniform, &off_x, &off_y)) + goto bail; while (nbox--) { glScissor(box->x1 + off_x, @@ -140,14 +142,15 @@ glamor_fill_spans_gl(DrawablePtr drawable, } } + ret = TRUE; + +bail: glDisable(GL_SCISSOR_TEST); if (glamor_priv->glsl_version >= 130) glVertexAttribDivisor(GLAMOR_VERTEX_POS, 0); glDisableVertexAttribArray(GLAMOR_VERTEX_POS); - return TRUE; -bail: - return FALSE; + return ret; } static void |