The function getCompressedTexSubImage2DFormat was using function
parameter to loop through an array defined inside the function, while
these two were unrelated. The result may either not loop through the
whole array or go past the end of the array.
Affects:
dEQP-GLES2.functional.negative_api.texture.compressedtexsubimage2d_*
Components: OpenGL
VK-GL-CTS issue: 3272
Change-Id: Ie88d9330e03f56b7afe858bf51e9bf0fa41e4822
0x8C03 // GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG
};
- for (int i = 0; i < (int)supported.size(); i++)
+ for (int i = 0; i < DE_LENGTH_OF_ARRAY(compressedTexSubImage2DFormats); i++)
{
vector<deInt32>::const_iterator fmt = std::find(supported.begin(), supported.end(), compressedTexSubImage2DFormats[i]);
if (fmt != supported.end())