mesa/st: use util_streaming_load_memcpy for compute pbo copying
Reviewed-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16732>
This commit is contained in:
parent
a7831c5f6e
commit
7acc91fe87
|
@ -37,6 +37,7 @@
|
||||||
#include "compiler/glsl/gl_nir.h"
|
#include "compiler/glsl/gl_nir.h"
|
||||||
#include "compiler/glsl/gl_nir_linker.h"
|
#include "compiler/glsl/gl_nir_linker.h"
|
||||||
#include "util/u_sampler.h"
|
#include "util/u_sampler.h"
|
||||||
|
#include "util/streaming-load-memcpy.h"
|
||||||
|
|
||||||
#define BGR_FORMAT(NAME) \
|
#define BGR_FORMAT(NAME) \
|
||||||
{{ \
|
{{ \
|
||||||
|
@ -1028,12 +1029,12 @@ copy_converted_buffer(struct gl_context * ctx,
|
||||||
GLubyte *srcpx = _mesa_image_address(dim, &packing, map,
|
GLubyte *srcpx = _mesa_image_address(dim, &packing, map,
|
||||||
width, height, format, type,
|
width, height, format, type,
|
||||||
z, y, 0);
|
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 {
|
} else {
|
||||||
/* direct copy for all other cases */
|
/* 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);
|
_mesa_unmap_pbo_dest(ctx, pack);
|
||||||
|
|
Loading…
Reference in New Issue