Subversion Repositories Kolibri OS

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5563 serge 1
2
3
4
  
5
  Environment Variables
6
  
7
8
9
 
10
11
  

The Mesa 3D Graphics Library

12
13
 
14
15
16
 
17

Environment Variables

18
 
19

20
Normally, no environment variables need to be set.  Most of the environment
21
variables used by Mesa/Gallium are for debugging purposes, but they can
22
sometimes be useful for debugging end-user issues.
23

24
 
25
 
26

LibGL environment variables

27
 
28
    29
  • LIBGL_DEBUG - If defined debug information will be printed to stderr.
  • 30
       If set to 'verbose' additional information will be printed.
    31
  • LIBGL_DRIVERS_PATH - colon-separated list of paths to search for DRI drivers
  • 32
  • LIBGL_ALWAYS_INDIRECT - forces an indirect rendering context/connection.
  • 33
  • LIBGL_ALWAYS_SOFTWARE - if set, always use software rendering
  • 34
  • LIBGL_NO_DRAWARRAYS - if set do not use DrawArrays GLX protocol (for debugging)
  • 35
  • LIBGL_SHOW_FPS - print framerate to stdout based on the number of glXSwapBuffers
  • 36
        calls per second.
    37
    38
     
    39
     
    40
     
    41

    Core Mesa environment variables

    42
     
    43
      44
    • MESA_NO_ASM - if set, disables all assembly language optimizations
    • 45
    • MESA_NO_MMX - if set, disables Intel MMX optimizations
    • 46
    • MESA_NO_3DNOW - if set, disables AMD 3DNow! optimizations
    • 47
    • MESA_NO_SSE - if set, disables Intel SSE optimizations
    • 48
    • MESA_DEBUG - if set, error messages are printed to stderr. For example,
    • 49
         if the application generates a GL_INVALID_ENUM error, a corresponding error
      50
         message indicating where the error occured, and possibly why, will be
      51
         printed to stderr.
      52
         If the value of MESA_DEBUG is 'FP' floating point arithmetic errors will
      53
         generate exceptions.
      54
    • MESA_LOG_FILE - specifies a file name for logging all errors, warnings,
    • 55
      etc., rather than stderr
      56
    • MESA_TEX_PROG - if set, implement conventional texture env modes with
    • 57
      fragment programs (intended for developers only)
      58
    • MESA_TNL_PROG - if set, implement conventional vertex transformation
    • 59
      operations with vertex programs (intended for developers only).
      60
      Setting this variable automatically sets the MESA_TEX_PROG variable as well.
      61
    • MESA_EXTENSION_OVERRIDE - can be used to enable/disable extensions.
    • 62
      A value such as "GL_EXT_foo -GL_EXT_bar" will enable the GL_EXT_foo extension
      63
      and disable the GL_EXT_bar extension.
      64
    • MESA_EXTENSION_MAX_YEAR - The GL_EXTENSIONS string returned by Mesa is sorted
    • 65
      by extension year.
      66
      If this variable is set to year X, only extensions defined on or before year
      67
      X will be reported.
      68
      This is to work-around a bug in some games where the extension string is
      69
      copied into a fixed-size buffer without truncating.
      70
      If the extension string is too long, the buffer overrun can cause the game
      71
      to crash.
      72
      This is a work-around for that.
      73
    • MESA_GL_VERSION_OVERRIDE - changes the value returned by
    • 74
      glGetString(GL_VERSION) and possibly the GL API type.
      75
        76
      • The format should be MAJOR.MINOR[FC]
      • 77
      • FC is an optional suffix that indicates a forward compatible context.
      • 78
        This is only valid for versions >= 3.0.
        79
      • GL versions < 3.0 are set to a compatibility (non-Core) profile
      • 80
      • GL versions = 3.0, see below
      • 81
      • GL versions > 3.0 are set to a Core profile
      • 82
      • Examples: 2.1, 3.0, 3.0FC, 3.1, 3.1FC
      • 83
          84
        • 2.1 - select a compatibility (non-Core) profile with GL version 2.1
        • 85
        • 3.0 - select a compatibility (non-Core) profile with GL version 3.0
        • 86
        • 3.0FC - select a Core+Forward Compatible profile with GL version 3.0
        • 87
        • 3.1 - select a Core profile with GL version 3.1
        • 88
        • 3.1FC - select a Core+Forward Compatible profile with GL version 3.1
        • 89
          90
        • Mesa may not really implement all the features of the given version.
        • 91
          (for developers only)
          92
          93
        • MESA_GLSL_VERSION_OVERRIDE - changes the value returned by
        • 94
          glGetString(GL_SHADING_LANGUAGE_VERSION). Valid values are integers, such as
          95
          "130".  Mesa will not really implement all the features of the given language version
          96
          if it's higher than what's normally reported. (for developers only)
          97
        • MESA_GLSL - shading language compiler options
        • 98
          99
           
          100
           
          101

          Mesa Xlib driver environment variables

          102
           
          103

          104
          The following are only applicable to the Mesa Xlib software driver.
          105
          See the Xlib software driver page for details.
          106

          107
            108
          • MESA_RGB_VISUAL - specifies the X visual and depth for RGB mode
          • 109
          • MESA_CI_VISUAL - specifies the X visual and depth for CI mode
          • 110
          • MESA_BACK_BUFFER - specifies how to implement the back color buffer,
          • 111
                either "pixmap" or "ximage"
            112
          • MESA_GAMMA - gamma correction coefficients for red, green, blue channels
          • 113
          • MESA_XSYNC - enable synchronous X behavior (for debugging only)
          • 114
          • MESA_GLX_FORCE_CI - if set, force GLX to treat 8bpp visuals as CI visuals
          • 115
          • MESA_GLX_FORCE_ALPHA - if set, forces RGB windows to have an alpha channel.
          • 116
          • MESA_GLX_DEPTH_BITS - specifies default number of bits for depth buffer.
          • 117
          • MESA_GLX_ALPHA_BITS - specifies default number of bits for alpha channel.
          • 118
            119
             
            120
             
            121

            i945/i965 driver environment variables (non-Gallium)

            122
             
            123
              124
            • INTEL_STRICT_CONFORMANCE - if set to 1, enable sw fallbacks to improve
            • 125
                  OpenGL conformance.  If set to 2, always use software rendering.
              126
            • INTEL_NO_BLIT - if set, disable hardware-accelerated glBitmap,
            • 127
                  glCopyPixels, glDrawPixels.
              128
              129
               
              130
               
              131

              Radeon driver environment variables (radeon, r200, and r300g)

              132
               
              133
                134
              • RADEON_NO_TCL - if set, disable hardware-accelerated Transform/Clip/Lighting.
              • 135
                136
                 
                137
                 
                138

                EGL environment variables

                139
                 
                140

                141
                Mesa EGL supports different sets of environment variables.  See the
                142
                Mesa EGL page for the details.
                143

                144
                 
                145
                 
                146

                Gallium environment variables

                147
                 
                148
                  149
                • GALLIUM_HUD - draws various information on the screen, like framerate,
                • 150
                      cpu load, driver statistics, performance counters, etc.
                  151
                      Set GALLIUM_HUD=help and run e.g. glxgears for more info.
                  152
                • GALLIUM_LOG_FILE - specifies a file for logging all errors, warnings, etc.
                • 153
                      rather than stderr.
                  154
                • GALLIUM_PRINT_OPTIONS - if non-zero, print all the Gallium environment
                • 155
                      variables which are used, and their current values.
                  156
                • GALLIUM_DUMP_CPU - if non-zero, print information about the CPU on start-up
                • 157
                • TGSI_PRINT_SANITY - if set, do extra sanity checking on TGSI shaders and
                • 158
                      print any errors to stderr.
                  159
                • DRAW_FSE - ???
                • 160
                • DRAW_NO_FSE - ???
                • 161
                • DRAW_USE_LLVM - if set to zero, the draw module will not use LLVM to execute
                • 162
                      shaders, vertex fetch, etc.
                  163
                • ST_DEBUG - controls debug output from the Mesa/Gallium state tracker.
                • 164
                  Setting to "tgsi", for example, will print all the TGSI shaders.
                  165
                  See src/mesa/state_tracker/st_debug.c for other options.
                  166
                  167
                   
                  168

                  Softpipe driver environment variables

                  169
                    170
                  • SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
                  • 171
                        to stderr
                    172
                  • SOFTPIPE_DUMP_GS - if set, the softpipe driver will print geometry shaders
                  • 173
                        to stderr
                    174
                  • SOFTPIPE_NO_RAST - if set, rasterization is no-op'd. For profiling purposes.
                  • 175
                  • SOFTPIPE_USE_LLVM - if set, the softpipe driver will try to use LLVM JIT for
                  • 176
                        vertex shading procesing.
                    177
                    178
                     
                    179
                     
                    180

                    LLVMpipe driver environment variables

                    181
                      182
                    • LP_NO_RAST - if set LLVMpipe will no-op rasterization
                    • 183
                    • LP_DEBUG - a comma-separated list of debug options is acceptec. See the
                    • 184
                          source code for details.
                      185
                    • LP_PERF - a comma-separated list of options to selectively no-op various
                    • 186
                          parts of the driver.  See the source code for details.
                      187
                    • LP_NUM_THREADS - an integer indicating how many threads to use for rendering.
                    • 188
                          Zero turns of threading completely.  The default value is the number of CPU
                      189
                          cores present.
                      190
                      191
                       
                      192

                      VMware SVGA driver environment variables

                      193
                        194
                      • SVGA_FORCE_SWTNL - force use of software vertex transformation
                      • 195
                      • SVGA_NO_SWTNL - don't allow software vertex transformation fallbacks
                      • 196
                        (will often result in incorrect rendering).
                        197
                      • SVGA_DEBUG - for dumping shaders, constant buffers, etc. See the code
                      • 198
                        for details.
                        199
                      • See the driver code for other, lesser-used variables.
                      • 200
                        201
                         
                        202
                         
                        203

                        204
                        Other Gallium drivers have their own environment variables.  These may change
                        205
                        frequently so the source code should be consulted for details.
                        206

                        207
                         
                        208
                        209
                        210