<commit_before># Build Instructions
This project fully supports Linux today.
Support for Windows is for the loader and layers (additional info below).  Additional Windows support will be coming in Q1'15.
Support for Android is TBD.

##Linux System Requirements
Ubuntu 14.10 needed for DRI 3

```
sudo apt-get install git subversion cmake libgl1-mesa-dev freeglut3-dev libglm-dev libpng12-dev libmagickwand-dev qt5-default
sudo apt-get build-dep mesa
```
Warning: Recent versions of 14.10 have **REMOVED** DRI 3.  
Version: 2:2.99.914-1~exp1ubuntu4.1 is known to work.  
To see status of this package:
```
dpkg -s xserver-xorg-video-intel
```

Note:  
Version 2:2.99.914-1~exp1ubuntu4.2 does not work anymore.  
To install the working driver from launchpadlibrarian.net:  
- Remove the current driver:  
```
sudo apt-get purge xserver-xorg-video-intel
```
- Download the old driver:  
```
wget http://launchpadlibrarian.net/189418339/xserver-xorg-video-intel_2.99.914-1%7Eexp1ubuntu4.1_amd64.deb
```
- Install the driver:
```
sudo dpkg -i xserver-xorg-video-intel_2.99.914-1~exp1ubuntu4.1_amd64.deb
```
- Either restart Ubuntu or just X11.  
  
##Linux Build

The sample driver uses cmake and should work with the usual cmake options and utilities.
The standard build process builds the icd, the icd loader and all the tests.

Example debug build:
```
cd xgl  # cd to the root of the xgl git repository
export KHRONOS_ACCOUNT_NAME= <subversion login name for svn checkout of BIL>
./update_external_sources.sh  # fetches and builds glslang, llvm, LunarGLASS, and BIL
cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug
cd dbuild
make
```

To run XGL programs you must tell the icd loader where to find the libraries. Set the
environment variable LIBXGL_DRIVERS_PATH to the driver path. For example:
```
export LIBXGL_DRIVERS_PATH=$PWD/icd/intel
```

To enable debug and validation layers with your XGL programs you must tell the icd loader
where to find the layer libraries. Set the environment variable LIBXGL_LAYERS_PATH to
the layer folder and indicate the layers you want loaded via LIBXGL_LAYER_NAMES.
For example, to enable the APIDump and DrawState layers, do:
```
export LIBXGL_LAYERS_PATH=$PWD/layers<commit_msg>Update BUILD.md<commit_after># Build Instructions
This project fully supports Linux today.
Support for Windows is for the loader and layers (additional info below).  Additional Windows support will be coming in Q1'15.
Support for Android is TBD.

##Linux System Requirements
Ubuntu 14.10 needed for DRI 3

```
sudo apt-get install git subversion cmake libgl1-mesa-dev freeglut3-dev libglm-dev libpng12-dev libmagickwand-dev qt5-default
sudo apt-get build-dep mesa
```
Warning: Recent versions of 14.10 have **REMOVED** DRI 3.  
Version: 2:2.99.914-1~exp1ubuntu4.1 is known to work.  
To see status of this package:
```
dpkg -s xserver-xorg-video-intel
```

Note:  
Version 2:2.99.914-1~exp1ubuntu4.2 does not work anymore.  
To install the working driver from launchpadlibrarian.net:  
- Remove the current driver:  
```
sudo apt-get purge xserver-xorg-video-intel
```
- Download the old driver:  
```
wget http://launchpadlibrarian.net/189418339/xserver-xorg-video-intel_2.99.914-1%7Eexp1ubuntu4.1_amd64.deb
```
- Install the driver:
```
sudo dpkg -i xserver-xorg-video-intel_2.99.914-1~exp1ubuntu4.1_amd64.deb
```
- Either restart Ubuntu or just X11.  
  
##Linux Build

The sample driver uses cmake and should work with the usual cmake options and utilities.
The standard build process builds the icd, the icd loader and all the tests.

Example debug build:
```
cd GL-Next  # cd to the root of the xgl git repository
export KHRONOS_ACCOUNT_NAME= <subversion login name for svn checkout of BIL>
./update_external_sources.sh  # fetches and builds glslang, llvm, LunarGLASS, and BIL
cmake -H. -Bdbuild -DCMAKE_BUILD_TYPE=Debug
cd dbuild
make
```

To run XGL programs you must tell the icd loader where to find the libraries. Set the
environment variable LIBXGL_DRIVERS_PATH to the driver path. For example:
```
export LIBXGL_DRIVERS_PATH=$PWD/icd/intel
```

To enable debug and validation layers with your XGL programs you must tell the icd loader
where to find the layer libraries. Set the environment variable LIBXGL_LAYERS_PATH to
the layer folder and indicate the layers you want loaded via LIBXGL_LAYER_NAMES.
For example, to enable the APIDump and DrawState layers, do:
```
export LIBXGL_LAYERS_PATH=$PWD/layers
{'fraction_non_alphanumeric': 0.07859078590785908, 'fraction_numerical': 0.03432700993676603, 'mean_word_length': 4.4679012345679014, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '991610', 'n_tokens_mistral': 1584, 'n_tokens_neox': 1425, 'n_words': 550}