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
89123366
Commit
89123366
authored
Jun 21, 2019
by
Jeff Bolz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add test for constant type conversion
parent
f9d08a25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
317 additions
and
0 deletions
+317
-0
spv.constConstruct.vert.out
Test/baseResults/spv.constConstruct.vert.out
+158
-0
spv.constConstruct.vert
Test/spv.constConstruct.vert
+158
-0
Spv.FromFile.cpp
gtests/Spv.FromFile.cpp
+1
-0
No files found.
Test/baseResults/spv.constConstruct.vert.out
0 → 100644
View file @
89123366
spv.constConstruct.vert
Validation failed
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 137
Capability Shader
Capability Float64
Capability Int64
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Vertex 4 "main"
Source GLSL 450
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float16"
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float32"
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_float64"
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int16"
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int32"
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int64"
SourceExtension "GL_EXT_shader_explicit_arithmetic_types_int8"
Name 4 "main"
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 16
7:6(float16_t) Constant 15360
8:6(float16_t) Constant 16384
9:6(float16_t) Constant 16896
10:6(float16_t) Constant 0
11:6(float16_t) Constant 17920
12:6(float16_t) Constant 18176
13:6(float16_t) Constant 18688
14:6(float16_t) Constant 18816
15: TypeFloat 32
16: 15(float) Constant 1099431936
17: 15(float) Constant 1099956224
18: 15(float) Constant 1100480512
19: 15(float) Constant 2139095040
20: 15(float) Constant 0
21: 15(float) Constant 1102053376
22: 15(float) Constant 1102577664
23: 15(float) Constant 1104150528
24: 15(float) Constant 1104674816
25: 15(float) Constant 1065353216
26: TypeFloat 64
27:26(float64_t) Constant 0 1077968896
28:26(float64_t) Constant 0 1078001664
29:26(float64_t) Constant 0 1078034432
30:26(float64_t) Constant 36 0
31:26(float64_t) Constant 37 0
32:26(float64_t) Constant 0 1078132736
33:26(float64_t) Constant 0 1078165504
34:26(float64_t) Constant 40 0
35:26(float64_t) Constant 41 0
36:26(float64_t) Constant 0 1078263808
37:26(float64_t) Constant 0 1078296576
38:26(float64_t) Constant 0 1072693248
39: TypeInt 8 1
40: 39(int8_t) Constant 0
41: 39(int8_t) Constant 52
42: 39(int8_t) Constant 53
43: 39(int8_t) Constant 54
44: 39(int8_t) Constant 55
45: 39(int8_t) Constant 56
46: 39(int8_t) Constant 57
47: 39(int8_t) Constant 58
48: 39(int8_t) Constant 59
49: 39(int8_t) Constant 1
50: TypeInt 16 1
51: 50(int16_t) Constant 0
52: 50(int16_t) Constant 68
53: 50(int16_t) Constant 69
54: 50(int16_t) Constant 70
55: 50(int16_t) Constant 71
56: 50(int16_t) Constant 72
57: 50(int16_t) Constant 73
58: 50(int16_t) Constant 74
59: 50(int16_t) Constant 75
60: 50(int16_t) Constant 1
61: TypeInt 32 1
62: 61(int) Constant 81
63: 61(int) Constant 82
64: 61(int) Constant 83
65: 61(int) Constant 84
66: 61(int) Constant 85
67: 61(int) Constant 86
68: 61(int) Constant 87
69: 61(int) Constant 88
70: 61(int) Constant 89
71: 61(int) Constant 90
72: 61(int) Constant 91
73: 61(int) Constant 1
74: TypeInt 64 1
75: 74(int64_t) Constant 97 0
76: 74(int64_t) Constant 98 0
77: 74(int64_t) Constant 99 0
78: 74(int64_t) Constant 100 1702109236
79: 74(int64_t) Constant 101 0
80: 74(int64_t) Constant 102 0
81: 74(int64_t) Constant 103 0
82: 74(int64_t) Constant 104 0
83: 74(int64_t) Constant 105 0
84: 74(int64_t) Constant 106 0
85: 74(int64_t) Constant 107 0
86: 74(int64_t) Constant 1 0
87: TypeInt 8 0
88: 87(int8_t) Constant 0
89: 87(int8_t) Constant 116
90: 87(int8_t) Constant 117
91: 87(int8_t) Constant 118
92: 87(int8_t) Constant 119
93: 87(int8_t) Constant 120
94: 87(int8_t) Constant 121
95: 87(int8_t) Constant 122
96: 87(int8_t) Constant 123
97: 87(int8_t) Constant 1
98: TypeInt 16 0
99: 98(int16_t) Constant 0
100: 98(int16_t) Constant 132
101: 98(int16_t) Constant 133
102: 98(int16_t) Constant 134
103: 98(int16_t) Constant 135
104: 98(int16_t) Constant 136
105: 98(int16_t) Constant 137
106: 98(int16_t) Constant 138
107: 98(int16_t) Constant 139
108: 98(int16_t) Constant 1
109: TypeInt 32 0
110: 109(int) Constant 145
111: 109(int) Constant 146
112: 109(int) Constant 147
113: 109(int) Constant 148
114: 109(int) Constant 149
115: 109(int) Constant 150
116: 109(int) Constant 151
117: 109(int) Constant 152
118: 109(int) Constant 153
119: 109(int) Constant 154
120: 109(int) Constant 155
121: 109(int) Constant 1
122: TypeInt 64 0
123:122(int64_t) Constant 161 0
124:122(int64_t) Constant 162 0
125:122(int64_t) Constant 163 0
126:122(int64_t) Constant 164 0
127:122(int64_t) Constant 165 0
128:122(int64_t) Constant 166 0
129:122(int64_t) Constant 167 0
130:122(int64_t) Constant 168 0
131:122(int64_t) Constant 169 0
132:122(int64_t) Constant 170 0
133:122(int64_t) Constant 171 0
134:122(int64_t) Constant 1 0
135: TypeBool
136: 135(bool) ConstantTrue
4(main): 2 Function None 3
5: Label
Return
FunctionEnd
Test/spv.constConstruct.vert
0 → 100644
View file @
89123366
#version 450
#extension GL_EXT_shader_explicit_arithmetic_types_float16 : enable
#extension GL_EXT_shader_explicit_arithmetic_types_float32 : enable
#extension GL_EXT_shader_explicit_arithmetic_types_float64 : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int8 : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int16 : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int32 : enable
#extension GL_EXT_shader_explicit_arithmetic_types_int64 : enable
precision
highp
float
;
void
main
()
{
float16_t
(
float16_t
(
0x1
));
float16_t
(
float32_t
(
0x2
));
float16_t
(
float64_t
(
0x3
));
float16_t
(
int8_t
(
0x4
));
float16_t
(
int16_t
(
0x5
));
float16_t
(
int32_t
(
0x6
));
float16_t
(
int64_t
(
0x7
));
float16_t
(
uint8_t
(
0x8
));
float16_t
(
uint16_t
(
0x9
));
float16_t
(
uint32_t
(
0xA
));
float16_t
(
uint64_t
(
0xB
));
float16_t
(
bool
(
0xC
));
float32_t
(
float16_t
(
0x11
));
float32_t
(
float32_t
(
0x12
));
float32_t
(
float64_t
(
0x13
));
float32_t
(
int8_t
(
0x14
));
float32_t
(
int16_t
(
0x15
));
float32_t
(
int32_t
(
0x16
));
float32_t
(
int64_t
(
0x17
));
float32_t
(
uint8_t
(
0x18
));
float32_t
(
uint16_t
(
0x19
));
float32_t
(
uint32_t
(
0x1A
));
float32_t
(
uint64_t
(
0x1B
));
float32_t
(
bool
(
0x1C
));
float64_t
(
float16_t
(
0x21
));
float64_t
(
float32_t
(
0x22
));
float64_t
(
float64_t
(
0x23
));
float64_t
(
int8_t
(
0x24
));
float64_t
(
int16_t
(
0x25
));
float64_t
(
int32_t
(
0x26
));
float64_t
(
int64_t
(
0x27
));
float64_t
(
uint8_t
(
0x28
));
float64_t
(
uint16_t
(
0x29
));
float64_t
(
uint32_t
(
0x2A
));
float64_t
(
uint64_t
(
0x2B
));
float64_t
(
bool
(
0x2C
));
int8_t
(
float16_t
(
0x31
));
int8_t
(
float32_t
(
0x32
));
int8_t
(
float64_t
(
0x33
));
int8_t
(
int8_t
(
0x34
));
int8_t
(
int16_t
(
0x35
));
int8_t
(
int32_t
(
0x36
));
int8_t
(
int64_t
(
0x37
));
int8_t
(
uint8_t
(
0x38
));
int8_t
(
uint16_t
(
0x39
));
int8_t
(
uint32_t
(
0x3A
));
int8_t
(
uint64_t
(
0x3B
));
int8_t
(
bool
(
0x3C
));
int16_t
(
float16_t
(
0x41
));
int16_t
(
float32_t
(
0x42
));
int16_t
(
float64_t
(
0x43
));
int16_t
(
int8_t
(
0x44
));
int16_t
(
int16_t
(
0x45
));
int16_t
(
int32_t
(
0x46
));
int16_t
(
int64_t
(
0x47
));
int16_t
(
uint8_t
(
0x48
));
int16_t
(
uint16_t
(
0x49
));
int16_t
(
uint32_t
(
0x4A
));
int16_t
(
uint64_t
(
0x4B
));
int16_t
(
bool
(
0x4C
));
int32_t
(
float16_t
(
0x51
));
int32_t
(
float32_t
(
0x52
));
int32_t
(
float64_t
(
0x53
));
int32_t
(
int8_t
(
0x54
));
int32_t
(
int16_t
(
0x55
));
int32_t
(
int32_t
(
0x56
));
int32_t
(
int64_t
(
0x57
));
int32_t
(
uint8_t
(
0x58
));
int32_t
(
uint16_t
(
0x59
));
int32_t
(
uint32_t
(
0x5A
));
int32_t
(
uint64_t
(
0x5B
));
int32_t
(
bool
(
0x5C
));
int64_t
(
float16_t
(
0x61
));
int64_t
(
float32_t
(
0x62
));
int64_t
(
float64_t
(
0x63
));
int64_t
(
int8_t
(
0x64
));
int64_t
(
int16_t
(
0x65
));
int64_t
(
int32_t
(
0x66
));
int64_t
(
int64_t
(
0x67
));
int64_t
(
uint8_t
(
0x68
));
int64_t
(
uint16_t
(
0x69
));
int64_t
(
uint32_t
(
0x6A
));
int64_t
(
uint64_t
(
0x6B
));
int64_t
(
bool
(
0x6C
));
uint8_t
(
float16_t
(
0x71
));
uint8_t
(
float32_t
(
0x72
));
uint8_t
(
float64_t
(
0x73
));
uint8_t
(
int8_t
(
0x74
));
uint8_t
(
int16_t
(
0x75
));
uint8_t
(
int32_t
(
0x76
));
uint8_t
(
int64_t
(
0x77
));
uint8_t
(
uint8_t
(
0x78
));
uint8_t
(
uint16_t
(
0x79
));
uint8_t
(
uint32_t
(
0x7A
));
uint8_t
(
uint64_t
(
0x7B
));
uint8_t
(
bool
(
0x7C
));
uint16_t
(
float16_t
(
0x81
));
uint16_t
(
float32_t
(
0x82
));
uint16_t
(
float64_t
(
0x83
));
uint16_t
(
int8_t
(
0x84
));
uint16_t
(
int16_t
(
0x85
));
uint16_t
(
int32_t
(
0x86
));
uint16_t
(
int64_t
(
0x87
));
uint16_t
(
uint8_t
(
0x88
));
uint16_t
(
uint16_t
(
0x89
));
uint16_t
(
uint32_t
(
0x8A
));
uint16_t
(
uint64_t
(
0x8B
));
uint16_t
(
bool
(
0x8C
));
uint32_t
(
float16_t
(
0x91
));
uint32_t
(
float32_t
(
0x92
));
uint32_t
(
float64_t
(
0x93
));
uint32_t
(
int8_t
(
0x94
));
uint32_t
(
int16_t
(
0x95
));
uint32_t
(
int32_t
(
0x96
));
uint32_t
(
int64_t
(
0x97
));
uint32_t
(
uint8_t
(
0x98
));
uint32_t
(
uint16_t
(
0x99
));
uint32_t
(
uint32_t
(
0x9A
));
uint32_t
(
uint64_t
(
0x9B
));
uint32_t
(
bool
(
0x9C
));
uint64_t
(
float16_t
(
0xA1
));
uint64_t
(
float32_t
(
0xA2
));
uint64_t
(
float64_t
(
0xA3
));
uint64_t
(
int8_t
(
0xA4
));
uint64_t
(
int16_t
(
0xA5
));
uint64_t
(
int32_t
(
0xA6
));
uint64_t
(
int64_t
(
0xA7
));
uint64_t
(
uint8_t
(
0xA8
));
uint64_t
(
uint16_t
(
0xA9
));
uint64_t
(
uint32_t
(
0xAA
));
uint64_t
(
uint64_t
(
0xAB
));
uint64_t
(
bool
(
0xAC
));
bool
(
float16_t
(
0xB1
));
bool
(
float32_t
(
0xB2
));
bool
(
float64_t
(
0xB3
));
bool
(
int8_t
(
0xB4
));
bool
(
int16_t
(
0xB5
));
bool
(
int32_t
(
0xB6
));
bool
(
int64_t
(
0xB7
));
bool
(
uint8_t
(
0xB8
));
bool
(
uint16_t
(
0xB9
));
bool
(
uint32_t
(
0xBA
));
bool
(
uint64_t
(
0xBB
));
bool
(
bool
(
0xBC
));
}
gtests/Spv.FromFile.cpp
View file @
89123366
...
@@ -296,6 +296,7 @@ INSTANTIATE_TEST_CASE_P(
...
@@ -296,6 +296,7 @@ INSTANTIATE_TEST_CASE_P(
"spv.builtInXFB.vert"
,
"spv.builtInXFB.vert"
,
"spv.conditionalDiscard.frag"
,
"spv.conditionalDiscard.frag"
,
"spv.constStruct.vert"
,
"spv.constStruct.vert"
,
"spv.constConstruct.vert"
,
"spv.controlFlowAttributes.frag"
,
"spv.controlFlowAttributes.frag"
,
"spv.conversion.frag"
,
"spv.conversion.frag"
,
"spv.coopmat.comp"
,
"spv.coopmat.comp"
,
...
...
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