From 5ab5f16919f6aaa19f5c92fd562e43dee18e30bc Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Sun, 27 Sep 2009 19:42:36 -0600 Subject: [PATCH] mesa: added _mesa_get_format_datatype() --- src/mesa/main/formats.c | 8 ++++++++ src/mesa/main/formats.h | 3 +++ 2 files changed, 11 insertions(+) diff --git a/src/mesa/main/formats.c b/src/mesa/main/formats.c index 62a2d70744d..afa2398ed41 100644 --- a/src/mesa/main/formats.c +++ b/src/mesa/main/formats.c @@ -816,3 +816,11 @@ _mesa_get_format_bits(gl_format format, GLenum pname) return 0; } } + + +GLenum +_mesa_get_format_datatype(gl_format format) +{ + const struct gl_format_info *info = _mesa_get_format_info(format); + return info->DataType; +} diff --git a/src/mesa/main/formats.h b/src/mesa/main/formats.h index 441cf3eac6d..ad93fef2fcb 100644 --- a/src/mesa/main/formats.h +++ b/src/mesa/main/formats.h @@ -211,6 +211,9 @@ _mesa_format_to_type_and_comps2(gl_format format, extern GLint _mesa_get_format_bits(gl_format format, GLenum pname); +extern GLenum +_mesa_get_format_datatype(gl_format format); + extern void _mesa_test_formats(void); -- 2.30.2