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
e4fe8b5c
Commit
e4fe8b5c
authored
Sep 30, 2016
by
steve-lunarg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a test for buffer auto-binding assignment.
parent
3e47f5f7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
118 additions
and
0 deletions
+118
-0
spv.buffer.autoassign.frag.out
Test/baseResults/spv.buffer.autoassign.frag.out
+89
-0
spv.buffer.autoassign.frag
Test/spv.buffer.autoassign.frag
+28
-0
Spv.FromFile.cpp
gtests/Spv.FromFile.cpp
+1
-0
No files found.
Test/baseResults/spv.buffer.autoassign.frag.out
0 → 100644
View file @
e4fe8b5c
spv.buffer.autoassign.frag
Linked fragment stage:
// Module Version 10000
// Generated by (magic number): 80001
// Id's are bound by 45
Capability Shader
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" 41
ExecutionMode 4 OriginUpperLeft
Name 4 "main"
Name 8 "PS_OUTPUT"
MemberName 8(PS_OUTPUT) 0 "Color"
Name 10 "psout"
Name 13 ""
MemberName 13 0 "g_a"
MemberName 13 1 "g_b"
Name 15 ""
Name 25 ""
MemberName 25 0 "g_c"
Name 27 ""
Name 31 ""
MemberName 31 0 "g_d"
Name 33 ""
Name 41 "Color"
MemberDecorate 13 0 Offset 0
MemberDecorate 13 1 Offset 4
Decorate 13 Block
Decorate 15 DescriptorSet 0
Decorate 15 Binding 20
MemberDecorate 25 0 Offset 0
Decorate 25 Block
Decorate 27 DescriptorSet 0
Decorate 27 Binding 1
MemberDecorate 31 0 Offset 0
Decorate 31 Block
Decorate 33 DescriptorSet 0
Decorate 33 Binding 2
Decorate 41(Color) Location 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 32
7: TypeVector 6(float) 4
8(PS_OUTPUT): TypeStruct 7(fvec4)
9: TypePointer Function 8(PS_OUTPUT)
11: TypeInt 32 1
12: 11(int) Constant 0
13: TypeStruct 6(float) 11(int)
14: TypePointer Uniform 13(struct)
15: 14(ptr) Variable Uniform
16: TypePointer Uniform 6(float)
19: 11(int) Constant 1
20: TypePointer Uniform 11(int)
25: TypeStruct 6(float)
26: TypePointer Uniform 25(struct)
27: 26(ptr) Variable Uniform
31: TypeStruct 6(float)
32: TypePointer Uniform 31(struct)
33: 32(ptr) Variable Uniform
38: TypePointer Function 7(fvec4)
40: TypePointer Output 7(fvec4)
41(Color): 40(ptr) Variable Output
4(main): 2 Function None 3
5: Label
10(psout): 9(ptr) Variable Function
17: 16(ptr) AccessChain 15 12
18: 6(float) Load 17
21: 20(ptr) AccessChain 15 19
22: 11(int) Load 21
23: 6(float) ConvertSToF 22
24: 6(float) FAdd 18 23
28: 16(ptr) AccessChain 27 12
29: 6(float) Load 28
30: 6(float) FAdd 24 29
34: 16(ptr) AccessChain 33 12
35: 6(float) Load 34
36: 6(float) FAdd 30 35
37: 7(fvec4) CompositeConstruct 36 36 36 36
39: 38(ptr) AccessChain 10(psout) 12
Store 39 37
42: 38(ptr) AccessChain 10(psout) 12
43: 7(fvec4) Load 42
Store 41(Color) 43
Return
FunctionEnd
Test/spv.buffer.autoassign.frag
0 → 100644
View file @
e4fe8b5c
cbuffer
MyUB1
:
register
(
b5
)
// explicitly assigned & offsetted
{
float
g_a
;
int
g_b
;
};
cbuffer
MyUB2
// implicitly assigned
{
float
g_c
;
};
cbuffer
MyUB3
// implicitly assigned
{
float
g_d
;
};
struct
PS_OUTPUT
{
float4
Color
:
SV_Target0
;
};
PS_OUTPUT
main
()
{
PS_OUTPUT
psout
;
psout
.
Color
=
g_a
+
g_b
+
g_c
+
g_d
;
return
psout
;
}
gtests/Spv.FromFile.cpp
View file @
e4fe8b5c
...
@@ -284,6 +284,7 @@ INSTANTIATE_TEST_CASE_P(
...
@@ -284,6 +284,7 @@ INSTANTIATE_TEST_CASE_P(
{
"spv.register.autoassign.frag"
,
"main_ep"
,
5
,
10
,
15
,
true
,
false
},
{
"spv.register.autoassign.frag"
,
"main_ep"
,
5
,
10
,
15
,
true
,
false
},
{
"spv.register.noautoassign.frag"
,
"main_ep"
,
5
,
10
,
15
,
false
,
false
},
{
"spv.register.noautoassign.frag"
,
"main_ep"
,
5
,
10
,
15
,
false
,
false
},
{
"spv.register.autoassign-2.frag"
,
"main"
,
5
,
10
,
15
,
true
,
true
},
{
"spv.register.autoassign-2.frag"
,
"main"
,
5
,
10
,
15
,
true
,
true
},
{
"spv.buffer.autoassign.frag"
,
"main"
,
5
,
10
,
15
,
true
,
true
},
}),
}),
FileNameAsCustomTestSuffixIoMap
FileNameAsCustomTestSuffixIoMap
);
);
...
...
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