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
0f8d43e5
Commit
0f8d43e5
authored
Apr 12, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL/Vulkan: Enforce no location aliasing in vertex inputs.
parent
5d3babdb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
vulkan.vert.out
Test/baseResults/vulkan.vert.out
+2
-1
vulkan.vert
Test/vulkan.vert
+2
-0
linkValidate.cpp
glslang/MachineIndependent/linkValidate.cpp
+2
-2
No files found.
Test/baseResults/vulkan.vert.out
View file @
0f8d43e5
...
@@ -36,7 +36,8 @@ ERROR: 0:51: '[]' : only outermost dimension of an array of arrays can be a spec
...
@@ -36,7 +36,8 @@ ERROR: 0:51: '[]' : only outermost dimension of an array of arrays can be a spec
ERROR: 0:54: '[]' : only outermost dimension of an array of arrays can be a specialization constant
ERROR: 0:54: '[]' : only outermost dimension of an array of arrays can be a specialization constant
ERROR: 0:54: 'location' : SPIR-V requires location for user input/output
ERROR: 0:54: 'location' : SPIR-V requires location for user input/output
ERROR: 0:58: 'location' : SPIR-V requires location for user input/output
ERROR: 0:58: 'location' : SPIR-V requires location for user input/output
ERROR: 37 compilation errors. No code generated.
ERROR: 0:65: 'location' : overlapping use of location 10
ERROR: 38 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link
SPIR-V is not generated for failed compile or link
Test/vulkan.vert
View file @
0f8d43e5
...
@@ -61,3 +61,5 @@ out ban2 {
...
@@ -61,3 +61,5 @@ out ban2 {
layout
(
binding
=
3000
)
uniform
sampler2D
s3000
;
layout
(
binding
=
3000
)
uniform
sampler2D
s3000
;
layout
(
binding
=
3001
)
uniform
b3001
{
int
a
;
};
layout
(
binding
=
3001
)
uniform
b3001
{
int
a
;
};
layout
(
location
=
10
)
in
vec4
in1
;
layout
(
location
=
10
)
in
vec4
in2
;
// ERROR, no location aliasing
glslang/MachineIndependent/linkValidate.cpp
View file @
0f8d43e5
...
@@ -847,8 +847,8 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
...
@@ -847,8 +847,8 @@ int TIntermediate::addUsedLocation(const TQualifier& qualifier, const TType& typ
// combine location and component ranges
// combine location and component ranges
TIoRange
range
(
locationRange
,
componentRange
,
type
.
getBasicType
(),
qualifier
.
hasIndex
()
?
qualifier
.
layoutIndex
:
0
);
TIoRange
range
(
locationRange
,
componentRange
,
type
.
getBasicType
(),
qualifier
.
hasIndex
()
?
qualifier
.
layoutIndex
:
0
);
// check for collisions, except for vertex inputs on desktop
// check for collisions, except for vertex inputs on desktop
targeting OpenGL
if
(
!
(
profile
!=
EEsProfile
&&
language
==
EShLangVertex
&&
qualifier
.
isPipeInput
()))
if
(
!
(
profile
!=
EEsProfile
&&
language
==
EShLangVertex
&&
qualifier
.
isPipeInput
())
||
spvVersion
.
vulkan
>
0
)
collision
=
checkLocationRange
(
set
,
range
,
type
,
typeCollision
);
collision
=
checkLocationRange
(
set
,
range
,
type
,
typeCollision
);
if
(
collision
<
0
)
if
(
collision
<
0
)
...
...
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