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
8f674e82
Commit
8f674e82
authored
Feb 18, 2017
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix issue #676: emit error message on failure to open spv file.
parent
0302bdf0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+4
-0
StandAlone.cpp
StandAlone/StandAlone.cpp
+3
-3
revision.h
glslang/Include/revision.h
+2
-2
No files found.
SPIRV/GlslangToSpv.cpp
View file @
8f674e82
...
...
@@ -5319,6 +5319,8 @@ void OutputSpvBin(const std::vector<unsigned int>& spirv, const char* baseName)
{
std
::
ofstream
out
;
out
.
open
(
baseName
,
std
::
ios
::
binary
|
std
::
ios
::
out
);
if
(
out
.
fail
())
printf
(
"ERROR: Failed to open file: %s
\n
"
,
baseName
);
for
(
int
i
=
0
;
i
<
(
int
)
spirv
.
size
();
++
i
)
{
unsigned
int
word
=
spirv
[
i
];
out
.
write
((
const
char
*
)
&
word
,
4
);
...
...
@@ -5331,6 +5333,8 @@ void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName,
{
std
::
ofstream
out
;
out
.
open
(
baseName
,
std
::
ios
::
binary
|
std
::
ios
::
out
);
if
(
out
.
fail
())
printf
(
"ERROR: Failed to open file: %s
\n
"
,
baseName
);
out
<<
"
\t
// "
GLSLANG_REVISION
" "
GLSLANG_DATE
<<
std
::
endl
;
if
(
varName
!=
nullptr
)
{
out
<<
"
\t
#pragma once"
<<
std
::
endl
;
...
...
StandAlone/StandAlone.cpp
View file @
8f674e82
...
...
@@ -662,7 +662,7 @@ void CompileAndLinkShaderUnits(std::vector<ShaderCompUnit> compUnits)
if
(
!
(
Options
&
EOptionMemoryLeakMode
))
{
printf
(
"%s"
,
logger
.
getAllMessages
().
c_str
());
if
(
Options
&
EOptionOutputHexadecimal
)
{
glslang
::
OutputSpvHex
(
spirv
,
GetBinaryName
((
EShLanguage
)
stage
),
variableName
);
glslang
::
OutputSpvHex
(
spirv
,
GetBinaryName
((
EShLanguage
)
stage
),
variableName
);
}
else
{
glslang
::
OutputSpvBin
(
spirv
,
GetBinaryName
((
EShLanguage
)
stage
));
}
...
...
@@ -999,8 +999,8 @@ void usage()
"
\n
"
" --keep-uncalled don't eliminate uncalled functions when linking
\n
"
" --ku synonym for --keep-uncalled
\n
"
" --variable-name <name> Creates a C header file that contains a uint32_t array named <name> initialized with the shader binary code.
\n
"
" --vn <name> synonym for --variable-name <name>.
\n
"
" --variable-name <name> Creates a C header file that contains a uint32_t array named <name> initialized with the shader binary code.
\n
"
" --vn <name> synonym for --variable-name <name>.
\n
"
);
exit
(
EFailUsage
);
...
...
glslang/Include/revision.h
View file @
8f674e82
...
...
@@ -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.184
2
"
#define GLSLANG_DATE "1
7
-Feb-2017"
#define GLSLANG_REVISION "Overload400-PrecQual.184
3
"
#define GLSLANG_DATE "1
8
-Feb-2017"
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