Mesa (master): panfrost: Don't zero staging buffer for tiling

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Thu May 21 20:05:36 UTC 2020


Module: Mesa
Branch: master
Commit: 48cc608859cceb523da1a5e74c0e4aad91f3984c
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=48cc608859cceb523da1a5e74c0e4aad91f3984c

Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date:   Tue May 19 17:39:09 2020 -0400

panfrost: Don't zero staging buffer for tiling

It's a little less safe but the memset does take time during
initialization. v3d doesn't either, so I think  it's ok.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5124>

---

 src/gallium/drivers/panfrost/pan_resource.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index 9443f93e666..3e68cbdbef4 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -652,7 +652,7 @@ panfrost_transfer_map(struct pipe_context *pctx,
 
                 transfer->base.stride = box->width * bytes_per_pixel;
                 transfer->base.layer_stride = transfer->base.stride * box->height;
-                transfer->map = rzalloc_size(transfer, transfer->base.layer_stride * box->depth);
+                transfer->map = ralloc_size(transfer, transfer->base.layer_stride * box->depth);
                 assert(box->depth == 1);
 
                 if ((usage & PIPE_TRANSFER_READ) && rsrc->slices[level].initialized) {



More information about the mesa-commit mailing list