зеркало из https://github.com/AvaloniaUI/angle.git
Align memory access in Copy32FixedTo32FVertexData
Bug: angleproject:2895 Change-Id: Idfe379e34c4f165b91babcb1990df28fa151d807 Reviewed-on: https://chromium-review.googlesource.com/c/1286373 Commit-Queue: Yuly Novikov <ynovikov@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Родитель
4024e2179e
Коммит
25843dd651
|
@ -129,12 +129,26 @@ inline void Copy32FixedTo32FVertexData(const uint8_t *input, size_t stride, size
|
|||
|
||||
for (size_t i = 0; i < count; i++)
|
||||
{
|
||||
const GLfixed* offsetInput = reinterpret_cast<const GLfixed*>(input + (stride * i));
|
||||
float* offsetOutput = reinterpret_cast<float*>(output) + i * outputComponentCount;
|
||||
const uint8_t *offsetInput = input + i * stride;
|
||||
float *offsetOutput = reinterpret_cast<float *>(output) + i * outputComponentCount;
|
||||
|
||||
// GLfixed access must be 4-byte aligned on arm32, input and stride sometimes are not
|
||||
if (reinterpret_cast<uintptr_t>(offsetInput) % sizeof(GLfixed) == 0)
|
||||
{
|
||||
for (size_t j = 0; j < inputComponentCount; j++)
|
||||
{
|
||||
offsetOutput[j] = static_cast<float>(offsetInput[j]) * divisor;
|
||||
offsetOutput[j] =
|
||||
static_cast<float>(reinterpret_cast<const GLfixed *>(offsetInput)[j]) * divisor;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (size_t j = 0; j < inputComponentCount; j++)
|
||||
{
|
||||
GLfixed alignedInput;
|
||||
memcpy(&alignedInput, offsetInput + j * sizeof(GLfixed), sizeof(GLfixed));
|
||||
offsetOutput[j] = static_cast<float>(alignedInput) * divisor;
|
||||
}
|
||||
}
|
||||
|
||||
// 4-component output formats would need special padding in the alpha channel.
|
||||
|
|
|
@ -197,10 +197,6 @@
|
|||
// Passes on Pixel XL. Fails on 5x and Pixel 2. Might be fixd in latest driver.
|
||||
2609 VULKAN ANDROID : dEQP-GLES2.functional.texture.mipmap.cube.generate.* = SKIP
|
||||
|
||||
// These two tests crash on 32-bit configs. Possibly due to an alignment bug.
|
||||
2895 VULKAN ANDROID : dEQP-GLES2.functional.draw.random.42 = SKIP
|
||||
2895 VULKAN ANDROID : dEQP-GLES2.functional.draw.random.59 = SKIP
|
||||
|
||||
// Fails on Nexus 5x only. TODO(jmadill): Remove suppression when possible. http://anglebug.com/2791
|
||||
2791 VULKAN ANDROID : dEQP-GLES2.functional.clipping.* = SKIP
|
||||
2599 VULKAN ANDROID : dEQP-GLES2.functional.rasterization.limits.points = FAIL
|
||||
|
|
Загрузка…
Ссылка в новой задаче