Commit ac6e751f by Nicolas Capens

Fix memory alignment of outline spans.

Some CPU architectures require all memory accesses to be naturally aligned. We read polygon outline spans in pairs, so we need two underflow spans. b/37478805 Change-Id: If74fd59654fb6fa56cbed93122b496b9e86dda06 Reviewed-on: https://swiftshader-review.googlesource.com/9528Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent 7319d3ec
...@@ -69,9 +69,11 @@ namespace sw ...@@ -69,9 +69,11 @@ namespace sw
unsigned short right; unsigned short right;
}; };
Span outlineUnderflow; // The rasterizer adds a zero length span to the top and bottom of the polygon to allow
// for 2x2 pixel processing. We need an even number of spans to keep accesses aligned.
Span outlineUnderflow[2];
Span outline[OUTLINE_RESOLUTION]; Span outline[OUTLINE_RESOLUTION];
Span outlineOverflow; Span outlineOverflow[2];
}; };
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment