Module: Mesa Branch: master Commit: e8ea42d245cb6adc7f16ee4e96fd89d905d2163a URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e8ea42d245cb6adc7f16ee4e96fd89d905d2163a
Author: Eric Anholt <[email protected]> Date: Wed May 17 13:22:39 2017 -0700 vc4: Don't allocate new BOs to avoid synchronization when they're shared. If X11 did a software fallback to the entire screen, we would throw out the BO the screen is scanning out from and allocate a new one. Cc: [email protected] --- src/gallium/drivers/vc4/vc4_resource.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/vc4/vc4_resource.c b/src/gallium/drivers/vc4/vc4_resource.c index c0bfc8ff2e..8a5398d9f7 100644 --- a/src/gallium/drivers/vc4/vc4_resource.c +++ b/src/gallium/drivers/vc4/vc4_resource.c @@ -165,7 +165,8 @@ vc4_resource_transfer_map(struct pipe_context *pctx, prsc->width0 == box->width && prsc->height0 == box->height && prsc->depth0 == box->depth && - prsc->array_size == 1) { + prsc->array_size == 1 && + rsc->bo->private) { usage |= PIPE_TRANSFER_DISCARD_WHOLE_RESOURCE; } _______________________________________________ mesa-commit mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-commit
