[Mesa-dev] [PATCH 03/12] mesa/format_info: Add support for compressed floating-point formats

Jason Ekstrand jason at jlekstrand.net
Wed Aug 6 09:56:27 PDT 2014


Looks fine
Reviewed-by: Jason Ekstrand <jason.ekstrand at intel.com>


On Wed, Aug 6, 2014 at 9:27 AM, Neil Roberts <neil at linux.intel.com> wrote:

> 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.
> ---
>  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 448bd00..a0eecd3 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'
> --
> 1.9.3
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140806/9d02e492/attachment-0001.html>


More information about the mesa-dev mailing list