From 84218b598f429bcc4474aa620da906b7b9aadc2b Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 6 Aug 2014 16:52:14 +0100 Subject: [PATCH] mesa/format_info: Add support for compressed floating-point formats MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If the name of a compressed texture format has ‘FLOAT’ in it it will now set the data type of the format to GL_FLOAT. This will be needed for the BPTC half-float formats. Reviewed-by: Jason Ekstrand Reviewed-by: Ian Romanick --- src/mesa/main/format_info.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/format_info.py b/src/mesa/main/format_info.py index 448bd005537..a0eecd30951 100644 --- a/src/mesa/main/format_info.py +++ b/src/mesa/main/format_info.py @@ -62,7 +62,9 @@ def get_gl_base_format(fmat): def get_gl_data_type(fmat): if fmat.is_compressed(): - if 'SIGNED' in fmat.name or 'SNORM' in fmat.name: + if 'FLOAT' in fmat.name: + return 'GL_FLOAT' + elif 'SIGNED' in fmat.name or 'SNORM' in fmat.name: return 'GL_SIGNED_NORMALIZED' else: return 'GL_UNSIGNED_NORMALIZED' -- 2.30.2