Mesa (main): mesa/st: use util_streaming_load_memcpy for compute pbo copying
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Jun 7 03:57:40 UTC 2022
Module: Mesa
Branch: main
Commit: 7acc91fe8760690043474ebf84b1dcbf94bec41d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=7acc91fe8760690043474ebf84b1dcbf94bec41d
Author: Mike Blumenkrantz <michael.blumenkrantz at gmail.com>
Date: Tue May 17 14:57:49 2022 -0400
mesa/st: use util_streaming_load_memcpy for compute pbo copying
Reviewed-by: Emma Anholt <emma at anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16732>
---
src/mesa/state_tracker/st_pbo_compute.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/mesa/state_tracker/st_pbo_compute.c b/src/mesa/state_tracker/st_pbo_compute.c
index 263f46a4147..fc4f52dfabd 100644
--- a/src/mesa/state_tracker/st_pbo_compute.c
+++ b/src/mesa/state_tracker/st_pbo_compute.c
@@ -37,6 +37,7 @@
#include "compiler/glsl/gl_nir.h"
#include "compiler/glsl/gl_nir_linker.h"
#include "util/u_sampler.h"
+#include "util/streaming-load-memcpy.h"
#define BGR_FORMAT(NAME) \
{{ \
@@ -1028,12 +1029,12 @@ copy_converted_buffer(struct gl_context * ctx,
GLubyte *srcpx = _mesa_image_address(dim, &packing, map,
width, height, format, type,
z, y, 0);
- memcpy(dst, srcpx, util_format_get_stride(dst_format, width));
+ util_streaming_load_memcpy(dst, srcpx, util_format_get_stride(dst_format, width));
}
}
} else {
/* direct copy for all other cases */
- memcpy(pixels, map, dst->width0);
+ util_streaming_load_memcpy(pixels, map, dst->width0);
}
_mesa_unmap_pbo_dest(ctx, pack);
More information about the mesa-commit
mailing list