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
This commit is contained in:
John Kessenich
2014-08-24 18:21:00 +00:00
parent 5041bcb35d
commit a7a68a9b32
8 changed files with 116 additions and 78 deletions

View File

@@ -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 @@ void CompileAndLinkShaders()
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);
}
}
}
}