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
1dcd1623
Commit
1dcd1623
authored
Apr 09, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GLSL/SPV: no location on atomic_uint; Fix #1339.
parent
b92ce60f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
9 deletions
+19
-9
spv.noBuiltInLoc.vert.out
Test/baseResults/spv.noBuiltInLoc.vert.out
+16
-9
spv.noBuiltInLoc.vert
Test/spv.noBuiltInLoc.vert
+2
-0
iomapper.cpp
glslang/MachineIndependent/iomapper.cpp
+1
-0
No files found.
Test/baseResults/spv.noBuiltInLoc.vert.out
View file @
1dcd1623
spv.noBuiltInLoc.vert
spv.noBuiltInLoc.vert
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80006
// Generated by (magic number): 80006
// Id's are bound by 3
3
// Id's are bound by 3
5
Capability Shader
Capability Shader
Capability AtomicStorage
1: ExtInstImport "GLSL.std.450"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main" 9 11 18 3
1 32
EntryPoint Vertex 4 "main" 9 11 18 3
3 34
Source GLSL 450
Source GLSL 450
Name 4 "main"
Name 4 "main"
Name 9 "bar"
Name 9 "bar"
...
@@ -20,8 +21,9 @@ spv.noBuiltInLoc.vert
...
@@ -20,8 +21,9 @@ spv.noBuiltInLoc.vert
Name 24 "uv1"
Name 24 "uv1"
Name 26 "uv2"
Name 26 "uv2"
Name 29 "uv3"
Name 29 "uv3"
Name 31 "gl_VertexID"
Name 31 "a_uint"
Name 32 "gl_InstanceID"
Name 33 "gl_VertexID"
Name 34 "gl_InstanceID"
Decorate 9(bar) Location 0
Decorate 9(bar) Location 0
Decorate 11(foo) Location 0
Decorate 11(foo) Location 0
MemberDecorate 16(gl_PerVertex) 0 BuiltIn Position
MemberDecorate 16(gl_PerVertex) 0 BuiltIn Position
...
@@ -35,8 +37,11 @@ spv.noBuiltInLoc.vert
...
@@ -35,8 +37,11 @@ spv.noBuiltInLoc.vert
Decorate 26(uv2) DescriptorSet 0
Decorate 26(uv2) DescriptorSet 0
Decorate 29(uv3) Location 2
Decorate 29(uv3) Location 2
Decorate 29(uv3) DescriptorSet 0
Decorate 29(uv3) DescriptorSet 0
Decorate 31(gl_VertexID) BuiltIn VertexId
Decorate 31(a_uint) Offset 0
Decorate 32(gl_InstanceID) BuiltIn InstanceId
Decorate 31(a_uint) DescriptorSet 0
Decorate 31(a_uint) Binding 0
Decorate 33(gl_VertexID) BuiltIn VertexId
Decorate 34(gl_InstanceID) BuiltIn InstanceId
2: TypeVoid
2: TypeVoid
3: TypeFunction 2
3: TypeFunction 2
6: TypeFloat 32
6: TypeFloat 32
...
@@ -60,9 +65,11 @@ spv.noBuiltInLoc.vert
...
@@ -60,9 +65,11 @@ spv.noBuiltInLoc.vert
27: TypeVector 6(float) 3
27: TypeVector 6(float) 3
28: TypePointer UniformConstant 27(fvec3)
28: TypePointer UniformConstant 27(fvec3)
29(uv3): 28(ptr) Variable UniformConstant
29(uv3): 28(ptr) Variable UniformConstant
30: TypePointer Input 19(int)
30: TypePointer AtomicCounter 13(int)
31(gl_VertexID): 30(ptr) Variable Input
31(a_uint): 30(ptr) Variable AtomicCounter
32(gl_InstanceID): 30(ptr) Variable Input
32: TypePointer Input 19(int)
33(gl_VertexID): 32(ptr) Variable Input
34(gl_InstanceID): 32(ptr) Variable Input
4(main): 2 Function None 3
4(main): 2 Function None 3
5: Label
5: Label
12: 7(fvec4) Load 11(foo)
12: 7(fvec4) Load 11(foo)
...
...
Test/spv.noBuiltInLoc.vert
View file @
1dcd1623
...
@@ -10,6 +10,8 @@ uniform vec4 uv1;
...
@@ -10,6 +10,8 @@ uniform vec4 uv1;
uniform
float
uv2
;
uniform
float
uv2
;
uniform
vec3
uv3
;
uniform
vec3
uv3
;
layout
(
binding
=
0
)
uniform
atomic_uint
a_uint
;
void
main
()
void
main
()
{
{
bar
=
foo
;
bar
=
foo
;
...
...
glslang/MachineIndependent/iomapper.cpp
View file @
1dcd1623
...
@@ -432,6 +432,7 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver
...
@@ -432,6 +432,7 @@ struct TDefaultIoResolverBase : public glslang::TIoMapResolver
// no locations added if already present, a built-in variable, a block, or an opaque
// no locations added if already present, a built-in variable, a block, or an opaque
if
(
type
.
getQualifier
().
hasLocation
()
||
type
.
isBuiltIn
()
||
if
(
type
.
getQualifier
().
hasLocation
()
||
type
.
isBuiltIn
()
||
type
.
getBasicType
()
==
EbtBlock
||
type
.
getBasicType
()
==
EbtBlock
||
type
.
getBasicType
()
==
EbtAtomicUint
||
(
type
.
containsOpaque
()
&&
intermediate
.
getSpv
().
openGl
==
0
))
(
type
.
containsOpaque
()
&&
intermediate
.
getSpv
().
openGl
==
0
))
return
-
1
;
return
-
1
;
...
...
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