[Piglit] [PATCH 08/24] arb_direct_state_access: Added tests for glGetTexLevelParameterfv to texture-storage.c
Laura Ekstrand
laura at jlekstrand.net
Mon Dec 15 17:24:11 PST 2014
---
.../spec/arb_direct_state_access/texture-storage.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/tests/spec/arb_direct_state_access/texture-storage.c b/tests/spec/arb_direct_state_access/texture-storage.c
index 5838146..16bd39d 100644
--- a/tests/spec/arb_direct_state_access/texture-storage.c
+++ b/tests/spec/arb_direct_state_access/texture-storage.c
@@ -325,6 +325,7 @@ test_2d_mipmap_rendering(void)
GLuint tex;
GLint width = 128, height = 64, levels = 8;
GLint v, l;
+ GLfloat vfloat;
glCreateTextures(GL_TEXTURE_2D, 1, &tex);
glBindTextureUnit(0, tex);
@@ -358,6 +359,27 @@ test_2d_mipmap_rendering(void)
return false;
}
+
+ /* Added to test glGetTextureLevelParameterfv */
+ glGetTextureLevelParameterfv(tex, l, GL_TEXTURE_WIDTH,
+ &vfloat);
+ if (vfloat != (GLfloat) width) {
+ printf("%s: level %d: bad width: %.2f, "
+ "should be %.2f\n",
+ TestName, l, vfloat, (GLfloat) width);
+ return false;
+ }
+
+ glGetTextureLevelParameterfv(tex, l, GL_TEXTURE_HEIGHT,
+ &vfloat);
+ if (vfloat != (GLfloat) height) {
+ printf("%s: level %d: bad height: %.2f, "
+ "should be %.2f\n",
+ TestName, l, vfloat, (GLfloat) height);
+ return false;
+ }
+
+
if (width > 1)
width /= 2;
if (height > 1)
--
2.1.0
More information about the Piglit
mailing list