Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
glslang
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
glslang
Commits
26ad2680
Commit
26ad2680
authored
Aug 13, 2014
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add -d option for desktop default for missing #version.
git-svn-id:
https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@27729
e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent
be703392
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
StandAlone.cpp
StandAlone/StandAlone.cpp
+7
-10
No files found.
StandAlone/StandAlone.cpp
View file @
26ad2680
...
@@ -66,6 +66,7 @@ enum TOptions {
...
@@ -66,6 +66,7 @@ enum TOptions {
EOptionSuppressWarnings
=
0x200
,
EOptionSuppressWarnings
=
0x200
,
EOptionDumpVersions
=
0x400
,
EOptionDumpVersions
=
0x400
,
EOptionBil
=
0x800
,
EOptionBil
=
0x800
,
EOptionDefaultDesktop
=
0x1000
,
};
};
//
//
...
@@ -446,7 +447,6 @@ glslang::TWorkItem** Work = 0;
...
@@ -446,7 +447,6 @@ glslang::TWorkItem** Work = 0;
int
NumWorkItems
=
0
;
int
NumWorkItems
=
0
;
int
Options
=
0
;
int
Options
=
0
;
bool
Delay
=
false
;
const
char
*
ExecutableName
;
const
char
*
ExecutableName
;
//
//
...
@@ -485,7 +485,7 @@ bool ProcessArguments(int argc, char* argv[])
...
@@ -485,7 +485,7 @@ bool ProcessArguments(int argc, char* argv[])
Options
|=
EOptionDumpConfig
;
Options
|=
EOptionDumpConfig
;
break
;
break
;
case
'd'
:
case
'd'
:
Delay
=
true
;
Options
|=
EOptionDefaultDesktop
;
break
;
break
;
case
'i'
:
case
'i'
:
Options
|=
EOptionIntermediate
;
Options
|=
EOptionIntermediate
;
...
@@ -601,7 +601,7 @@ void CompileAndLinkShaders()
...
@@ -601,7 +601,7 @@ void CompileAndLinkShaders()
shader
->
setStrings
(
shaderStrings
,
1
);
shader
->
setStrings
(
shaderStrings
,
1
);
if
(
!
shader
->
parse
(
&
Resources
,
100
,
false
,
messages
))
if
(
!
shader
->
parse
(
&
Resources
,
(
Options
&
EOptionDefaultDesktop
)
?
110
:
100
,
false
,
messages
))
CompileFailed
=
true
;
CompileFailed
=
true
;
program
.
addShader
(
shader
);
program
.
addShader
(
shader
);
...
@@ -722,9 +722,6 @@ int C_DECL main(int argc, char* argv[])
...
@@ -722,9 +722,6 @@ int C_DECL main(int argc, char* argv[])
ShFinalize
();
ShFinalize
();
}
}
if
(
Delay
)
glslang
::
OS_Sleep
(
1000000
);
if
(
CompileFailed
)
if
(
CompileFailed
)
return
EFailCompile
;
return
EFailCompile
;
if
(
LinkFailed
)
if
(
LinkFailed
)
...
@@ -800,13 +797,13 @@ void CompileFile(const char* fileName, ShHandle compiler)
...
@@ -800,13 +797,13 @@ void CompileFile(const char* fileName, ShHandle compiler)
for
(
int
i
=
0
;
i
<
((
Options
&
EOptionMemoryLeakMode
)
?
100
:
1
);
++
i
)
{
for
(
int
i
=
0
;
i
<
((
Options
&
EOptionMemoryLeakMode
)
?
100
:
1
);
++
i
)
{
for
(
int
j
=
0
;
j
<
((
Options
&
EOptionMemoryLeakMode
)
?
100
:
1
);
++
j
)
{
for
(
int
j
=
0
;
j
<
((
Options
&
EOptionMemoryLeakMode
)
?
100
:
1
);
++
j
)
{
//ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options, 100, false, messages);
//ret = ShCompile(compiler, shaderStrings, NumShaderStrings, lengths, EShOptNone, &Resources, Options,
(Options & EOptionDefaultDesktop) ? 110 :
100, false, messages);
ret
=
ShCompile
(
compiler
,
shaderStrings
,
NumShaderStrings
,
0
,
EShOptNone
,
&
Resources
,
Options
,
100
,
false
,
messages
);
ret
=
ShCompile
(
compiler
,
shaderStrings
,
NumShaderStrings
,
0
,
EShOptNone
,
&
Resources
,
Options
,
(
Options
&
EOptionDefaultDesktop
)
?
110
:
100
,
false
,
messages
);
//const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err",
//const char* multi[12] = { "# ve", "rsion", " 300 e", "s", "\n#err",
// "or should be l", "ine 1", "string 5\n", "float glo", "bal",
// "or should be l", "ine 1", "string 5\n", "float glo", "bal",
// ";\n#error should be line 2\n void main() {", "global = 2.3;}" };
// ";\n#error should be line 2\n void main() {", "global = 2.3;}" };
//const char* multi[7] = { "/", "/", "\\", "\n", "\n", "#", "version 300 es" };
//const char* multi[7] = { "/", "/", "\\", "\n", "\n", "#", "version 300 es" };
//ret = ShCompile(compiler, multi, 7, 0, EShOptNone, &Resources, Options, 100, false, messages);
//ret = ShCompile(compiler, multi, 7, 0, EShOptNone, &Resources, Options,
(Options & EOptionDefaultDesktop) ? 110 :
100, false, messages);
}
}
if
(
Options
&
EOptionMemoryLeakMode
)
if
(
Options
&
EOptionMemoryLeakMode
)
...
@@ -841,8 +838,8 @@ void usage()
...
@@ -841,8 +838,8 @@ 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
\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
"
" -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
"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment