[Mesa-dev] [RFC 61/63] mesa/formatquery: Add (GET_)TEXTURE_IMAGE_TYPE pnames

Eduardo Lima Mitev elima at igalia.com
Tue Jan 19 08:42:41 PST 2016


These basically reuse the default implementation of GL_READ_PIXELS_TYPE.
---
 src/mesa/main/formatquery.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 2551476..158b908 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -643,7 +643,9 @@ _mesa_query_internal_format_default(struct gl_context *ctx, GLenum target,
       break;
    }
 
-   case GL_READ_PIXELS_TYPE: {
+   case GL_READ_PIXELS_TYPE:
+   case GL_TEXTURE_IMAGE_TYPE:
+   case GL_GET_TEXTURE_IMAGE_TYPE: {
       GLenum base_format = _mesa_base_tex_format(ctx, internalFormat);
       if (base_format > 0)
          params[0] = _mesa_generic_type_for_internal_format(internalFormat);
@@ -1147,16 +1149,10 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
 
    case GL_TEXTURE_IMAGE_FORMAT:
    case GL_GET_TEXTURE_IMAGE_FORMAT:
-      ctx->Driver.QueryInternalFormat(ctx, target, internalformat, pname,
-                                      buffer);
-      break;
-
    case GL_TEXTURE_IMAGE_TYPE:
-      /* @TODO */
-      break;
-
    case GL_GET_TEXTURE_IMAGE_TYPE:
-      /* @TODO */
+      ctx->Driver.QueryInternalFormat(ctx, target, internalformat, pname,
+                                      buffer);
       break;
 
    case GL_MIPMAP:
-- 
2.5.3



More information about the mesa-dev mailing list