Commit de6b3fac authored by Paul Kocialkowski's avatar Paul Kocialkowski
Browse files

glamor: Propagate glamor_prepare_access failures in copy helpers



glamor_prepare_access can fail for a few reasons, especially when
failing to allocate a PBO buffer. Take this in account and bail in
the copy helpers that call the helper when a failure happens.
Signed-off-by: Paul Kocialkowski's avatarPaul Kocialkowski <paul.kocialkowski@bootlin.com>
parent bc2e1223
......@@ -221,7 +221,9 @@ glamor_copy_cpu_fbo(DrawablePtr src,
goto bail;
glamor_make_current(glamor_priv);
glamor_prepare_access(src, GLAMOR_ACCESS_RO);
if (!glamor_prepare_access(src, GLAMOR_ACCESS_RO))
goto bail;
glamor_get_drawable_deltas(dst, dst_pixmap, &dst_xoff, &dst_yoff);
......@@ -309,7 +311,9 @@ glamor_copy_fbo_cpu(DrawablePtr src,
goto bail;
glamor_make_current(glamor_priv);
glamor_prepare_access(dst, GLAMOR_ACCESS_RW);
if (!glamor_prepare_access(dst, GLAMOR_ACCESS_RW))
goto bail;
glamor_get_drawable_deltas(src, src_pixmap, &src_xoff, &src_yoff);
......
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