Commit e3bfefb4 by Yuly Novikov Committed by Commit Bot

Align float access in InterleavedAttributeData perf test

Used to crash on arm because of unaligned float access in positionColorData BUG=chromium:675997 Change-Id: Iadc705986700248ce3cff9bb33fcd72c94ad1c59 Reviewed-on: https://chromium-review.googlesource.com/764688Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Yuly Novikov <ynovikov@chromium.org>
parent 9776035d
...@@ -61,7 +61,10 @@ class InterleavedAttributeDataBenchmark ...@@ -61,7 +61,10 @@ class InterleavedAttributeDataBenchmark
GLuint mPositionColorBuffer[2]; GLuint mPositionColorBuffer[2];
// The buffers contain two floats and 3 unsigned bytes per point sprite // The buffers contain two floats and 3 unsigned bytes per point sprite
const size_t mBytesPerSprite = 2 * sizeof(float) + 3; // Has to be aligned for float access on arm
const size_t mBytesPerSpriteUnaligned = 2 * sizeof(float) + 3;
const size_t mBytesPerSprite =
((mBytesPerSpriteUnaligned + sizeof(float) - 1) / sizeof(float)) * sizeof(float);
}; };
InterleavedAttributeDataBenchmark::InterleavedAttributeDataBenchmark() InterleavedAttributeDataBenchmark::InterleavedAttributeDataBenchmark()
......
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