Fix loop over cube map faces in GL4
authorMika Väinölä <mika.vainola@siru.fi>
Tue, 31 Aug 2021 11:56:16 +0000 (14:56 +0300)
committerPeter Kohaut <peter.kohaut@arm.com>
Thu, 2 Sep 2021 16:00:23 +0000 (16:00 +0000)
Found when building with Clang with -Wunreachable-code-loop-increment
enabled. TextureViewUtilities::initTextureStorage is supposed to call
glTexImage2D for all cube map faces but stops after the first one
(GL_TEXTURE_CUBE_MAP_POSITIVE_X).

Affects:
KHR-GL4*.texture_view.gettexparameter
KHR-GL4*.texture_view.errors

Components: OpenGL

VK-GL-CTS issue: 3085

Change-Id: I3d85351ab50ad0bd8b779537b1a8b3bef162f80f

external/openglcts/modules/gl/gl4cTextureViewTests.cpp

index 80b8250..a7af4ec 100644 (file)
@@ -2229,8 +2229,6 @@ void TextureViewUtilities::initTextureStorage(const glw::Functions& gl, bool ini
 
                                        GLU_EXPECT_NO_ERROR(gl.getError(),
                                                                                "glTexImage2D() call failed for one of the cube-map texture targets");
-
-                                       break;
                                } /* for (all cube-map texture targets) */
 
                                break;