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
086febc4
Commit
086febc4
authored
Oct 25, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PP: Fix #155: Don't give error on HLSL PP-only parsing.
parent
a08f465d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
10 deletions
+8
-10
StandAlone.cpp
StandAlone/StandAlone.cpp
+6
-4
hlsl.pp.expand.frag.err
Test/baseResults/hlsl.pp.expand.frag.err
+0
-3
runtests
Test/runtests
+2
-0
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+0
-3
No files found.
StandAlone/StandAlone.cpp
100644 → 100755
View file @
086febc4
...
...
@@ -961,8 +961,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
includer
.
pushExternalLocalDirectory
(
dir
);
});
if
(
Options
&
EOptionOutputPreprocessed
)
{
std
::
string
str
;
if
(
shader
->
preprocess
(
&
Resources
,
defaultVersion
,
ENoProfile
,
false
,
false
,
messages
,
&
str
,
includer
))
{
if
(
shader
->
preprocess
(
&
Resources
,
defaultVersion
,
ENoProfile
,
false
,
false
,
messages
,
&
str
,
includer
))
{
PutsIfNonEmpty
(
str
.
c_str
());
}
else
{
CompileFailed
=
true
;
...
...
@@ -971,6 +970,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
StderrIfNonEmpty
(
shader
->
getInfoDebugLog
());
continue
;
}
if
(
!
shader
->
parse
(
&
Resources
,
defaultVersion
,
false
,
messages
,
includer
))
CompileFailed
=
true
;
...
...
@@ -1167,13 +1167,15 @@ int singleMain()
ProcessConfigFile
();
if
((
Options
&
EOptionReadHlsl
)
&&
!
((
Options
&
EOptionOutputPreprocessed
)
||
(
Options
&
EOptionSpv
)))
Error
(
"ERROR: HLSL requires SPIR-V code generation (or preprocessing only)"
);
//
// Two modes:
// 1) linking all arguments together, single-threaded, new C++ interface
// 2) independent arguments, can be tackled by multiple asynchronous threads, for testing thread safety, using the old handle interface
//
if
(
Options
&
EOptionLinkProgram
||
Options
&
EOptionOutputPreprocessed
)
{
if
(
Options
&
(
EOptionLinkProgram
|
EOptionOutputPreprocessed
))
{
glslang
::
InitializeProcess
();
glslang
::
InitializeProcess
();
// also test reference counting of users
glslang
::
InitializeProcess
();
// also test reference counting of users
...
...
Test/baseResults/hlsl.pp.expand.frag.err
View file @
086febc4
ERROR: HLSL currently only supported when requesting SPIR-V for Vulkan.
ERROR: HLSL currently only supported when requesting SPIR-V for Vulkan.
Test/runtests
View file @
086febc4
...
...
@@ -208,6 +208,7 @@ diff -b $BASEDIR/hlsl.y-negate-3.vert.out $TARGETDIR/hlsl.y-negate-3.vert.out ||
#
# Testing hlsl_functionality1
#
echo
"Testing hlsl_functionality1"
$EXE
-H
-e
main
-D
-Od
-fhlsl_functionality1
hlsl.structbuffer.incdec.frag
>
\
$TARGETDIR
/hlsl.structbuffer.incdec.frag.hlslfun1.out
diff
-b
$BASEDIR
/hlsl.structbuffer.incdec.frag.hlslfun1.out
$TARGETDIR
/hlsl.structbuffer.incdec.frag.hlslfun1.out
||
HASERROR
=
1
...
...
@@ -218,6 +219,7 @@ diff -b $BASEDIR/hlsl.noSemantic.functionality1.comp.out $TARGETDIR/hlsl.noSeman
#
# Testing HLSL-specific PP feature expansion
#
echo
"Testing HLSL-specific PP feature expansion"
$EXE
-D
-E
hlsl.pp.expand.frag
>
$TARGETDIR
/hlsl.pp.expand.frag.out 2>
$TARGETDIR
/hlsl.pp.expand.frag.err
diff
-b
$BASEDIR
/hlsl.pp.expand.frag.out
$TARGETDIR
/hlsl.pp.expand.frag.out
||
HASERROR
=
1
diff
-b
$BASEDIR
/hlsl.pp.expand.frag.err
$TARGETDIR
/hlsl.pp.expand.frag.err
||
HASERROR
=
1
...
...
hlsl/hlslParseHelper.cpp
100644 → 100755
View file @
086febc4
...
...
@@ -97,9 +97,6 @@ HlslParseContext::HlslParseContext(TSymbolTable& symbolTable, TIntermediate& int
if
(
language
==
EShLangGeometry
)
globalOutputDefaults
.
layoutStream
=
0
;
if
(
spvVersion
.
spv
==
0
||
spvVersion
.
vulkan
==
0
)
infoSink
.
info
<<
"ERROR: HLSL currently only supported when requesting SPIR-V for Vulkan.
\n
"
;
}
HlslParseContext
::~
HlslParseContext
()
...
...
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