Create dummy side project.
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27519 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
@@ -16,7 +16,8 @@ add_executable(glslangValidator ${SOURCES})
|
||||
set(LIBRARIES
|
||||
glslang
|
||||
OGLCompiler
|
||||
OSDependent)
|
||||
OSDependent
|
||||
BIL)
|
||||
|
||||
if(WIN32)
|
||||
set(LIBRARIES ${LIBRARIES} psapi)
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -48,6 +48,7 @@ namespace glslang {
|
||||
name(s) { }
|
||||
std::string name;
|
||||
std::string results;
|
||||
std::string resultsIndex;
|
||||
};
|
||||
|
||||
class TWorklist {
|
||||
|
||||
Reference in New Issue
Block a user