---
 .../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

_______________________________________________
Piglit mailing list
Piglit@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/piglit

Reply via email to