Add option for printing documentation (empty).
git-svn-id: https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27966 e7fa87d3-cd2b-0410-9028-fcbf551c1848
This commit is contained in:
parent
5bb0356ef4
commit
01fd50e4f2
@ -9,6 +9,7 @@ set(SOURCES
|
|||||||
BilDoc.cpp)
|
BilDoc.cpp)
|
||||||
|
|
||||||
set(HEADERS
|
set(HEADERS
|
||||||
|
Bil.h
|
||||||
GlslangToBil.h
|
GlslangToBil.h
|
||||||
BilBuilder.h
|
BilBuilder.h
|
||||||
Bir.h
|
Bir.h
|
||||||
|
@ -42,6 +42,7 @@
|
|||||||
#include "./../glslang/Public/ShaderLang.h"
|
#include "./../glslang/Public/ShaderLang.h"
|
||||||
#include "../BIL/GlslangToBil.h"
|
#include "../BIL/GlslangToBil.h"
|
||||||
#include "../BIL/BilDisassemble.h"
|
#include "../BIL/BilDisassemble.h"
|
||||||
|
#include "../BIL/BilDoc.h"
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
@ -498,6 +499,11 @@ bool ProcessArguments(int argc, char* argv[])
|
|||||||
case 'm':
|
case 'm':
|
||||||
Options |= EOptionMemoryLeakMode;
|
Options |= EOptionMemoryLeakMode;
|
||||||
break;
|
break;
|
||||||
|
case 'p':
|
||||||
|
glbil::Parameterize();
|
||||||
|
glbil::PrintDoc();
|
||||||
|
exit(0);
|
||||||
|
break;
|
||||||
case 'q':
|
case 'q':
|
||||||
Options |= EOptionDumpReflection;
|
Options |= EOptionDumpReflection;
|
||||||
break;
|
break;
|
||||||
@ -638,6 +644,7 @@ void CompileAndLinkShaders()
|
|||||||
if (CompileFailed || LinkFailed)
|
if (CompileFailed || LinkFailed)
|
||||||
printf("Bil is not generated for failed compile or link\n");
|
printf("Bil is not generated for failed compile or link\n");
|
||||||
else {
|
else {
|
||||||
|
glbil::Parameterize();
|
||||||
for (int stage = 0; stage < EShLangCount; ++stage) {
|
for (int stage = 0; stage < EShLangCount; ++stage) {
|
||||||
if (program.getIntermediate((EShLanguage)stage)) {
|
if (program.getIntermediate((EShLanguage)stage)) {
|
||||||
std::vector<unsigned int> bil;
|
std::vector<unsigned int> bil;
|
||||||
@ -854,11 +861,13 @@ void usage()
|
|||||||
"\n"
|
"\n"
|
||||||
"To get other information, use one of the following options:\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"
|
"(Each option must be specified separately, but can go anywhere in the command line.)\n"
|
||||||
|
" -b create BIL in file <stage>.bil and print out disassembly\n"
|
||||||
" -c configuration dump; use to create default configuration file (redirect to a .conf file)\n"
|
" -c configuration dump; use to create default configuration file (redirect to a .conf file)\n"
|
||||||
" -d default to desktop (#version 110) when there is no version in the shader (default is ES version 100)\n"
|
" -d default to desktop (#version 110) when there is no version in the shader (default is ES version 100)\n"
|
||||||
" -i intermediate tree (glslang AST) is printed out\n"
|
" -i intermediate tree (glslang AST) is printed out\n"
|
||||||
" -l link validation of all input files\n"
|
" -l link validation of all input files\n"
|
||||||
" -m memory leak mode\n"
|
" -m memory leak mode\n"
|
||||||
|
" -p print BIL documentation\n"
|
||||||
" -q dump reflection query database\n"
|
" -q dump reflection query database\n"
|
||||||
" -r relaxed semantic error-checking mode\n"
|
" -r relaxed semantic error-checking mode\n"
|
||||||
" -s silent mode\n"
|
" -s silent mode\n"
|
||||||
|
3
Test/makeDoc
Normal file
3
Test/makeDoc
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
./glslangValidator -p > instDesc
|
||||||
|
asciidoc --backend=html5 instDesc
|
Loading…
x
Reference in New Issue
Block a user