The test allocates a buffer of width*height*3 elements and expects
the readPixels to only write to this memory.
This is not correct if the window width is not a multiple of 4
Adding a gl.pixelStorei(GL_PACK_ALIGNMENT, 1) before the readPixels
fixes the issue
Affects:
KHR-GL45.shader_draw_parameters_tests.ShaderDrawArraysParameters
Components: OpenGL
VK-GL-CTS issue: 477
Change-Id: I2bef139f5b1e39fe52b2f00e5a529ce503a5d567
std::vector<GLubyte> pixels;
pixels.resize(width * height * 3);
+ gl.pixelStorei(GL_PACK_ALIGNMENT, 1);
gl.readPixels(0, 0, width, height, GL_RGB, GL_UNSIGNED_BYTE, pixels.data());
+ gl.pixelStorei(GL_PACK_ALIGNMENT, 4);
std::vector<ResultPoint>::iterator it;
for (it = m_resultPoints.begin(); it != m_resultPoints.end(); ++it)