mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 08:10:14 +01:00
swrast: use memmove() instead of memcpy() in the SHIFT_ARRAY macro
The src/dst arrays would overlap but dst was less than src so a simple version of memcpy() would do the right thing. But this isn't guaranteed when memcpy() is optimized. Fixes demos/copypix when the dest region was clipped by the left side of the window. Reviewed-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
parent
59be691638
commit
a44d715d2b
1 changed files with 1 additions and 1 deletions
|
|
@ -776,7 +776,7 @@ clip_span( struct gl_context *ctx, SWspan *span )
|
|||
span->intTex[1] += leftClip * span->intTexStep[1];
|
||||
|
||||
#define SHIFT_ARRAY(ARRAY, SHIFT, LEN) \
|
||||
memcpy(ARRAY, ARRAY + (SHIFT), (LEN) * sizeof(ARRAY[0]))
|
||||
memmove(ARRAY, ARRAY + (SHIFT), (LEN) * sizeof(ARRAY[0]))
|
||||
|
||||
for (i = 0; i < FRAG_ATTRIB_MAX; i++) {
|
||||
if (span->arrayAttribs & (1 << i)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue