Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
glslang
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CodeLinaro
public-release-test-restored
platform
external
deqp-deps
glslang
Commits
7c9129bc
Commit
7c9129bc
authored
7 years ago
by
John Kessenich
Browse files
Options
Downloads
Patches
Plain Diff
SPV: Fix #904: Correctly check for built-in block redeclations for location check.
parent
84cc15f0
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Test/spv.noLocation.vert
+11
-5
11 additions, 5 deletions
Test/spv.noLocation.vert
glslang/MachineIndependent/ParseHelper.cpp
+3
-1
3 additions, 1 deletion
glslang/MachineIndependent/ParseHelper.cpp
with
14 additions
and
6 deletions
Test/spv.noLocation.vert
+
11
−
5
View file @
7c9129bc
#version 450
layout
(
location
=
1
)
in
vec4
in1
;
in
vec4
in2
;
in
vec4
in2
;
// ERROR
layout
(
location
=
3
)
in
vec4
in3
;
layout
(
location
=
1
)
out
vec4
out1
;
out
vec4
out2
;
out
vec4
out2
;
// ERROR
layout
(
location
=
3
)
out
vec4
out3
;
layout
(
location
=
10
)
out
inb1
{
...
...
@@ -16,18 +16,24 @@ out inb2 {
layout
(
location
=
12
)
vec4
a
;
layout
(
location
=
13
)
vec4
b
;
}
inbi2
;
out
inb3
{
out
inb3
{
// ERROR
vec4
a
;
vec4
b
;
}
inbi3
;
layout
(
location
=
14
)
out
struct
S1
{
vec4
a
;
}
s1
;
out
struct
S2
{
vec4
a
;
}
s2
;
out
struct
S2
{
vec4
a
;
}
s2
;
// ERROR
struct
SS
{
int
a
;
};
out
layout
(
location
=
15
)
SS
ss1
;
out
SS
ss2
;
out
SS
ss2
;
// ERROR
out
gl_PerVertex
{
vec4
gl_Position
;
float
gl_ClipDistance
[
2
];
};
void
main
()
{
gl_ClipDistance
[
0
]
=
1
.
0
;
}
This diff is collapsed.
Click to expand it.
glslang/MachineIndependent/ParseHelper.cpp
+
3
−
1
View file @
7c9129bc
...
...
@@ -4343,7 +4343,9 @@ void TParseContext::layoutObjectCheck(const TSourceLoc& loc, const TSymbol& symb
switch
(
qualifier
.
storage
)
{
case
EvqVaryingIn
:
case
EvqVaryingOut
:
if
(
type
.
getBasicType
()
!=
EbtBlock
||
!
(
*
type
.
getStruct
())[
0
].
type
->
getQualifier
().
hasLocation
())
if
(
type
.
getBasicType
()
!=
EbtBlock
||
(
!
(
*
type
.
getStruct
())[
0
].
type
->
getQualifier
().
hasLocation
()
&&
(
*
type
.
getStruct
())[
0
].
type
->
getQualifier
().
builtIn
==
EbvNone
))
error
(
loc
,
"SPIR-V requires location for user input/output"
,
"location"
,
""
);
break
;
default:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment