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
c6c80a6e
Commit
c6c80a6e
authored
Mar 05, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Versioning: Address #1255: Move to semantic versioning.
Still missing is automation and final decisions on mechanisms in general.
parent
41e24fdb
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
19 deletions
+38
-19
GlslangToSpv.cpp
SPIRV/GlslangToSpv.cpp
+3
-1
StandAlone.cpp
StandAlone/StandAlone.cpp
+23
-7
revision.h
glslang/Include/revision.h
+1
-4
ShaderLang.cpp
glslang/MachineIndependent/ShaderLang.cpp
+5
-2
ShaderLang.h
glslang/Public/ShaderLang.h
+5
-0
make-revision
make-revision
+1
-5
No files found.
SPIRV/GlslangToSpv.cpp
View file @
c6c80a6e
...
@@ -6159,7 +6159,9 @@ void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName,
...
@@ -6159,7 +6159,9 @@ void OutputSpvHex(const std::vector<unsigned int>& spirv, const char* baseName,
out
.
open
(
baseName
,
std
::
ios
::
binary
|
std
::
ios
::
out
);
out
.
open
(
baseName
,
std
::
ios
::
binary
|
std
::
ios
::
out
);
if
(
out
.
fail
())
if
(
out
.
fail
())
printf
(
"ERROR: Failed to open file: %s
\n
"
,
baseName
);
printf
(
"ERROR: Failed to open file: %s
\n
"
,
baseName
);
out
<<
"
\t
// "
GLSLANG_REVISION
" "
GLSLANG_DATE
<<
std
::
endl
;
out
<<
"
\t
// "
<<
glslang
::
GetSpirvGeneratorVersion
()
<<
"."
<<
GLSLANG_MINOR_VERSION
<<
"."
<<
GLSLANG_PATCH_LEVEL
<<
std
::
endl
;
if
(
varName
!=
nullptr
)
{
if
(
varName
!=
nullptr
)
{
out
<<
"
\t
#pragma once"
<<
std
::
endl
;
out
<<
"
\t
#pragma once"
<<
std
::
endl
;
out
<<
"const uint32_t "
<<
varName
<<
"[] = {"
<<
std
::
endl
;
out
<<
"const uint32_t "
<<
varName
<<
"[] = {"
<<
std
::
endl
;
...
...
StandAlone/StandAlone.cpp
View file @
c6c80a6e
...
@@ -99,6 +99,7 @@ enum TOptions {
...
@@ -99,6 +99,7 @@ enum TOptions {
EOptionOptimizeDisable
=
(
1
<<
28
),
EOptionOptimizeDisable
=
(
1
<<
28
),
EOptionOptimizeSize
=
(
1
<<
29
),
EOptionOptimizeSize
=
(
1
<<
29
),
EOptionInvertY
=
(
1
<<
30
),
EOptionInvertY
=
(
1
<<
30
),
EOptionDumpBareVersion
=
(
1
<<
31
),
};
};
//
//
...
@@ -449,6 +450,9 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
...
@@ -449,6 +450,9 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
lowerword
==
"hlsl-iomapper"
||
lowerword
==
"hlsl-iomapper"
||
lowerword
==
"hlsl-iomapping"
)
{
lowerword
==
"hlsl-iomapping"
)
{
Options
|=
EOptionHlslIoMapping
;
Options
|=
EOptionHlslIoMapping
;
}
else
if
(
lowerword
==
"invert-y"
||
// synonyms
lowerword
==
"iy"
)
{
Options
|=
EOptionInvertY
;
}
else
if
(
lowerword
==
"keep-uncalled"
||
// synonyms
}
else
if
(
lowerword
==
"keep-uncalled"
||
// synonyms
lowerword
==
"ku"
)
{
lowerword
==
"ku"
)
{
Options
|=
EOptionKeepUncalled
;
Options
|=
EOptionKeepUncalled
;
...
@@ -520,9 +524,8 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
...
@@ -520,9 +524,8 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
variableName
=
argv
[
1
];
variableName
=
argv
[
1
];
bumpArg
();
bumpArg
();
break
;
break
;
}
else
if
(
lowerword
==
"invert-y"
||
// synonyms
}
else
if
(
lowerword
==
"version"
)
{
lowerword
==
"iy"
)
{
Options
|=
EOptionDumpVersions
;
Options
|=
EOptionInvertY
;
}
else
{
}
else
{
usage
();
usage
();
}
}
...
@@ -586,7 +589,11 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
...
@@ -586,7 +589,11 @@ void ProcessArguments(std::vector<std::unique_ptr<glslang::TWorkItem>>& workItem
Options
|=
EOptionDumpConfig
;
Options
|=
EOptionDumpConfig
;
break
;
break
;
case
'd'
:
case
'd'
:
Options
|=
EOptionDefaultDesktop
;
if
(
strncmp
(
&
argv
[
0
][
1
],
"dumpversion"
,
strlen
(
&
argv
[
0
][
1
])
+
1
)
==
0
||
strncmp
(
&
argv
[
0
][
1
],
"dumpfullversion"
,
strlen
(
&
argv
[
0
][
1
])
+
1
)
==
0
)
Options
|=
EOptionDumpBareVersion
;
else
Options
|=
EOptionDefaultDesktop
;
break
;
break
;
case
'e'
:
case
'e'
:
// HLSL todo: entry point handle needs much more sophistication.
// HLSL todo: entry point handle needs much more sophistication.
...
@@ -1046,8 +1053,14 @@ int singleMain()
...
@@ -1046,8 +1053,14 @@ int singleMain()
return
ESuccess
;
return
ESuccess
;
}
}
if
(
Options
&
EOptionDumpVersions
)
{
if
(
Options
&
EOptionDumpBareVersion
)
{
printf
(
"Glslang Version: %s %s
\n
"
,
GLSLANG_REVISION
,
GLSLANG_DATE
);
printf
(
"%d.%d.%d
\n
"
,
glslang
::
GetSpirvGeneratorVersion
(),
GLSLANG_MINOR_VERSION
,
GLSLANG_PATCH_LEVEL
);
if
(
workList
.
empty
())
return
ESuccess
;
}
else
if
(
Options
&
EOptionDumpVersions
)
{
printf
(
"Glslang Version: %d.%d.%d
\n
"
,
glslang
::
GetSpirvGeneratorVersion
(),
GLSLANG_MINOR_VERSION
,
GLSLANG_PATCH_LEVEL
);
printf
(
"ESSL Version: %s
\n
"
,
glslang
::
GetEsslVersionString
());
printf
(
"ESSL Version: %s
\n
"
,
glslang
::
GetEsslVersionString
());
printf
(
"GLSL Version: %s
\n
"
,
glslang
::
GetGlslVersionString
());
printf
(
"GLSL Version: %s
\n
"
,
glslang
::
GetGlslVersionString
());
std
::
string
spirvVersion
;
std
::
string
spirvVersion
;
...
@@ -1313,12 +1326,15 @@ void usage()
...
@@ -1313,12 +1326,15 @@ void usage()
" 'location' (fragile, not cross stage)
\n
"
" 'location' (fragile, not cross stage)
\n
"
" --aml synonym for --auto-map-locations
\n
"
" --aml synonym for --auto-map-locations
\n
"
" --client {vulkan<ver>|opengl<ver>} see -V and -G
\n
"
" --client {vulkan<ver>|opengl<ver>} see -V and -G
\n
"
" -dumpfullversion print bare major.minor.patchlevel
\n
"
" -dumpversion same as -dumpfullversion
\n
"
" --flatten-uniform-arrays flatten uniform texture/sampler arrays to
\n
"
" --flatten-uniform-arrays flatten uniform texture/sampler arrays to
\n
"
" scalars
\n
"
" scalars
\n
"
" --fua synonym for --flatten-uniform-arrays
\n
"
" --fua synonym for --flatten-uniform-arrays
\n
"
" --hlsl-offsets Allow block offsets to follow HLSL rules
\n
"
" --hlsl-offsets Allow block offsets to follow HLSL rules
\n
"
" Works independently of source language
\n
"
" Works independently of source language
\n
"
" --hlsl-iomap Perform IO mapping in HLSL register space
\n
"
" --hlsl-iomap Perform IO mapping in HLSL register space
\n
"
" --invert-y | --iy invert position.Y output in vertex shader
\n
"
" --keep-uncalled don't eliminate uncalled functions
\n
"
" --keep-uncalled don't eliminate uncalled functions
\n
"
" --ku synonym for --keep-uncalled
\n
"
" --ku synonym for --keep-uncalled
\n
"
" --no-storage-format use Unknown image format
\n
"
" --no-storage-format use Unknown image format
\n
"
...
@@ -1365,8 +1381,8 @@ void usage()
...
@@ -1365,8 +1381,8 @@ void usage()
" --variable-name <name> Creates a C header file that contains a
\n
"
" --variable-name <name> Creates a C header file that contains a
\n
"
" uint32_t array named <name>
\n
"
" uint32_t array named <name>
\n
"
" initialized with the shader binary code.
\n
"
" initialized with the shader binary code.
\n
"
" --version synonym for -v
\n
"
" --vn <name> synonym for --variable-name <name>
\n
"
" --vn <name> synonym for --variable-name <name>
\n
"
" --invert-y | --iy invert position.Y output in vertex shader
\n
"
);
);
exit
(
EFailUsage
);
exit
(
EFailUsage
);
...
...
glslang/Include/revision.h
View file @
c6c80a6e
// This header is generated by the make-revision script.
// This header is generated by the make-revision script.
// 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.2000"
#define GLSLANG_PATCH_LEVEL 2583
#define GLSLANG_DATE "12-Apr-2017"
glslang/MachineIndependent/ShaderLang.cpp
View file @
c6c80a6e
...
@@ -1577,14 +1577,17 @@ namespace glslang {
...
@@ -1577,14 +1577,17 @@ namespace glslang {
#include "../Include/revision.h"
#include "../Include/revision.h"
#define QUOTE(s) #s
#define STR(n) QUOTE(n)
const
char
*
GetEsslVersionString
()
const
char
*
GetEsslVersionString
()
{
{
return
"OpenGL ES GLSL 3.20 glslang Khronos.
"
GLSLANG_REVISION
" "
GLSLANG_DATE
;
return
"OpenGL ES GLSL 3.20 glslang Khronos.
"
STR
(
GLSLANG_MINOR_VERSION
)
"."
STR
(
GLSLANG_PATCH_LEVEL
)
;
}
}
const
char
*
GetGlslVersionString
()
const
char
*
GetGlslVersionString
()
{
{
return
"4.60 glslang Khronos.
"
GLSLANG_REVISION
" "
GLSLANG_DATE
;
return
"4.60 glslang Khronos.
"
STR
(
GLSLANG_MINOR_VERSION
)
"."
STR
(
GLSLANG_PATCH_LEVEL
)
;
}
}
int
GetKhronosToolId
()
int
GetKhronosToolId
()
...
...
glslang/Public/ShaderLang.h
View file @
c6c80a6e
...
@@ -67,6 +67,11 @@
...
@@ -67,6 +67,11 @@
extern
"C"
{
extern
"C"
{
#endif
#endif
// This should always increase, as some paths to do not consume
// a more major number.
// It should increment by one when new functionality is added.
#define GLSLANG_MINOR_VERSION 0
//
//
// Call before doing any other compiler/linker operations.
// Call before doing any other compiler/linker operations.
//
//
...
...
make-revision
View file @
c6c80a6e
#!/bin/sh
#!/bin/sh
(
(
echo
"// This header is generated by the make-revision script."
echo
"// This header is generated by the make-revision script."
echo
"// For the version, it uses the latest git tag followed by the number of commits."
echo
"// For the date, it uses the current date (when then script is run)."
echo
echo
echo
\#
define GLSLANG_REVISION
\"
`
git describe
--tags
--abbrev
=
0
`
.
`
git log
--oneline
|
wc
-l
`
\"
echo
\#
define GLSLANG_PATCH_LEVEL
`
git log
--oneline
|
wc
-l
`
echo
\#
define GLSLANG_DATE
\"
`
date
+%d-%b-%Y
`
\"
)
>
glslang/Include/revision.h
)
>
glslang/Include/revision.h
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