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