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 <paul.kocialkowski@bootlin.com>
(cherry picked from commit de6b3fac1f
)
This commit is contained in:
parent
a7b165d994
commit
ca034c2f2c
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue