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
142785f3
Commit
142785f3
authored
Sep 19, 2016
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
HLSL: Change the final syntax-error printf to go to the infoLog.
Fixes issue #510.
parent
28b28140
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
11 deletions
+15
-11
revision.h
glslang/Include/revision.h
+1
-1
InfoSink.cpp
glslang/MachineIndependent/InfoSink.cpp
+12
-8
hlslParseHelper.cpp
hlsl/hlslParseHelper.cpp
+2
-2
No files found.
glslang/Include/revision.h
View file @
142785f3
...
...
@@ -2,5 +2,5 @@
// For the version, it uses the latest git tag followed by the number of commits.
// For the date, it uses the current date (when then script is run).
#define GLSLANG_REVISION "Overload400-PrecQual.149
4
"
#define GLSLANG_REVISION "Overload400-PrecQual.149
5
"
#define GLSLANG_DATE "19-Sep-2016"
glslang/MachineIndependent/InfoSink.cpp
View file @
142785f3
...
...
@@ -38,11 +38,15 @@
namespace
glslang
{
void
TInfoSinkBase
::
append
(
const
char
*
s
)
void
TInfoSinkBase
::
append
(
const
char
*
s
)
{
if
(
outputStream
&
EString
)
{
checkMem
(
strlen
(
s
));
sink
.
append
(
s
);
if
(
s
==
nullptr
)
sink
.
append
(
"(null)"
);
else
{
checkMem
(
strlen
(
s
));
sink
.
append
(
s
);
}
}
//#ifdef _WIN32
...
...
@@ -54,10 +58,10 @@ void TInfoSinkBase::append(const char* s)
fprintf
(
stdout
,
"%s"
,
s
);
}
void
TInfoSinkBase
::
append
(
int
count
,
char
c
)
void
TInfoSinkBase
::
append
(
int
count
,
char
c
)
{
if
(
outputStream
&
EString
)
{
checkMem
(
count
);
checkMem
(
count
);
sink
.
append
(
count
,
c
);
}
...
...
@@ -74,10 +78,10 @@ void TInfoSinkBase::append(int count, char c)
fprintf
(
stdout
,
"%c"
,
c
);
}
void
TInfoSinkBase
::
append
(
const
TPersistString
&
t
)
void
TInfoSinkBase
::
append
(
const
TPersistString
&
t
)
{
if
(
outputStream
&
EString
)
{
checkMem
(
t
.
size
());
checkMem
(
t
.
size
());
sink
.
append
(
t
);
}
...
...
@@ -93,7 +97,7 @@ void TInfoSinkBase::append(const TPersistString& t)
void
TInfoSinkBase
::
append
(
const
TString
&
t
)
{
if
(
outputStream
&
EString
)
{
checkMem
(
t
.
size
());
checkMem
(
t
.
size
());
sink
.
append
(
t
.
c_str
());
}
...
...
hlsl/hlslParseHelper.cpp
View file @
142785f3
...
...
@@ -124,8 +124,8 @@ bool HlslParseContext::parseShaderStrings(TPpContext& ppContext, TInputScanner&
// Print a message formated such that if you click on the message it will take you right to
// the line through most UIs.
const
glslang
::
TSourceLoc
&
sourceLoc
=
input
.
getSourceLoc
();
printf
(
"
\n
%s(%i): error at column %i, HLSL translation failed.
\n
"
,
sourceLoc
.
name
,
sourceLoc
.
line
,
sourceLoc
.
column
)
;
infoSink
.
info
<<
sourceLoc
.
name
<<
"("
<<
sourceLoc
.
line
<<
"): error at column "
<<
sourceLoc
.
column
<<
", HLSL parsing failed.
\n
"
;
++
numErrors
;
return
false
;
}
...
...
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