1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

NVIDIA's OpenGL Shader Disk Cache For Linux

NVIDIA

Published on 23 October 2011 09:53 AM EDT
Written by Michael Larabel in NVIDIA
10 Comments

One of the features that NVIDIA introduced in the 290.03 Beta Linux driver that was released on Friday is support for an OpenGL shader disk cache.

NVIDIA's OpenGL shader disk cache option for Linux allows compiled shaders to be cached to the system disk in a temporary area so that they don't need to be re-compiled again later on, which can potentially save time by just pulling these binaries from the disk instead. This OpenGL shader disk cache feature is also supported by the proprietary Solaris and FreeBSD x86/x86_64 drivers, which were also released on Friday at version 290.03 Beta.

For those wondering more about the OpenGL shader disk cache option, below is the information extracted from the NVIDIA 290.03 read-me concerning this feature. This feature is enabled by default when using direct rendering and not running as root, but it can be configured via environmental variables and a xorg.conf option.
The NVIDIA OpenGL driver utilizes a shader disk cache. This optimization benefits some applications, by reusing shader binaries instead of compiling them repeatedly. The related environment variables __GL_SHADER_DISK_CACHE and __GL_SHADER_DISK_CACHE_PATH, as well as the GLShaderDiskCache X configuration option, allow fine-grained configuration of the shader cache behavior. The shader disk cache:

1. is always disabled for indirect rendering

2. is always disabled for setuid and setgid binaries

3. by default, is disabled for direct rendering when the OpenGL application is run as the root user

4. by default, is enabled for direct rendering when the OpenGL application is run as a non-root user

The GLShaderDiskCache X configuration option forcibly enables or disables the shader disk cache, for direct rendering as a non-root user.

By default, caches are stored in $HOME/.nv/GLCache. Caches are persistent across runs of an application. Cached shader binaries are specific to each driver version; changing driver versions will cause binaries to be recompiled.

The following environment variables configure shader disk cache behavior, and override the GLShaderDiskCache configuration option:

Environment Variable Description
---------------------------------- ----------------------------------
__GL_SHADER_DISK_CACHE (boolean) Enables or disables the shader cache for direct rendering.
__GL_SHADER_DISK_CACHE_PATH (string) Enables configuration of where shader caches are stored on disk.

For more information on the other features to this first 290 series Linux/FreeBSD/Solaris driver beta, see the earlier news announcement (and for the download links).

NVIDIA's OpenGL Shader Disk Cache For Linux


About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. Scythe Mugen MAX
  2. Intel Core i7 5960X Haswell-E On Linux
  3. Intel 80GB 530 Series M.2 SSD On Linux
  4. With A New Motherboard, The Core i7 5960X Haswell-E Lights Up
Latest Linux Articles
  1. MSAA RadeonSI Gallium3D Performance Preview
  2. Intel Core i7 5960X CPU Core Scaling Under Linux
  3. AMD RadeonSI Gallium3D Performance For 4K Linux Gaming
  4. 9-Way File-System Comparison With A SSD On The Linux 3.17 Kernel
Latest Linux News
  1. New Code Starts Lining Up For X.Org Server 1.17
  2. Rust Developers Planning For The Rust 1.0 Language
  3. RPM 4.12 Brings New Switches, New Rpm2Archive Utility
  4. Qt 5.3.2 & Qt Creator 3.2.1 Released
  5. Nouveau For Linux 3.18 Gains DP Audio, More Re-Clocking
  6. SUSE Gets Bought Out Again
  7. Enlightenment E19 Officially Released With Its Own Wayland Compositor
  8. OpenMediaVault 1.0 Released As New Linux NAS Alternative
  9. VESA Releases DisplayPort 1.3, Pushes 32.4 Gbits/sec
  10. Opera 25 Beta Has Bookmarks & Linux Support
Latest Forum Discussions
  1. support for first generation UVD blocks (RV6xx, RS780, RS880 and RV790)
  2. Nvidia joins the ranks of Apple and Microsoft
  3. Updated and Optimized Ubuntu Free Graphics Drivers
  4. New Group Calls For Boycotting Systemd
  5. Hd 6850
  6. nv and xorg.conf under Debian PPC
  7. X.Org Is Looking For Some Female Help
  8. FSF Issues Their Rebuttal To Apple's New iPhone, Watch & Apple Pay