mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-12 13:20:33 +01:00
fix bug in copy_rect(), use temp vars in sp_region_copy() to aid debugging
This commit is contained in:
parent
874b6b9960
commit
5d39f4f9fd
1 changed files with 9 additions and 6 deletions
|
|
@ -147,7 +147,7 @@ copy_rect(ubyte * dst,
|
|||
dst += dst_x * cpp;
|
||||
src += src_x * cpp;
|
||||
dst += dst_y * dst_pitch;
|
||||
src += src_y * dst_pitch;
|
||||
src += src_y * src_pitch;
|
||||
width *= cpp;
|
||||
|
||||
if (width == dst_pitch && width == src_pitch)
|
||||
|
|
@ -197,15 +197,18 @@ sp_region_copy(struct pipe_context *pipe,
|
|||
unsigned src_offset,
|
||||
unsigned srcx, unsigned srcy, unsigned width, unsigned height)
|
||||
{
|
||||
ubyte *src_map, *dst_map;
|
||||
assert( dst->cpp == src->cpp );
|
||||
|
||||
copy_rect(pipe->region_map(pipe, dst) + dst_offset,
|
||||
dst_map = pipe->region_map(pipe, dst);
|
||||
src_map = pipe->region_map(pipe, src);
|
||||
copy_rect(dst_map + dst_offset,
|
||||
dst->cpp,
|
||||
dst->pitch,
|
||||
dstx, dsty,
|
||||
width, height,
|
||||
pipe->region_map(pipe, src) + src_offset,
|
||||
src->pitch,
|
||||
dstx, dsty,
|
||||
width, height,
|
||||
src_map + src_offset,
|
||||
src->pitch,
|
||||
srcx, srcy);
|
||||
|
||||
pipe->region_unmap(pipe, src);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue