From: Ian Romanick <[email protected]> There are no queries for GL_TEXTURE_LUMINANCE_SIZE, GL_TEXTURE_INTENSITY_SIZE, GL_TEXTURE_LUMINANCE_TYPE, or GL_TEXTURE_INTENSITY_TYPE in any version of OpenGL ES or desktop OpenGL core profile.
Signed-off-by: Ian Romanick <[email protected]> --- tests/spec/gl-3.0/required-sized-texture-formats.c | 26 +++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/tests/spec/gl-3.0/required-sized-texture-formats.c b/tests/spec/gl-3.0/required-sized-texture-formats.c index ed94470..e549977 100644 --- a/tests/spec/gl-3.0/required-sized-texture-formats.c +++ b/tests/spec/gl-3.0/required-sized-texture-formats.c @@ -88,9 +88,12 @@ piglit_init(int argc, char **argv) bool pass = true; GLuint tex; int i, c; + const bool compat_profile = !piglit_is_gles() && + !piglit_is_core_profile; piglit_require_gl_version(target_version); + glGenTextures(1, &tex); glBindTexture(GL_TEXTURE_2D, tex); @@ -146,12 +149,25 @@ piglit_init(int argc, char **argv) } for (c = 0; c < CHANNELS; c++) { - glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, - size_queries[c], &sizes[c]); - if (c != S) { + if (compat_profile + || (size_queries[c] != GL_TEXTURE_LUMINANCE_SIZE + && size_queries[c] != GL_TEXTURE_INTENSITY_SIZE)) { glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, - type_queries[c], - &types[c]); + size_queries[c], &sizes[c]); + } else { + sizes[c] = 0; + } + + if (c != S) { + if (compat_profile + || (type_queries[c] != GL_TEXTURE_LUMINANCE_TYPE + && type_queries[c] != GL_TEXTURE_INTENSITY_TYPE)) { + glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, + type_queries[c], + &types[c]); + } else { + types[c] = 0; + } } else { /* For stencil, there's no query for * the type, so our table above -- 1.8.1.4 _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
