Non-functional misc. changes. Slight increase in performance from moving two performance path methods into a header.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27835 e7fa87d3-cd2b-0410-9028-fcbf551c1848
diff --git a/StandAlone/StandAlone.cpp b/StandAlone/StandAlone.cpp
index 06710f5..7f349fc 100644
--- a/StandAlone/StandAlone.cpp
+++ b/StandAlone/StandAlone.cpp
@@ -41,6 +41,7 @@
#include "./../glslang/Include/ShHandle.h"
#include "./../glslang/Public/ShaderLang.h"
#include "../BIL/GlslangToBil.h"
+#include "../BIL/BilDisassemble.h"
#include <string.h>
#include <stdlib.h>
#include <math.h>
@@ -637,8 +638,22 @@
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));
+ if (program.getIntermediate((EShLanguage)stage)) {
+ std::vector<unsigned int> bil;
+ glslang::GlslangToBil(*program.getIntermediate((EShLanguage)stage), bil);
+ const char* name;
+ switch (stage) {
+ case EShLangVertex: name = "vert"; break;
+ case EShLangTessControl: name = "tesc"; break;
+ case EShLangTessEvaluation: name = "tese"; break;
+ case EShLangGeometry: name = "geom"; break;
+ case EShLangFragment: name = "frag"; break;
+ case EShLangCompute: name = "comp"; break;
+ default: name = "unknown"; break;
+ }
+ glbil::Disassemble(std::cout, bil);
+ glslang::OutputBil(bil, name);
+ }
}
}
}