util: use void * instead of byte * for util_copy_rect in u_format.h

As ubyte comes from p_compiler.h,  so do not use it,
and the code calles util_copy_rect may use args with type uint8_t*, ubyte* or unsigned char*,
so use the type void* that consistence with memcpy

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19676>
This commit is contained in:
Yonggang Luo
2022-11-07 14:12:11 +08:00
committed by Marge Bot
parent 2f42ffcd02
commit b728bed567
2 changed files with 6 additions and 4 deletions
+4 -2
View File
@@ -48,18 +48,20 @@
* src_stride may be negative to do vertical flip of pixels from source.
*/
void
util_copy_rect(ubyte * dst,
util_copy_rect(void * dst_in,
enum pipe_format format,
unsigned dst_stride,
unsigned dst_x,
unsigned dst_y,
unsigned width,
unsigned height,
const ubyte * src,
const void * src_in,
int src_stride,
unsigned src_x,
unsigned src_y)
{
uint8_t *dst = dst_in;
const uint8_t *src = src_in;
unsigned i;
int src_stride_pos = src_stride < 0 ? -src_stride : src_stride;
int blocksize = util_format_get_blocksize(format);
+2 -2
View File
@@ -1684,9 +1684,9 @@ enum pipe_format
util_format_snorm_to_sint(enum pipe_format format) ATTRIBUTE_CONST;
extern void
util_copy_rect(ubyte * dst, enum pipe_format format,
util_copy_rect(void * dst, enum pipe_format format,
unsigned dst_stride, unsigned dst_x, unsigned dst_y,
unsigned width, unsigned height, const ubyte * src,
unsigned width, unsigned height, const void * src,
int src_stride, unsigned src_x, unsigned src_y);
/**