mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2024-11-23 18:24:13 +08:00
mesa: Unconditionally enable floating-point textures
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 Reviewed-by: Matt Turner <mattst88@gmail.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
This commit is contained in:
parent
b8e099e7d5
commit
66673bef94
15
configure.ac
15
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
|
||||
|
@ -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
|
@ -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 == ''
|
||||
|
@ -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',
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user