scons: Add option to enable floating-point textures.
authorVinson Lee <vlee@freedesktop.org>
Sun, 12 Aug 2012 07:02:32 +0000 (00:02 -0700)
committerVinson Lee <vlee@freedesktop.org>
Thu, 16 Aug 2012 05:04:24 +0000 (22:04 -0700)
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Reviewed-by: José Fonseca <jfonseca@vmware.com>
common.py
scons/gallium.py

index 6121a41140338bfc4a3fd7b78bf3f7769e60b5bb..6ff9608c41338508dc499a7da42991abb4e45fbe 100644 (file)
--- a/common.py
+++ b/common.py
@@ -98,5 +98,6 @@ def AddOptions(opts):
        opts.Add(BoolOption('debug', 'DEPRECATED: debug build', 'yes'))
        opts.Add(BoolOption('profile', 'DEPRECATED: profile build', 'no'))
        opts.Add(BoolOption('quiet', 'DEPRECATED: profile build', 'yes'))
+       opts.Add(BoolOption('texture_float', 'enable floating-point textures and renderbuffers', 'no'))
        if host_platform == 'windows':
                opts.Add(EnumOption('MSVS_VERSION', 'MS Visual C++ version', None, allowed_values=('7.1', '8.0', '9.0')))
index f4776d83d7fbf396e095c4110be0f55e20bdbbdf..8fc17b3fa4a0e354803e0e0d1c7b7b5fcca44522 100755 (executable)
@@ -298,6 +298,10 @@ def generate(env):
         cppdefines += ['BEOS_THREADS']
     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