mesa: add EXT_dsa glCompressedTexture(Sub)Image1D/2D/3D functions
[mesa.git] / src / mesa / main / texgetimage.c
index 0e475e53893731d718081e5a1d1dafc3d9a381c4..749d0b2131310c01e8772006ca98284a7fd04e7e 100644 (file)
@@ -1884,6 +1884,32 @@ _mesa_GetCompressedTexImage(GLenum target, GLint level, GLvoid *pixels)
 }
 
 
+void GLAPIENTRY
+_mesa_GetCompressedTextureImageEXT(GLuint texture, GLenum target, GLint level,
+                                   GLvoid *pixels)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   struct gl_texture_object*  texObj;
+   GLsizei width, height, depth;
+   static const char *caller = "glGetCompressedTextureImageEXT";
+
+   texObj = _mesa_lookup_or_create_texture(ctx, target, texture,
+                                           false, true, caller);
+   get_texture_image_dims(texObj, texObj->Target, level,
+                          &width, &height, &depth);
+
+   if (getcompressedteximage_error_check(ctx, texObj, texObj->Target, level,
+                                         0, 0, 0, width, height, depth,
+                                         INT_MAX, pixels, caller)) {
+      return;
+   }
+
+   get_compressed_texture_image(ctx, texObj, texObj->Target, level,
+                                0, 0, 0, width, height, depth,
+                                pixels, caller);
+}
+
+
 void GLAPIENTRY
 _mesa_GetCompressedTextureImage(GLuint texture, GLint level,
                                 GLsizei bufSize, GLvoid *pixels)