diff --git a/BIL/Bil.h b/BIL/Bil.h
new file mode 100644
index 0000000000000000000000000000000000000000..f9ab2c4a12665cf0ad1b7059c5f830c86dea6fd0
--- /dev/null
+++ b/BIL/Bil.h
@@ -0,0 +1,6 @@
+
+#pragma once
+#ifndef Bil_H
+#define Bil_H
+
+#endif // Bil_H
diff --git a/BIL/BilBuilder.cpp b/BIL/BilBuilder.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..e39c9f15f4d5a0c22a1365e6ed202f6fbe5a1044
--- /dev/null
+++ b/BIL/BilBuilder.cpp
@@ -0,0 +1,59 @@
+//
+//Copyright (C) 2014 LunarG, Inc.
+//
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+//POSSIBILITY OF SUCH DAMAGE.
+
+#include <assert.h>
+
+#include "BilBuilder.h"
+
+#ifndef _WIN32
+    #include <cstdio>
+#endif
+
+namespace glbil {
+
+Builder::Builder()
+{
+}
+
+Builder::~Builder()
+{
+}
+
+void MissingFunctionality(const char* fun)
+{
+    printf("Missing functionality: %s\n", fun);
+    exit(1);
+}
+
+}; // end glbil namespace
diff --git a/BIL/BilBuilder.h b/BIL/BilBuilder.h
new file mode 100644
index 0000000000000000000000000000000000000000..ba993d4bb5d99842b562a3e25fc712740dbee40b
--- /dev/null
+++ b/BIL/BilBuilder.h
@@ -0,0 +1,56 @@
+//
+//Copyright (C) 2014 LunarG, Inc.
+//
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+//POSSIBILITY OF SUCH DAMAGE.
+
+#pragma once
+#ifndef BilBuilder_H
+#define BilBuilder_H
+
+#include "Bil.h"
+#include "Bir.h"
+
+#include <stack>
+
+namespace glbil {
+
+class Builder {
+public:
+    Builder();
+    virtual ~Builder();
+};
+
+void MissingFunctionality(const char*);
+
+};  // end glbil namespace
+
+#endif // BilBuilder_H
diff --git a/BIL/BilDisassemble.cpp b/BIL/BilDisassemble.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..6425b86528a03986fd1987e79982f861ba366d4d
--- /dev/null
+++ b/BIL/BilDisassemble.cpp
@@ -0,0 +1,35 @@
+//
+//Copyright (C) 2014 LunarG, Inc.
+//
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+//POSSIBILITY OF SUCH DAMAGE.
+
+#include "BilDisassemble.h"
diff --git a/BIL/BilDisassemble.h b/BIL/BilDisassemble.h
new file mode 100644
index 0000000000000000000000000000000000000000..3400675e567238297759ed74c154ccc94cb25bb1
--- /dev/null
+++ b/BIL/BilDisassemble.h
@@ -0,0 +1,36 @@
+//
+//Copyright (C) 2014 LunarG, Inc.
+//
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+//POSSIBILITY OF SUCH DAMAGE.
+
+#include "Bil.h"
+
diff --git a/BIL/Bir.h b/BIL/Bir.h
new file mode 100644
index 0000000000000000000000000000000000000000..eee9dece0005b000b700d4e35799387bec2f2f1c
--- /dev/null
+++ b/BIL/Bir.h
@@ -0,0 +1,49 @@
+//
+//Copyright (C) 2014 LunarG, Inc.
+//
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+//POSSIBILITY OF SUCH DAMAGE.
+
+#pragma once
+#ifndef Bir_H
+#define Bir_H
+
+#include "Bil.h"
+
+#include <vector>
+#include <iostream>
+
+namespace glbil {
+
+
+};  // end glbil namespace
+
+#endif // Bir_H
diff --git a/BIL/CMakeLists.txt b/BIL/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..a6b4251c2a210025738e005a1d09cd0eebb45c27
--- /dev/null
+++ b/BIL/CMakeLists.txt
@@ -0,0 +1,23 @@
+cmake_minimum_required(VERSION 2.8)
+
+include_directories(.. ${CMAKE_CURRENT_BINARY_DIR})
+
+set(SOURCES
+    GlslangToBil.cpp
+    BilBuilder.cpp
+    BilDisassemble.cpp)
+
+set(HEADERS
+    GlslangToBil.h
+    BilBuilder.h
+    Bir.h
+    BilDisassemble.h)
+
+add_library(BIL STATIC ${SOURCES} ${HEADERS})
+
+if(WIN32)
+    source_group("Source" FILES ${SOURCES} ${HEADERS})
+endif(WIN32)
+
+install(TARGETS BIL
+        ARCHIVE DESTINATION lib)
diff --git a/BIL/GlslangToBil.cpp b/BIL/GlslangToBil.cpp
new file mode 100644
index 0000000000000000000000000000000000000000..bb48a6efede3c9b2a028499b687d9cbbd6145cb4
--- /dev/null
+++ b/BIL/GlslangToBil.cpp
@@ -0,0 +1,50 @@
+//
+//Copyright (C) 2014 LunarG, Inc.
+//
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+//POSSIBILITY OF SUCH DAMAGE.
+
+#include "Bil.h"
+#include "GlslangToBil.h"
+#include "BilBuilder.h"
+#include "BilDisassemble.h"
+
+// Glslang includes
+#include "glslang/MachineIndependent/localintermediate.h"
+#include "glslang/MachineIndependent/SymbolTable.h"
+
+namespace glslang {
+
+void GlslangToBil(const glslang::TIntermediate& intermediate)
+{
+}
+
+}; // end namespace glslang
diff --git a/BIL/GlslangToBil.h b/BIL/GlslangToBil.h
new file mode 100644
index 0000000000000000000000000000000000000000..b030fe380b9b560b5032eadea79ee6f7055cbba6
--- /dev/null
+++ b/BIL/GlslangToBil.h
@@ -0,0 +1,41 @@
+//
+//Copyright (C) 2014 LunarG, Inc.
+//
+//All rights reserved.
+//
+//Redistribution and use in source and binary forms, with or without
+//modification, are permitted provided that the following conditions
+//are met:
+//
+//    Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+//
+//    Redistributions in binary form must reproduce the above
+//    copyright notice, this list of conditions and the following
+//    disclaimer in the documentation and/or other materials provided
+//    with the distribution.
+//
+//    Neither the name of 3Dlabs Inc. Ltd. nor the names of its
+//    contributors may be used to endorse or promote products derived
+//    from this software without specific prior written permission.
+//
+//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+//"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+//LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
+//FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+//COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
+//INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+//BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+//LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+//CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+//LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+//ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+//POSSIBILITY OF SUCH DAMAGE.
+
+#include "../glslang/Include/intermediate.h"
+
+namespace glslang {
+
+void GlslangToBil(const glslang::TIntermediate& intermediate);
+
+};
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2746f8b6dc446685349169ec60e9cde9dca70cdc..d852c48011f68b2cd5c301abf68593c7ca999194 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,3 +16,4 @@ endif(WIN32)
 add_subdirectory(glslang)
 add_subdirectory(OGLCompilersDLL)
 add_subdirectory(StandAlone)
+add_subdirectory(BIL)
diff --git a/StandAlone/CMakeLists.txt b/StandAlone/CMakeLists.txt
index 4c60c4a192890c80906eac64e2fcef46cf95f93f..ec4ba66626ca3020232f716919c5bf170df614a2 100644
--- a/StandAlone/CMakeLists.txt
+++ b/StandAlone/CMakeLists.txt
@@ -16,7 +16,8 @@ add_executable(glslangValidator ${SOURCES})
 set(LIBRARIES
     glslang
     OGLCompiler
-    OSDependent)
+    OSDependent
+    BIL)
 
 if(WIN32)
     set(LIBRARIES ${LIBRARIES} psapi)
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index 10da8e16da19fab6b61a0836b0021a1fc8be74c0..8d3f5cac8e58d25be8affde27f14a7c94c68fd4c 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -40,6 +40,7 @@
 #include "Worklist.h"
 #include "./../glslang/Include/ShHandle.h"
 #include "./../glslang/Public/ShaderLang.h"
+#include "../BIL/GlslangToBil.h"
 #include <string.h>
 #include <stdlib.h>
 #include <math.h>
@@ -64,6 +65,7 @@ enum TOptions {
     EOptionDumpReflection     = 0x100,
     EOptionSuppressWarnings   = 0x200,
     EOptionDumpVersions       = 0x400,
+    EOptionBil                = 0x800,
 };
 
 //
@@ -464,6 +466,9 @@ bool ProcessArguments(int argc, char* argv[])
         Work[argc] = 0;
         if (argv[0][0] == '-') {
             switch (argv[0][1]) {
+            case 'b':
+                Options |= EOptionBil;
+                break;
             case 'c':
                 Options |= EOptionDumpConfig;
                 break;
@@ -615,6 +620,17 @@ void CompileAndLinkShaders()
         program.dumpReflection();
     }
 
+    if (Options & EOptionBil) {
+        if (CompileFailed || LinkFailed)
+            printf("Bil is not generated for failed compile or link\n");
+        else {
+            for (int stage = 0; stage < EShLangCount; ++stage) {
+                if (program.getIntermediate((EShLanguage)stage))
+                    glslang::GlslangToBil(*program.getIntermediate((EShLanguage)stage));
+            }
+        }
+    }
+
     // Free everything up, program has to go before the shaders
     // because it might have merged stuff from the shaders, and
     // the stuff from the shaders has to have its destructors called
@@ -813,6 +829,7 @@ void usage()
            "\n"
            "To get other information, use one of the following options:\n"
            "(Each option must be specified separately, but can go anywhere in the command line.)\n"
+           "  -b  create BIL\n"
            "  -c  configuration dump; use to create default configuration file (redirect to a .conf file)\n"
            "  -i  intermediate tree (glslang AST) is printed out\n"
            "  -l  link validation of all input files\n"
diff --git a/StandAlone/Worklist.h b/StandAlone/Worklist.h
index 1dabec99f4041fbd80dcaee9261789efdf76d6f7..c3040076ade5b36ea1861ecf4f287a18c6c03e02 100644
--- a/StandAlone/Worklist.h
+++ b/StandAlone/Worklist.h
@@ -48,6 +48,7 @@ namespace glslang {
             name(s) { }
         std::string name;
         std::string results;
+        std::string resultsIndex;
     };
 
     class TWorklist {
diff --git a/Todo.txt b/Todo.txt
index 6549c97251dd2b57aa64c633367f4ad4377f6007..afd370a6fe75dd4e512da6eb8694c80c4e90315c 100644
--- a/Todo.txt
+++ b/Todo.txt
@@ -1,5 +1,8 @@
 Current functionality level: ESSL 3.0, GLSL 1.5
 
+Bugs
+ - implicitly-sized gl_ClipDistance[] (at least in tessellation shaders) with sizes greater than one are not getting sizes greater than one
+
 + create version system
 
 Link Validation
diff --git a/glslang/Include/Types.h b/glslang/Include/Types.h
index 42ce63bdf8847594e6698e790cc0e08475148058..9ab22ebbac25d94db4b41a21e627201f1b629e19 100644
--- a/glslang/Include/Types.h
+++ b/glslang/Include/Types.h
@@ -479,6 +479,10 @@ public:
         return layoutLocation  != layoutLocationEnd ||
                layoutComponent != layoutComponentEnd;
     }
+    bool hasComponent() const
+    {
+        return layoutComponent != layoutComponentEnd;
+    }
     bool hasBinding() const
     {
         return layoutBinding != layoutBindingEnd;