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
e045c23a
Commit
e045c23a
authored
Nov 27, 2018
by
John Kessenich
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SPV: Generate OpArrayLength with no signedness.
parent
d41a8dca
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
48 deletions
+36
-48
SpvBuilder.cpp
SPIRV/SpvBuilder.cpp
+1
-1
hlsl.structbuffer.byte.frag.out
Test/baseResults/hlsl.structbuffer.byte.frag.out
+27
-31
hlsl.structbuffer.coherent.frag.out
Test/baseResults/hlsl.structbuffer.coherent.frag.out
+1
-5
hlsl.structbuffer.frag.out
Test/baseResults/hlsl.structbuffer.frag.out
+1
-5
hlsl.structbuffer.rw.frag.out
Test/baseResults/hlsl.structbuffer.rw.frag.out
+1
-5
hlsl.structbuffer.rwbyte.frag.out
Test/baseResults/hlsl.structbuffer.rwbyte.frag.out
+0
-0
spv.310.comp.out
Test/baseResults/spv.310.comp.out
+5
-1
No files found.
SPIRV/SpvBuilder.cpp
100644 → 100755
View file @
e045c23a
...
@@ -1293,7 +1293,7 @@ Id Builder::createAccessChain(StorageClass storageClass, Id base, const std::vec
...
@@ -1293,7 +1293,7 @@ Id Builder::createAccessChain(StorageClass storageClass, Id base, const std::vec
Id
Builder
::
createArrayLength
(
Id
base
,
unsigned
int
member
)
Id
Builder
::
createArrayLength
(
Id
base
,
unsigned
int
member
)
{
{
spv
::
Id
intType
=
make
I
ntType
(
32
);
spv
::
Id
intType
=
make
Ui
ntType
(
32
);
Instruction
*
length
=
new
Instruction
(
getUniqueId
(),
intType
,
OpArrayLength
);
Instruction
*
length
=
new
Instruction
(
getUniqueId
(),
intType
,
OpArrayLength
);
length
->
addIdOperand
(
base
);
length
->
addIdOperand
(
base
);
length
->
addImmediateOperand
(
member
);
length
->
addImmediateOperand
(
member
);
...
...
Test/baseResults/hlsl.structbuffer.byte.frag.out
View file @
e045c23a
...
@@ -323,10 +323,6 @@ gl_FragCoord origin is upper left
...
@@ -323,10 +323,6 @@ gl_FragCoord origin is upper left
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
0:? 'pos' (layout( location=0) flat in uint)
error: SPIRV-Tools Validation Errors
error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's type.
OpStore %size %20
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80007
// Generated by (magic number): 80007
// Id's are bound by 114
// Id's are bound by 114
...
@@ -370,13 +366,13 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
...
@@ -370,13 +366,13 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
16(sbuf): TypeStruct 15
16(sbuf): TypeStruct 15
17: TypePointer Uniform 16(sbuf)
17: TypePointer Uniform 16(sbuf)
18(sbuf): 17(ptr) Variable Uniform
18(sbuf): 17(ptr) Variable Uniform
19
: TypeInt 32 1
20
: TypeInt 32 1
21:
19
(int) Constant 0
21:
20
(int) Constant 0
23:
19
(int) Constant 2
23:
20
(int) Constant 2
25: TypePointer Uniform 6(int)
25: TypePointer Uniform 6(int)
29: TypePointer Function
19
(int)
29: TypePointer Function
20
(int)
32: 6(int) Constant 4
32: 6(int) Constant 4
39:
19
(int) Constant 1
39:
20
(int) Constant 1
43: TypeVector 6(int) 2
43: TypeVector 6(int) 2
45: TypeVector 8(float) 2
45: TypeVector 8(float) 2
47: 8(float) Constant 0
47: 8(float) Constant 0
...
@@ -384,7 +380,7 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
...
@@ -384,7 +380,7 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
69: TypeVector 6(int) 3
69: TypeVector 6(int) 3
71: TypeVector 8(float) 3
71: TypeVector 8(float) 3
80: 6(int) Constant 12
80: 6(int) Constant 12
95:
19
(int) Constant 3
95:
20
(int) Constant 3
99: TypeVector 6(int) 4
99: TypeVector 6(int) 4
106: TypePointer Input 6(int)
106: TypePointer Input 6(int)
107(pos): 106(ptr) Variable Input
107(pos): 106(ptr) Variable Input
...
@@ -409,22 +405,22 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
...
@@ -409,22 +405,22 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
30(byteAddrTemp): 29(ptr) Variable Function
30(byteAddrTemp): 29(ptr) Variable Function
53(byteAddrTemp): 29(ptr) Variable Function
53(byteAddrTemp): 29(ptr) Variable Function
78(byteAddrTemp): 29(ptr) Variable Function
78(byteAddrTemp): 29(ptr) Variable Function
20: 19
(int) ArrayLength 18(sbuf) 0
19: 6
(int) ArrayLength 18(sbuf) 0
Store 14(size)
20
Store 14(size)
19
22: 6(int) Load 11(pos)
22: 6(int) Load 11(pos)
24:
19
(int) ShiftRightLogical 22 23
24:
20
(int) ShiftRightLogical 22 23
26: 25(ptr) AccessChain 18(sbuf) 21 24
26: 25(ptr) AccessChain 18(sbuf) 21 24
27: 6(int) Load 26
27: 6(int) Load 26
28: 8(float) ConvertUToF 27
28: 8(float) ConvertUToF 27
31: 6(int) Load 11(pos)
31: 6(int) Load 11(pos)
33: 6(int) IAdd 31 32
33: 6(int) IAdd 31 32
34:
19
(int) ShiftRightLogical 33 23
34:
20
(int) ShiftRightLogical 33 23
Store 30(byteAddrTemp) 34
Store 30(byteAddrTemp) 34
35:
19
(int) Load 30(byteAddrTemp)
35:
20
(int) Load 30(byteAddrTemp)
36: 25(ptr) AccessChain 18(sbuf) 21 35
36: 25(ptr) AccessChain 18(sbuf) 21 35
37: 6(int) Load 36
37: 6(int) Load 36
38:
19
(int) Load 30(byteAddrTemp)
38:
20
(int) Load 30(byteAddrTemp)
40:
19
(int) IAdd 38 39
40:
20
(int) IAdd 38 39
41: 25(ptr) AccessChain 18(sbuf) 21 40
41: 25(ptr) AccessChain 18(sbuf) 21 40
42: 6(int) Load 41
42: 6(int) Load 41
44: 43(ivec2) CompositeConstruct 37 42
44: 43(ivec2) CompositeConstruct 37 42
...
@@ -436,17 +432,17 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
...
@@ -436,17 +432,17 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
52: 9(fvec4) FAdd 51 50
52: 9(fvec4) FAdd 51 50
54: 6(int) Load 11(pos)
54: 6(int) Load 11(pos)
56: 6(int) IAdd 54 55
56: 6(int) IAdd 54 55
57:
19
(int) ShiftRightLogical 56 23
57:
20
(int) ShiftRightLogical 56 23
Store 53(byteAddrTemp) 57
Store 53(byteAddrTemp) 57
58:
19
(int) Load 53(byteAddrTemp)
58:
20
(int) Load 53(byteAddrTemp)
59: 25(ptr) AccessChain 18(sbuf) 21 58
59: 25(ptr) AccessChain 18(sbuf) 21 58
60: 6(int) Load 59
60: 6(int) Load 59
61:
19
(int) Load 53(byteAddrTemp)
61:
20
(int) Load 53(byteAddrTemp)
62:
19
(int) IAdd 61 39
62:
20
(int) IAdd 61 39
63: 25(ptr) AccessChain 18(sbuf) 21 62
63: 25(ptr) AccessChain 18(sbuf) 21 62
64: 6(int) Load 63
64: 6(int) Load 63
65:
19
(int) Load 53(byteAddrTemp)
65:
20
(int) Load 53(byteAddrTemp)
66:
19
(int) IAdd 65 23
66:
20
(int) IAdd 65 23
67: 25(ptr) AccessChain 18(sbuf) 21 66
67: 25(ptr) AccessChain 18(sbuf) 21 66
68: 6(int) Load 67
68: 6(int) Load 67
70: 69(ivec3) CompositeConstruct 60 64 68
70: 69(ivec3) CompositeConstruct 60 64 68
...
@@ -458,21 +454,21 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
...
@@ -458,21 +454,21 @@ error: OpStore Pointer <id> '14[size]'s type does not match Object <id> '20's ty
77: 9(fvec4) FAdd 52 76
77: 9(fvec4) FAdd 52 76
79: 6(int) Load 11(pos)
79: 6(int) Load 11(pos)
81: 6(int) IAdd 79 80
81: 6(int) IAdd 79 80
82:
19
(int) ShiftRightLogical 81 23
82:
20
(int) ShiftRightLogical 81 23
Store 78(byteAddrTemp) 82
Store 78(byteAddrTemp) 82
83:
19
(int) Load 78(byteAddrTemp)
83:
20
(int) Load 78(byteAddrTemp)
84: 25(ptr) AccessChain 18(sbuf) 21 83
84: 25(ptr) AccessChain 18(sbuf) 21 83
85: 6(int) Load 84
85: 6(int) Load 84
86:
19
(int) Load 78(byteAddrTemp)
86:
20
(int) Load 78(byteAddrTemp)
87:
19
(int) IAdd 86 39
87:
20
(int) IAdd 86 39
88: 25(ptr) AccessChain 18(sbuf) 21 87
88: 25(ptr) AccessChain 18(sbuf) 21 87
89: 6(int) Load 88
89: 6(int) Load 88
90:
19
(int) Load 78(byteAddrTemp)
90:
20
(int) Load 78(byteAddrTemp)
91:
19
(int) IAdd 90 23
91:
20
(int) IAdd 90 23
92: 25(ptr) AccessChain 18(sbuf) 21 91
92: 25(ptr) AccessChain 18(sbuf) 21 91
93: 6(int) Load 92
93: 6(int) Load 92
94:
19
(int) Load 78(byteAddrTemp)
94:
20
(int) Load 78(byteAddrTemp)
96:
19
(int) IAdd 94 95
96:
20
(int) IAdd 94 95
97: 25(ptr) AccessChain 18(sbuf) 21 96
97: 25(ptr) AccessChain 18(sbuf) 21 96
98: 6(int) Load 97
98: 6(int) Load 97
100: 99(ivec4) CompositeConstruct 85 89 93 98
100: 99(ivec4) CompositeConstruct 85 89 93 98
...
...
Test/baseResults/hlsl.structbuffer.coherent.frag.out
View file @
e045c23a
...
@@ -175,10 +175,6 @@ gl_FragCoord origin is upper left
...
@@ -175,10 +175,6 @@ gl_FragCoord origin is upper left
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
0:? 'pos' (layout( location=0) flat in uint)
error: SPIRV-Tools Validation Errors
error: OpStore Pointer <id> '26[size]'s type does not match Object <id> '33's type.
OpStore %size %33
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80007
// Generated by (magic number): 80007
// Id's are bound by 78
// Id's are bound by 78
...
@@ -276,7 +272,7 @@ error: OpStore Pointer <id> '26[size]'s type does not match Object <id> '33's ty
...
@@ -276,7 +272,7 @@ error: OpStore Pointer <id> '26[size]'s type does not match Object <id> '33's ty
22: 6(int) IAdd 20 21
22: 6(int) IAdd 20 21
25: 24(ptr) AccessChain 17(sbuf2) 19 22
25: 24(ptr) AccessChain 17(sbuf2) 19 22
Store 25 23
Store 25 23
33:
18
(int) ArrayLength 32(sbuf) 0
33:
6
(int) ArrayLength 32(sbuf) 0
Store 26(size) 33
Store 26(size) 33
Store 34(stride) 35
Store 34(stride) 35
36: 6(int) Load 11(pos)
36: 6(int) Load 11(pos)
...
...
Test/baseResults/hlsl.structbuffer.frag.out
View file @
e045c23a
...
@@ -187,10 +187,6 @@ gl_FragCoord origin is upper left
...
@@ -187,10 +187,6 @@ gl_FragCoord origin is upper left
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
0:? 'pos' (layout( location=0) flat in uint)
error: SPIRV-Tools Validation Errors
error: OpStore Pointer <id> '43[size]'s type does not match Object <id> '44's type.
OpStore %size %44
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80007
// Generated by (magic number): 80007
// Id's are bound by 96
// Id's are bound by 96
...
@@ -312,7 +308,7 @@ error: OpStore Pointer <id> '43[size]'s type does not match Object <id> '44's ty
...
@@ -312,7 +308,7 @@ error: OpStore Pointer <id> '43[size]'s type does not match Object <id> '44's ty
41: 15(bool) INotEqual 39 35
41: 15(bool) INotEqual 39 35
42: 37(ptr) AccessChain 18(mydata) 40
42: 37(ptr) AccessChain 18(mydata) 40
Store 42 41
Store 42 41
44:
24
(int) ArrayLength 23(sbuf) 0
44:
6
(int) ArrayLength 23(sbuf) 0
Store 43(size) 44
Store 43(size) 44
Store 45(stride) 46
Store 45(stride) 46
47: 6(int) Load 11(pos)
47: 6(int) Load 11(pos)
...
...
Test/baseResults/hlsl.structbuffer.rw.frag.out
View file @
e045c23a
...
@@ -175,10 +175,6 @@ gl_FragCoord origin is upper left
...
@@ -175,10 +175,6 @@ gl_FragCoord origin is upper left
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? '@entryPointOutput' (layout( location=0) out 4-component vector of float)
0:? 'pos' (layout( location=0) flat in uint)
0:? 'pos' (layout( location=0) flat in uint)
error: SPIRV-Tools Validation Errors
error: OpStore Pointer <id> '26[size]'s type does not match Object <id> '33's type.
OpStore %size %33
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80007
// Generated by (magic number): 80007
// Id's are bound by 78
// Id's are bound by 78
...
@@ -274,7 +270,7 @@ error: OpStore Pointer <id> '26[size]'s type does not match Object <id> '33's ty
...
@@ -274,7 +270,7 @@ error: OpStore Pointer <id> '26[size]'s type does not match Object <id> '33's ty
22: 6(int) IAdd 20 21
22: 6(int) IAdd 20 21
25: 24(ptr) AccessChain 17(sbuf2) 19 22
25: 24(ptr) AccessChain 17(sbuf2) 19 22
Store 25 23
Store 25 23
33:
18
(int) ArrayLength 32(sbuf) 0
33:
6
(int) ArrayLength 32(sbuf) 0
Store 26(size) 33
Store 26(size) 33
Store 34(stride) 35
Store 34(stride) 35
36: 6(int) Load 11(pos)
36: 6(int) Load 11(pos)
...
...
Test/baseResults/hlsl.structbuffer.rwbyte.frag.out
View file @
e045c23a
This diff is collapsed.
Click to expand it.
Test/baseResults/spv.310.comp.out
View file @
e045c23a
spv.310.comp
spv.310.comp
error: SPIRV-Tools Validation Errors
error: OpStore Pointer <id> '62's type does not match Object <id> '60's type.
OpStore %62 %60
// Module Version 10000
// Module Version 10000
// Generated by (magic number): 80007
// Generated by (magic number): 80007
// Id's are bound by 71
// Id's are bound by 71
...
@@ -124,7 +128,7 @@ spv.310.comp
...
@@ -124,7 +128,7 @@ spv.310.comp
58: 22(fvec4) CompositeConstruct 57 57 57 57
58: 22(fvec4) CompositeConstruct 57 57 57 57
59: 29(ptr) AccessChain 50(outnames) 26 56
59: 29(ptr) AccessChain 50(outnames) 26 56
Store 59 58
Store 59 58
60:
15
(int) ArrayLength 14(outbname) 3
60:
6
(int) ArrayLength 14(outbname) 3
62: 61(ptr) AccessChain 50(outnames) 16
62: 61(ptr) AccessChain 50(outnames) 16
Store 62 60
Store 62 60
MemoryBarrier 65 8
MemoryBarrier 65 8
...
...
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