Skip to content

Commit

Permalink
Don't delare arrays as static
Browse files Browse the repository at this point in the history
m_texture_1D and friends may have different values on each invocation of
gl4cts::GetTextureSubImage::Errors::testTwoDimmensionalTextureErrors()
on a full CTS run.  However, the rules for 'static const' initializers
may prevent the values from being updated after the first run.

I discovered this while trying to track down failures in
KHR-GL46.get_texture_sub_image.errors_test that only started occuring
with the 3rd visual tested in a full CTS run.  Running the test by
itself or testing that visual by itself via glcts would not reproduce
the error.  I added some extra debug logging to the driver, and I found
that testOneDimmensionalTextureErrors() and
testTwoDimmensionalTextureErrors() were using different names for the
GL_TEXTURE_1D texture.  I then discovered that the targets of the
textures used from testTwoDimmensionalTextureErrors() were {
GL_TEXTURE_2D, GL_TEXTURE_RECTANGE, GL_TEXTURE_2D } instead of {
GL_TEXTURE_1D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D }

See also https://bugs.freedesktop.org/show_bug.cgi?id=104154

Components: OpenGL

VK-GL-CTS issue: 912

Affects:
KHR-GL46.get_texture_sub_image.errors_test

Change-Id: I3ce061d9de75df46ff69a7eea4b88f6d17164f30
  • Loading branch information
ianromanick authored and alegal-arm committed Dec 15, 2017
1 parent b61ffe2 commit 780edbd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions external/openglcts/modules/gl/gl4cGetTextureSubImageTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ bool gl4cts::GetTextureSubImage::Errors::testTwoDimmensionalTextureErrors()
const glw::Functions& gl = m_context.getRenderContext().getFunctions();

/* Test. */
static const struct
const struct
{
glw::GLuint id;
const glw::GLchar* target_name;
Expand Down Expand Up @@ -542,7 +542,7 @@ bool gl4cts::GetTextureSubImage::Errors::testTwoDimmensionalTextureErrors()
}

/* Test (compressed textures). */
static const struct
const struct
{
glw::GLuint id;
const glw::GLchar* target_name;
Expand Down

0 comments on commit 780edbd

Please sign in to comment.