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
3beac945
Commit
3beac945
authored
Apr 17, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Infrastructure: If using .hlsl suffix, default is -D.
parent
4c574708
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
StandAlone.cpp
StandAlone/StandAlone.cpp
+6
-4
runtests
Test/runtests
+1
-1
No files found.
StandAlone/StandAlone.cpp
View file @
3beac945
...
@@ -1214,11 +1214,13 @@ EShLanguage FindLanguage(const std::string& name, bool parseStageName)
...
@@ -1214,11 +1214,13 @@ EShLanguage FindLanguage(const std::string& name, bool parseStageName)
bool
hasSecondExt
=
secondExtStart
!=
std
::
string
::
npos
;
bool
hasSecondExt
=
secondExtStart
!=
std
::
string
::
npos
;
std
::
string
firstExt
=
name
.
substr
(
firstExtStart
+
1
,
std
::
string
::
npos
);
std
::
string
firstExt
=
name
.
substr
(
firstExtStart
+
1
,
std
::
string
::
npos
);
bool
usesUnifiedExt
=
hasFirstExt
&&
(
firstExt
==
"glsl"
||
firstExt
==
"hlsl"
);
bool
usesUnifiedExt
=
hasFirstExt
&&
(
firstExt
==
"glsl"
||
firstExt
==
"hlsl"
);
if
(
hasFirstExt
&&
!
usesUnifiedExt
)
{
if
(
usesUnifiedExt
&&
firstExt
==
"hlsl"
)
Options
|=
EOptionReadHlsl
;
if
(
hasFirstExt
&&
!
usesUnifiedExt
)
stageName
=
firstExt
;
stageName
=
firstExt
;
}
else
if
(
usesUnifiedExt
&&
hasSecondExt
)
{
else
if
(
usesUnifiedExt
&&
hasSecondExt
)
stageName
=
name
.
substr
(
secondExtStart
+
1
,
firstExtStart
-
secondExtStart
-
1
);
stageName
=
name
.
substr
(
secondExtStart
+
1
,
firstExtStart
-
secondExtStart
-
1
);
}
else
{
else
{
usage
();
usage
();
return
EShLangVertex
;
return
EShLangVertex
;
}
}
...
@@ -1311,7 +1313,7 @@ void usage()
...
@@ -1311,7 +1313,7 @@ void usage()
"
\n
"
"
\n
"
"Options:
\n
"
"Options:
\n
"
" -C cascading errors; risk crash from accumulation of error recoveries
\n
"
" -C cascading errors; risk crash from accumulation of error recoveries
\n
"
" -D input is HLSL
\n
"
" -D input is HLSL
(default when any suffix is .hlsl)
\n
"
" -D<macro=def>
\n
"
" -D<macro=def>
\n
"
" -D<macro> define a pre-processor macro
\n
"
" -D<macro> define a pre-processor macro
\n
"
" -E print pre-processed GLSL; cannot be used with -l;
\n
"
" -E print pre-processed GLSL; cannot be used with -l;
\n
"
...
...
Test/runtests
View file @
3beac945
...
@@ -81,7 +81,7 @@ $EXE -i -S vert nosuffix > $TARGETDIR/nosuffix.out
...
@@ -81,7 +81,7 @@ $EXE -i -S vert nosuffix > $TARGETDIR/nosuffix.out
diff
-b
$BASEDIR
/nosuffix.out
$TARGETDIR
/nosuffix.out
||
HASERROR
=
1
diff
-b
$BASEDIR
/nosuffix.out
$TARGETDIR
/nosuffix.out
||
HASERROR
=
1
$EXE
-i
compoundsuffix.vert.glsl
>
$TARGETDIR
/compoundsuffix.vert.glsl
$EXE
-i
compoundsuffix.vert.glsl
>
$TARGETDIR
/compoundsuffix.vert.glsl
diff
-b
$BASEDIR
/compoundsuffix.vert.glsl
$TARGETDIR
/compoundsuffix.vert.glsl
||
HASERROR
=
1
diff
-b
$BASEDIR
/compoundsuffix.vert.glsl
$TARGETDIR
/compoundsuffix.vert.glsl
||
HASERROR
=
1
$EXE
-
D
-
e
main
-H
compoundsuffix.frag.hlsl
>
$TARGETDIR
/compoundsuffix.frag.hlsl
$EXE
-e
main
-H
compoundsuffix.frag.hlsl
>
$TARGETDIR
/compoundsuffix.frag.hlsl
diff
-b
$BASEDIR
/compoundsuffix.frag.hlsl
$TARGETDIR
/compoundsuffix.frag.hlsl
||
HASERROR
=
1
diff
-b
$BASEDIR
/compoundsuffix.frag.hlsl
$TARGETDIR
/compoundsuffix.frag.hlsl
||
HASERROR
=
1
#
#
...
...
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