[Mesa-dev] [PATCH] mesa: Unconditionally enable floating-point textures

Chuck Atkins chuck.atkins at kitware.com
Mon Jun 25 15:52:39 UTC 2018


I know I'm a bit late to the party here, but WooHoo!  We've been waiting
for this to go away for years now.  While we still probably need to keep
some workaround code around for a bit since various "system" versions won't
have it for a while, we can finally start reliably depending on floating
point textures in our distributed binaries without assuming shifting legal
risk

----------
Chuck Atkins
Staff R&D Engineer, Scientific Computing
Kitware, Inc.



On Sat, Jun 16, 2018 at 9:10 PM Ian Romanick <idr at freedesktop.org> wrote:

> Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
>
> I'd also be in favor of a patch for stable that just removes
> docs/patents.txt and the references to it by the build system.  Since we
> don't like to enable new features in stable, the flag would need to stay.
>
> On 06/16/2018 05:00 PM, Timothy Arceri wrote:
> > ARB_texture_float references US Patent #6,650,327 [1] which has a filing
> date
> > of June 16 1998.
> >
> > According to [2], patents filed after 1995 expire 20 years from the
> filing
> > date, giving an expiration of June 17 2018.
> >
> > [1] https://www.google.com/patents/US6650327
> > [2] https://en.wikipedia.org/wiki/Term_of_patent_in_the_United_States
> > ---
> >  configure.ac                          | 15 -------------
> >  docs/patents.txt                      | 31 ---------------------------
> >  meson.build                           |  4 ----
> >  meson_options.txt                     |  6 ------
> >  scons/gallium.py                      |  4 ----
> >  src/gallium/auxiliary/util/u_format.c |  9 --------
> >  src/mesa/main/extensions.c            |  2 --
> >  7 files changed, 71 deletions(-)
> >  delete mode 100644 docs/patents.txt
> >
> > diff --git a/configure.ac b/configure.ac
> > index 3f747bf38cc..7a0e4754208 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -763,21 +763,6 @@ esac
> >
> >  AC_SUBST([LIB_EXT])
> >
> > -dnl
> > -dnl potentially-infringing-but-nobody-knows-for-sure stuff
> > -dnl
> > -AC_ARG_ENABLE([texture-float],
> > -    [AS_HELP_STRING([--enable-texture-float],
> > -        [enable floating-point textures and renderbuffers
> @<:@default=disabled@:>@])],
> > -    [enable_texture_float="$enableval"],
> > -    [enable_texture_float=no]
> > -)
> > -if test "x$enable_texture_float" = xyes; then
> > -    AC_MSG_WARN([Floating-point textures enabled.])
> > -    AC_MSG_WARN([Please consult docs/patents.txt with your lawyer
> before building Mesa.])
> > -    DEFINES="$DEFINES -DTEXTURE_FLOAT_ENABLED"
> > -fi
> > -
> >  dnl
> >  dnl Arch/platform-specific settings
> >  dnl
> > diff --git a/docs/patents.txt b/docs/patents.txt
> > deleted file mode 100644
> > index 91c5757d14d..00000000000
> > --- a/docs/patents.txt
> > +++ /dev/null
> > @@ -1,31 +0,0 @@
> > -ARB_texture_float:
> > -
> > -    Silicon Graphics, Inc. owns US Patent #6,650,327, issued November
> 18,
> > -    2003 [1].
> > -
> > -    SGI believes this patent contains necessary IP for graphics systems
> > -    implementing floating point rasterization and floating point
> > -    framebuffer capabilities described in ARB_texture_float extension,
> and
> > -    will discuss licensing on RAND terms, on an individual basis with
> > -    companies wishing to use this IP in the context of conformant OpenGL
> > -    implementations [2].
> > -
> > -    The source code to implement ARB_texture_float extension is included
> > -    and can be toggled on at compile time, for those who purchased a
> > -    license from SGI, or are in a country where the patent does not
> apply,
> > -    etc.
> > -
> > -    The software is provided "as is", without warranty of any kind,
> express
> > -    or implied, including but not limited to the warranties of
> > -    merchantability, fitness for a particular purpose and
> noninfringement.
> > -    In no event shall the authors or copyright holders be liable for any
> > -    claim, damages or other liability, whether in an action of contract,
> > -    tort or otherwise, arising from, out of or in connection with the
> > -    software or the use or other dealings in the software.
> > -
> > -    You should contact a lawyer or SGI's legal department if you want to
> > -    enable this extension.
> > -
> > -
> > -[1] https://patents.google.com/patent/US6650327B1
> > -[2] https://www.opengl.org/registry/specs/ARB/texture_float.txt
> > diff --git a/meson.build b/meson.build
> > index 22e7a6d6cda..cd124c7bbe7 100644
> > --- a/meson.build
> > +++ b/meson.build
> > @@ -60,10 +60,6 @@ with_tools = get_option('tools')
> >  if with_tools.contains('all')
> >    with_tools = ['freedreno', 'glsl', 'intel', 'nir', 'nouveau']
> >  endif
> > -if get_option('texture-float')
> > -  pre_args += '-DTEXTURE_FLOAT_ENABLED'
> > -  warning('Floating-point texture enabled. Please consult
> docs/patents.txt and your lawyer before building mesa.')
> > -endif
> >
> >  dri_drivers_path = get_option('dri-drivers-path')
> >  if dri_drivers_path == ''
> > diff --git a/meson_options.txt b/meson_options.txt
> > index bfe2290868f..11d2b198dd0 100644
> > --- a/meson_options.txt
> > +++ b/meson_options.txt
> > @@ -264,12 +264,6 @@ option(
> >    value : false,
> >    description : 'Build unit tests. Currently this will build *all* unit
> tests, which may build more than expected.'
> >  )
> > -option(
> > -  'texture-float',
> > -  type : 'boolean',
> > -  value : false,
> > -  description : 'Enable floating point textures and renderbuffers. This
> option may be patent encumbered, please read docs/patents.txt and consult
> with your lawyer before turning this on.'
> > -)
> >  option(
> >    'selinux',
> >    type : 'boolean',
> > diff --git a/scons/gallium.py b/scons/gallium.py
> > index 6cb20efcbf4..92a762a0c1e 100755
> > --- a/scons/gallium.py
> > +++ b/scons/gallium.py
> > @@ -392,10 +392,6 @@ def generate(env):
> >          cppdefines += ['PIPE_SUBSYSTEM_WINDOWS_USER']
> >      if env['embedded']:
> >          cppdefines += ['PIPE_SUBSYSTEM_EMBEDDED']
> > -    if env['texture_float']:
> > -        print('warning: Floating-point textures enabled.')
> > -        print('warning: Please consult docs/patents.txt with your
> lawyer before building Mesa.')
> > -        cppdefines += ['TEXTURE_FLOAT_ENABLED']
> >      env.Append(CPPDEFINES = cppdefines)
> >
> >      # C compiler options
> > diff --git a/src/gallium/auxiliary/util/u_format.c
> b/src/gallium/auxiliary/util/u_format.c
> > index 369b4c3126b..e0325e9c534 100644
> > --- a/src/gallium/auxiliary/util/u_format.c
> > +++ b/src/gallium/auxiliary/util/u_format.c
> > @@ -242,16 +242,7 @@ util_format_is_supported(enum pipe_format format,
> unsigned bind)
> >        return FALSE;
> >     }
> >
> > -#ifndef TEXTURE_FLOAT_ENABLED
> > -   if ((bind & PIPE_BIND_RENDER_TARGET) &&
> > -       format != PIPE_FORMAT_R9G9B9E5_FLOAT &&
> > -       format != PIPE_FORMAT_R11G11B10_FLOAT &&
> > -       util_format_is_float(format)) {
> > -      return FALSE;
> > -   }
> > -#else
> >     (void)bind;
> > -#endif
> >
> >     return TRUE;
> >  }
> > diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
> > index 38fc52d0205..5c8bd7a8741 100644
> > --- a/src/mesa/main/extensions.c
> > +++ b/src/mesa/main/extensions.c
> > @@ -129,9 +129,7 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
> >     ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE;
> >     ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE;
> >     ctx->Extensions.ARB_texture_filter_anisotropic = GL_TRUE;
> > -#ifdef TEXTURE_FLOAT_ENABLED
> >     ctx->Extensions.ARB_texture_float = GL_TRUE;
> > -#endif
> >     ctx->Extensions.ARB_texture_mirror_clamp_to_edge = GL_TRUE;
> >     ctx->Extensions.ARB_texture_non_power_of_two = GL_TRUE;
> >     ctx->Extensions.ARB_texture_rg = GL_TRUE;
> >
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180625/ce100fb3/attachment-0001.html>


More information about the mesa-dev mailing list