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
66cdf365
Commit
66cdf365
authored
Dec 04, 2013
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Detect and give error on second occurrence of #version.
git-svn-id:
https://cvs.khronos.org/svn/repos/ogl/trunk/ecosystem/public/sdk/tools/glslang@24347
e7fa87d3-cd2b-0410-9028-fcbf551c1848
parent
ef9c8ab2
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
12 additions
and
7 deletions
+12
-7
100.frag
Test/100.frag
+1
-1
420.vert
Test/420.vert
+1
-1
100.frag.out
Test/baseResults/100.frag.out
+2
-1
420.vert.out
Test/baseResults/420.vert.out
+2
-1
revision.h
glslang/Include/revision.h
+2
-2
Pp.cpp
glslang/MachineIndependent/preprocessor/Pp.cpp
+2
-1
PpContext.cpp
glslang/MachineIndependent/preprocessor/PpContext.cpp
+1
-0
PpContext.h
glslang/MachineIndependent/preprocessor/PpContext.h
+1
-0
No files found.
Test/100.frag
View file @
66cdf365
// okay
#version 100
int
a
[
3
]
=
{
2
,
3
,
4
,
};
// ERROR
#version 100
int
uint
;
attribute
vec4
v
[
3
];
// ERROR
...
...
Test/420.vert
View file @
66cdf365
#version 420 core
#version 420 core
varying
vec2
v2
;
// ERROR, varying reserved
in
vec4
bad
[
10
];
highp
in
vec4
badorder
;
...
...
Test/baseResults/100.frag.out
View file @
66cdf365
...
...
@@ -2,6 +2,7 @@
ERROR: 0:3: '{ } style initializers' : not supported with this profile: es
ERROR: 0:3: 'initializer' : not supported for this version or the enabled extensions
ERROR: 0:3: 'array initializer' : not supported for this version or the enabled extensions
ERROR: 0:4: '#version' : must occur first in shader
ERROR: 0:7: 'attribute' : not supported in this stage: fragment
ERROR: 0:7: 'float' : type requires declaration of default precision qualifier
ERROR: 0:9: '=' : cannot convert from 'const int' to 'mediump float'
...
...
@@ -66,7 +67,7 @@ ERROR: 0:167: 'highp' : overloaded functions must have the same parameter precis
ERROR: 0:170: 'multiple prototypes for same function' : not supported for this version or the enabled extensions
ERROR: 0:177: 'multiple prototypes for same function' : not supported for this version or the enabled extensions
ERROR: 0:179: '' : syntax error
ERROR: 6
0
compilation errors. No code generated.
ERROR: 6
1
compilation errors. No code generated.
ERROR: node is still EOpNull!
...
...
Test/baseResults/420.vert.out
View file @
66cdf365
420.vert
Warning, version 420 is not yet complete; some version-specific features are present, but many are missing.
ERROR: 0:2: '#version' : must occur first in shader
WARNING: 0:3: varying deprecated in version 130; may be removed in future release
ERROR: 0:3: 'varying' : no longer supported in core profile; removed in version 420
ERROR: 0:7: '' : vertex input cannot be further qualified
...
...
@@ -27,7 +28,7 @@ ERROR: 0:70: 'binding' : requires uniform or buffer storage qualifier
ERROR: 0:71: 'binding' : binding is too large
ERROR: 0:74: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits
ERROR: 0:76: 'binding' : sampler binding not less than gl_MaxCombinedTextureImageUnits (using array)
ERROR: 2
6
compilation errors. No code generated.
ERROR: 2
7
compilation errors. No code generated.
ERROR: node is still EOpNull!
...
...
glslang/Include/revision.h
View file @
66cdf365
...
...
@@ -9,5 +9,5 @@
// source have to figure out how to create revision.h just to get a build
// going. However, if it is not updated, it can be a version behind.
#define GLSLANG_REVISION "2434
2
"
#define GLSLANG_DATE "2013/12/04 12:4
3:05
"
#define GLSLANG_REVISION "2434
3
"
#define GLSLANG_DATE "2013/12/04 12:4
6:19
"
glslang/MachineIndependent/preprocessor/Pp.cpp
View file @
66cdf365
...
...
@@ -694,8 +694,9 @@ int TPpContext::CPPversion(TPpToken* ppToken)
{
int
token
=
currentInput
->
scan
(
this
,
currentInput
,
ppToken
);
if
(
errorOnVersion
)
if
(
errorOnVersion
||
versionSeen
)
parseContext
.
error
(
ppToken
->
loc
,
"must occur first in shader"
,
"#version"
,
""
);
versionSeen
=
true
;
if
(
token
==
'\n'
)
{
parseContext
.
error
(
ppToken
->
loc
,
"must be followed by version number"
,
"#version"
,
""
);
...
...
glslang/MachineIndependent/preprocessor/PpContext.cpp
View file @
66cdf365
...
...
@@ -155,6 +155,7 @@ void TPpContext::setInput(TInputScanner& input, bool versionWillBeError)
in
->
prev
=
currentInput
;
currentInput
=
in
;
errorOnVersion
=
versionWillBeError
;
versionSeen
=
false
;
}
}
// end namespace glslang
glslang/MachineIndependent/preprocessor/PpContext.h
View file @
66cdf365
...
...
@@ -208,6 +208,7 @@ protected:
InputSrc
*
currentInput
;
bool
errorOnVersion
;
bool
versionSeen
;
//
// from Pp.cpp
...
...
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