diff --git a/src/libANGLE/renderer/copyvertex.inc b/src/libANGLE/renderer/copyvertex.inc index db5b52529..7c3e73e59 100644 --- a/src/libANGLE/renderer/copyvertex.inc +++ b/src/libANGLE/renderer/copyvertex.inc @@ -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(input + (stride * i)); - float* offsetOutput = reinterpret_cast(output) + i * outputComponentCount; + const uint8_t *offsetInput = input + i * stride; + float *offsetOutput = reinterpret_cast(output) + i * outputComponentCount; - for (size_t j = 0; j < inputComponentCount; j++) + // GLfixed access must be 4-byte aligned on arm32, input and stride sometimes are not + if (reinterpret_cast(offsetInput) % sizeof(GLfixed) == 0) { - offsetOutput[j] = static_cast(offsetInput[j]) * divisor; + for (size_t j = 0; j < inputComponentCount; j++) + { + offsetOutput[j] = + static_cast(reinterpret_cast(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(alignedInput) * divisor; + } } // 4-component output formats would need special padding in the alpha channel. diff --git a/src/tests/deqp_support/deqp_gles2_test_expectations.txt b/src/tests/deqp_support/deqp_gles2_test_expectations.txt index 36bab9adf..a11e1ee60 100644 --- a/src/tests/deqp_support/deqp_gles2_test_expectations.txt +++ b/src/tests/deqp_support/deqp_gles2_test_expectations.txt @@ -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