Merge pull request #1431 from KhronosGroup/implement-8-16-bit-storage

Implement GL_EXT_shader_16bit_storage and GL_EXT_shader_8bit_storage …
This commit is contained in:
John Kessenich 2018-07-03 14:21:07 -06:00 committed by GitHub
commit cd57b4ba0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with 6179 additions and 2765 deletions

1
SPIRV/GLSL.ext.KHR.h Normal file → Executable file
View File

@ -36,6 +36,7 @@ static const char* const E_SPV_KHR_device_group = "SPV_KHR_devic
static const char* const E_SPV_KHR_multiview = "SPV_KHR_multiview"; static const char* const E_SPV_KHR_multiview = "SPV_KHR_multiview";
static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shader_draw_parameters"; static const char* const E_SPV_KHR_shader_draw_parameters = "SPV_KHR_shader_draw_parameters";
static const char* const E_SPV_KHR_16bit_storage = "SPV_KHR_16bit_storage"; static const char* const E_SPV_KHR_16bit_storage = "SPV_KHR_16bit_storage";
static const char* const E_SPV_KHR_8bit_storage = "SPV_KHR_8bit_storage";
static const char* const E_SPV_KHR_storage_buffer_storage_class = "SPV_KHR_storage_buffer_storage_class"; static const char* const E_SPV_KHR_storage_buffer_storage_class = "SPV_KHR_storage_buffer_storage_class";
static const char* const E_SPV_KHR_post_depth_coverage = "SPV_KHR_post_depth_coverage"; static const char* const E_SPV_KHR_post_depth_coverage = "SPV_KHR_post_depth_coverage";

View File

@ -2507,6 +2507,20 @@ spv::Id TGlslangToSpvTraverser::createSpvVariable(const glslang::TIntermSymbol*
} }
} }
const bool contains8BitType = node->getType().containsBasicType(glslang::EbtInt8) ||
node->getType().containsBasicType(glslang::EbtUint8);
if (contains8BitType) {
if (storageClass == spv::StorageClassPushConstant) {
builder.addExtension(spv::E_SPV_KHR_8bit_storage);
builder.addCapability(spv::CapabilityStoragePushConstant8);
} else if (storageClass == spv::StorageClassUniform) {
builder.addExtension(spv::E_SPV_KHR_8bit_storage);
builder.addCapability(spv::CapabilityUniformAndStorageBuffer8BitAccess);
if (node->getType().getQualifier().storage == glslang::EvqBuffer)
builder.addCapability(spv::CapabilityStorageBuffer8BitAccess);
}
}
const char* name = node->getName().c_str(); const char* name = node->getName().c_str();
if (glslang::IsAnonymous(name)) if (glslang::IsAnonymous(name))
name = ""; name = "";

View File

@ -790,6 +790,10 @@ const char* CapabilityString(int info)
case CapabilityStoragePushConstant16: return "StoragePushConstant16"; case CapabilityStoragePushConstant16: return "StoragePushConstant16";
case CapabilityStorageInputOutput16: return "StorageInputOutput16"; case CapabilityStorageInputOutput16: return "StorageInputOutput16";
case CapabilityStorageBuffer8BitAccess: return "CapabilityStorageBuffer8BitAccess";
case CapabilityUniformAndStorageBuffer8BitAccess: return "CapabilityUniformAndStorageBuffer8BitAccess";
case CapabilityStoragePushConstant8: return "CapabilityStoragePushConstant8";
case CapabilityDeviceGroup: return "DeviceGroup"; case CapabilityDeviceGroup: return "DeviceGroup";
case CapabilityMultiView: return "MultiView"; case CapabilityMultiView: return "MultiView";

3
SPIRV/spirv.hpp Normal file → Executable file
View File

@ -679,6 +679,9 @@ enum Capability {
CapabilityVariablePointers = 4442, CapabilityVariablePointers = 4442,
CapabilityAtomicStorageOps = 4445, CapabilityAtomicStorageOps = 4445,
CapabilitySampleMaskPostDepthCoverage = 4447, CapabilitySampleMaskPostDepthCoverage = 4447,
CapabilityStorageBuffer8BitAccess = 4448,
CapabilityUniformAndStorageBuffer8BitAccess = 4449,
CapabilityStoragePushConstant8 = 4450,
CapabilityFloat16ImageAMD = 5008, CapabilityFloat16ImageAMD = 5008,
CapabilityImageGatherBiasLodAMD = 5009, CapabilityImageGatherBiasLodAMD = 5009,
CapabilityFragmentMaskAMD = 5010, CapabilityFragmentMaskAMD = 5010,

View File

@ -56,9 +56,8 @@ ERROR: 0:248: 'explicit types' : required extension not requested: Possible exte
GL_AMD_gpu_shader_half_float GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16 GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:248: 'half floating-point suffix' : not supported with this profile: none
ERROR: 0:248: '' : syntax error, unexpected IDENTIFIER, expecting COMMA or SEMICOLON ERROR: 0:248: '' : syntax error, unexpected IDENTIFIER, expecting COMMA or SEMICOLON
ERROR: 56 compilation errors. No code generated. ERROR: 55 compilation errors. No code generated.
Shader version: 120 Shader version: 120

View File

@ -0,0 +1,336 @@
spv.16bitstorage-int.frag
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 171
Capability Shader
Capability Int16
Capability StorageUniformBufferBlock16
Capability StorageUniform16
Extension "SPV_AMD_gpu_shader_int16"
Extension "SPV_KHR_16bit_storage"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_EXT_shader_16bit_storage"
Name 4 "main"
Name 12 "S"
MemberName 12(S) 0 "x"
MemberName 12(S) 1 "y"
MemberName 12(S) 2 "z"
Name 17 "B2"
MemberName 17(B2) 0 "o"
MemberName 17(B2) 1 "p"
MemberName 17(B2) 2 "q"
MemberName 17(B2) 3 "r"
MemberName 17(B2) 4 "u"
MemberName 17(B2) 5 "v"
MemberName 17(B2) 6 "x"
MemberName 17(B2) 7 "w"
Name 19 "b2"
Name 23 "S"
MemberName 23(S) 0 "x"
MemberName 23(S) 1 "y"
MemberName 23(S) 2 "z"
Name 25 "B1"
MemberName 25(B1) 0 "a"
MemberName 25(B1) 1 "b"
MemberName 25(B1) 2 "c"
MemberName 25(B1) 3 "d"
MemberName 25(B1) 4 "g"
MemberName 25(B1) 5 "h"
MemberName 25(B1) 6 "j"
Name 27 "b1"
Name 45 "S"
MemberName 45(S) 0 "x"
MemberName 45(S) 1 "y"
MemberName 45(S) 2 "z"
Name 49 "B5"
MemberName 49(B5) 0 "o"
MemberName 49(B5) 1 "p"
MemberName 49(B5) 2 "q"
MemberName 49(B5) 3 "r"
MemberName 49(B5) 4 "u"
MemberName 49(B5) 5 "v"
MemberName 49(B5) 6 "x"
MemberName 49(B5) 7 "w"
Name 51 "b5"
Name 69 "x0"
Name 75 "x1"
Name 88 "S2"
MemberName 88(S2) 0 "x"
MemberName 88(S2) 1 "y"
MemberName 88(S2) 2 "z"
Name 89 "S3"
MemberName 89(S3) 0 "x"
Name 90 "B4"
MemberName 90(B4) 0 "x"
MemberName 90(B4) 1 "y"
Name 92 "b4"
Name 93 "S2"
MemberName 93(S2) 0 "x"
MemberName 93(S2) 1 "y"
MemberName 93(S2) 2 "z"
Name 94 "B3"
MemberName 94(B3) 0 "x"
Name 96 "b3"
Name 113 "v3"
Name 135 "u3"
Decorate 11 ArrayStride 2
MemberDecorate 12(S) 0 Offset 0
MemberDecorate 12(S) 1 Offset 4
MemberDecorate 12(S) 2 Offset 8
Decorate 13 ArrayStride 16
Decorate 15 ArrayStride 4
Decorate 16 ArrayStride 2
MemberDecorate 17(B2) 0 Offset 0
MemberDecorate 17(B2) 1 Offset 4
MemberDecorate 17(B2) 2 Offset 8
MemberDecorate 17(B2) 3 Offset 14
MemberDecorate 17(B2) 4 Offset 24
MemberDecorate 17(B2) 5 Offset 40
MemberDecorate 17(B2) 6 Offset 72
MemberDecorate 17(B2) 7 Offset 472
Decorate 17(B2) BufferBlock
Decorate 19(b2) DescriptorSet 0
Decorate 22 ArrayStride 16
MemberDecorate 23(S) 0 Offset 0
MemberDecorate 23(S) 1 Offset 4
MemberDecorate 23(S) 2 Offset 8
Decorate 24 ArrayStride 16
MemberDecorate 25(B1) 0 Offset 0
MemberDecorate 25(B1) 1 Offset 4
MemberDecorate 25(B1) 2 Offset 8
MemberDecorate 25(B1) 3 Offset 16
MemberDecorate 25(B1) 4 Offset 48
MemberDecorate 25(B1) 5 Offset 64
MemberDecorate 25(B1) 6 Offset 96
Decorate 25(B1) Block
Decorate 27(b1) DescriptorSet 0
Decorate 44 ArrayStride 16
MemberDecorate 45(S) 0 Offset 0
MemberDecorate 45(S) 1 Offset 4
MemberDecorate 45(S) 2 Offset 8
Decorate 46 ArrayStride 16
Decorate 47 ArrayStride 16
Decorate 48 ArrayStride 16
MemberDecorate 49(B5) 0 Offset 0
MemberDecorate 49(B5) 1 Offset 4
MemberDecorate 49(B5) 2 Offset 8
MemberDecorate 49(B5) 3 Offset 16
MemberDecorate 49(B5) 4 Offset 48
MemberDecorate 49(B5) 5 Offset 64
MemberDecorate 49(B5) 6 Offset 96
MemberDecorate 49(B5) 7 Offset 1696
Decorate 49(B5) Block
Decorate 51(b5) DescriptorSet 0
MemberDecorate 88(S2) 0 ColMajor
MemberDecorate 88(S2) 0 Offset 0
MemberDecorate 88(S2) 0 MatrixStride 16
MemberDecorate 88(S2) 1 Offset 64
MemberDecorate 88(S2) 2 Offset 68
MemberDecorate 89(S3) 0 Offset 0
MemberDecorate 90(B4) 0 Offset 0
MemberDecorate 90(B4) 1 Offset 80
Decorate 90(B4) BufferBlock
Decorate 92(b4) DescriptorSet 0
MemberDecorate 93(S2) 0 RowMajor
MemberDecorate 93(S2) 0 Offset 0
MemberDecorate 93(S2) 0 MatrixStride 16
MemberDecorate 93(S2) 1 Offset 64
MemberDecorate 93(S2) 2 Offset 68
MemberDecorate 94(B3) 0 Offset 0
Decorate 94(B3) BufferBlock
Decorate 96(b3) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 16 1
7: TypeVector 6(int16_t) 2
8: TypeVector 6(int16_t) 3
9: TypeInt 32 0
10: 9(int) Constant 2
11: TypeArray 6(int16_t) 10
12(S): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3)
13: TypeArray 12(S) 10
14: 9(int) Constant 100
15: TypeArray 7(i16vec2) 14
16: TypeRuntimeArray 6(int16_t)
17(B2): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3) 11 12(S) 13 15 16
18: TypePointer Uniform 17(B2)
19(b2): 18(ptr) Variable Uniform
20: TypeInt 32 1
21: 20(int) Constant 0
22: TypeArray 6(int16_t) 10
23(S): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3)
24: TypeArray 23(S) 10
25(B1): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3) 22 23(S) 24 20(int)
26: TypePointer Uniform 25(B1)
27(b1): 26(ptr) Variable Uniform
28: TypePointer Uniform 6(int16_t)
32: 20(int) Constant 1
33: 20(int) Constant 2
34: TypePointer Uniform 8(i16vec3)
37: TypeVector 20(int) 3
39: TypeVector 20(int) 2
42: TypePointer Uniform 7(i16vec2)
44: TypeArray 6(int16_t) 10
45(S): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3)
46: TypeArray 45(S) 10
47: TypeArray 7(i16vec2) 14
48: TypeArray 6(int16_t) 14
49(B5): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3) 44 45(S) 46 47 48
50: TypePointer Uniform 49(B5)
51(b5): 50(ptr) Variable Uniform
58: 20(int) Constant 3
68: TypePointer Function 20(int)
73: TypeVector 20(int) 4
74: TypePointer Function 73(ivec4)
85: TypeFloat 32
86: TypeVector 85(float) 4
87: TypeMatrix 86(fvec4) 4
88(S2): TypeStruct 87 6(int16_t) 20(int)
89(S3): TypeStruct 88(S2)
90(B4): TypeStruct 88(S2) 89(S3)
91: TypePointer Uniform 90(B4)
92(b4): 91(ptr) Variable Uniform
93(S2): TypeStruct 87 6(int16_t) 20(int)
94(B3): TypeStruct 93(S2)
95: TypePointer Uniform 94(B3)
96(b3): 95(ptr) Variable Uniform
97: TypePointer Uniform 87
104: 9(int) Constant 0
108: 20(int) Constant 5
112: TypePointer Function 37(ivec3)
114: 20(int) Constant 7
115: 20(int) Constant 6
116: TypePointer Uniform 20(int)
166: 39(ivec2) ConstantComposite 32 33
4(main): 2 Function None 3
5: Label
69(x0): 68(ptr) Variable Function
75(x1): 74(ptr) Variable Function
113(v3): 112(ptr) Variable Function
135(u3): 112(ptr) Variable Function
29: 28(ptr) AccessChain 27(b1) 21
30: 6(int16_t) Load 29
31: 28(ptr) AccessChain 19(b2) 21
Store 31 30
35: 34(ptr) AccessChain 19(b2) 33
36: 8(i16vec3) Load 35
38: 37(ivec3) SConvert 36
40: 39(ivec2) VectorShuffle 38 38 0 1
41: 7(i16vec2) SConvert 40
43: 42(ptr) AccessChain 19(b2) 32
Store 43 41
52: 34(ptr) AccessChain 51(b5) 33
53: 8(i16vec3) Load 52
54: 37(ivec3) SConvert 53
55: 39(ivec2) VectorShuffle 54 54 0 1
56: 7(i16vec2) SConvert 55
57: 42(ptr) AccessChain 19(b2) 32
Store 57 56
59: 28(ptr) AccessChain 19(b2) 58 21
60: 6(int16_t) Load 59
61: 28(ptr) AccessChain 19(b2) 58 21
Store 61 60
62: 28(ptr) AccessChain 51(b5) 58 32
63: 6(int16_t) Load 62
64: 28(ptr) AccessChain 19(b2) 58 32
Store 64 63
65: 42(ptr) AccessChain 19(b2) 32
66: 7(i16vec2) Load 65
67: 42(ptr) AccessChain 19(b2) 32
Store 67 66
70: 28(ptr) AccessChain 27(b1) 21
71: 6(int16_t) Load 70
72: 20(int) SConvert 71
Store 69(x0) 72
76: 28(ptr) AccessChain 27(b1) 21
77: 6(int16_t) Load 76
78: 20(int) SConvert 77
79: 42(ptr) AccessChain 19(b2) 32
80: 7(i16vec2) Load 79
81: 39(ivec2) SConvert 80
82: 20(int) CompositeExtract 81 0
83: 20(int) CompositeExtract 81 1
84: 73(ivec4) CompositeConstruct 78 82 83 32
Store 75(x1) 84
98: 97(ptr) AccessChain 96(b3) 21 21
99: 87 Load 98
100: 97(ptr) AccessChain 92(b4) 21 21
Store 100 99
101: 42(ptr) AccessChain 19(b2) 32
102: 7(i16vec2) Load 101
103: 39(ivec2) SConvert 102
105: 20(int) CompositeExtract 103 0
106: 6(int16_t) SConvert 105
107: 28(ptr) AccessChain 19(b2) 21
Store 107 106
109: 42(ptr) AccessChain 19(b2) 108 32 32
110: 7(i16vec2) Load 109
111: 42(ptr) AccessChain 19(b2) 32
Store 111 110
117: 116(ptr) AccessChain 27(b1) 115
118: 20(int) Load 117
119: 28(ptr) AccessChain 19(b2) 114 118
120: 6(int16_t) Load 119
121: 20(int) SConvert 120
122: 116(ptr) AccessChain 27(b1) 115
123: 20(int) Load 122
124: 20(int) IAdd 123 32
125: 28(ptr) AccessChain 19(b2) 114 124
126: 6(int16_t) Load 125
127: 20(int) SConvert 126
128: 116(ptr) AccessChain 27(b1) 115
129: 20(int) Load 128
130: 20(int) IAdd 129 33
131: 28(ptr) AccessChain 19(b2) 114 130
132: 6(int16_t) Load 131
133: 20(int) SConvert 132
134: 37(ivec3) CompositeConstruct 121 127 133
Store 113(v3) 134
136: 116(ptr) AccessChain 27(b1) 115
137: 20(int) Load 136
138: 28(ptr) AccessChain 51(b5) 114 137
139: 6(int16_t) Load 138
140: 20(int) SConvert 139
141: 116(ptr) AccessChain 27(b1) 115
142: 20(int) Load 141
143: 20(int) IAdd 142 32
144: 28(ptr) AccessChain 51(b5) 114 143
145: 6(int16_t) Load 144
146: 20(int) SConvert 145
147: 116(ptr) AccessChain 27(b1) 115
148: 20(int) Load 147
149: 20(int) IAdd 148 33
150: 28(ptr) AccessChain 51(b5) 114 149
151: 6(int16_t) Load 150
152: 20(int) SConvert 151
153: 37(ivec3) CompositeConstruct 140 146 152
Store 135(u3) 153
154: 42(ptr) AccessChain 19(b2) 115 21
155: 7(i16vec2) Load 154
156: 42(ptr) AccessChain 19(b2) 115 21
Store 156 155
157: 42(ptr) AccessChain 51(b5) 115 32
158: 7(i16vec2) Load 157
159: 42(ptr) AccessChain 19(b2) 115 32
Store 159 158
160: 28(ptr) AccessChain 27(b1) 21
161: 6(int16_t) Load 160
162: 28(ptr) AccessChain 19(b2) 32 104
Store 162 161
163: 28(ptr) AccessChain 19(b2) 32 104
164: 6(int16_t) Load 163
165: 28(ptr) AccessChain 19(b2) 21
Store 165 164
167: 7(i16vec2) SConvert 166
168: 42(ptr) AccessChain 19(b2) 32
Store 168 167
169: 6(int16_t) SConvert 58
170: 28(ptr) AccessChain 19(b2) 21
Store 170 169
Return
FunctionEnd

View File

@ -0,0 +1,338 @@
spv.16bitstorage-uint.frag
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 173
Capability Shader
Capability Int16
Capability StorageUniformBufferBlock16
Capability StorageUniform16
Extension "SPV_AMD_gpu_shader_int16"
Extension "SPV_KHR_16bit_storage"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_EXT_shader_16bit_storage"
Name 4 "main"
Name 12 "S"
MemberName 12(S) 0 "x"
MemberName 12(S) 1 "y"
MemberName 12(S) 2 "z"
Name 17 "B2"
MemberName 17(B2) 0 "o"
MemberName 17(B2) 1 "p"
MemberName 17(B2) 2 "q"
MemberName 17(B2) 3 "r"
MemberName 17(B2) 4 "u"
MemberName 17(B2) 5 "v"
MemberName 17(B2) 6 "x"
MemberName 17(B2) 7 "w"
Name 19 "b2"
Name 23 "S"
MemberName 23(S) 0 "x"
MemberName 23(S) 1 "y"
MemberName 23(S) 2 "z"
Name 25 "B1"
MemberName 25(B1) 0 "a"
MemberName 25(B1) 1 "b"
MemberName 25(B1) 2 "c"
MemberName 25(B1) 3 "d"
MemberName 25(B1) 4 "g"
MemberName 25(B1) 5 "h"
MemberName 25(B1) 6 "j"
Name 27 "b1"
Name 45 "S"
MemberName 45(S) 0 "x"
MemberName 45(S) 1 "y"
MemberName 45(S) 2 "z"
Name 49 "B5"
MemberName 49(B5) 0 "o"
MemberName 49(B5) 1 "p"
MemberName 49(B5) 2 "q"
MemberName 49(B5) 3 "r"
MemberName 49(B5) 4 "u"
MemberName 49(B5) 5 "v"
MemberName 49(B5) 6 "x"
MemberName 49(B5) 7 "w"
Name 51 "b5"
Name 69 "x0"
Name 75 "x1"
Name 89 "S2"
MemberName 89(S2) 0 "x"
MemberName 89(S2) 1 "y"
MemberName 89(S2) 2 "z"
Name 90 "S3"
MemberName 90(S3) 0 "x"
Name 91 "B4"
MemberName 91(B4) 0 "x"
MemberName 91(B4) 1 "y"
Name 93 "b4"
Name 94 "S2"
MemberName 94(S2) 0 "x"
MemberName 94(S2) 1 "y"
MemberName 94(S2) 2 "z"
Name 95 "B3"
MemberName 95(B3) 0 "x"
Name 97 "b3"
Name 114 "v3"
Name 136 "u3"
Decorate 11 ArrayStride 2
MemberDecorate 12(S) 0 Offset 0
MemberDecorate 12(S) 1 Offset 4
MemberDecorate 12(S) 2 Offset 8
Decorate 13 ArrayStride 16
Decorate 15 ArrayStride 4
Decorate 16 ArrayStride 2
MemberDecorate 17(B2) 0 Offset 0
MemberDecorate 17(B2) 1 Offset 4
MemberDecorate 17(B2) 2 Offset 8
MemberDecorate 17(B2) 3 Offset 14
MemberDecorate 17(B2) 4 Offset 24
MemberDecorate 17(B2) 5 Offset 40
MemberDecorate 17(B2) 6 Offset 72
MemberDecorate 17(B2) 7 Offset 472
Decorate 17(B2) BufferBlock
Decorate 19(b2) DescriptorSet 0
Decorate 22 ArrayStride 16
MemberDecorate 23(S) 0 Offset 0
MemberDecorate 23(S) 1 Offset 4
MemberDecorate 23(S) 2 Offset 8
Decorate 24 ArrayStride 16
MemberDecorate 25(B1) 0 Offset 0
MemberDecorate 25(B1) 1 Offset 4
MemberDecorate 25(B1) 2 Offset 8
MemberDecorate 25(B1) 3 Offset 16
MemberDecorate 25(B1) 4 Offset 48
MemberDecorate 25(B1) 5 Offset 64
MemberDecorate 25(B1) 6 Offset 96
Decorate 25(B1) Block
Decorate 27(b1) DescriptorSet 0
Decorate 44 ArrayStride 16
MemberDecorate 45(S) 0 Offset 0
MemberDecorate 45(S) 1 Offset 4
MemberDecorate 45(S) 2 Offset 8
Decorate 46 ArrayStride 16
Decorate 47 ArrayStride 16
Decorate 48 ArrayStride 16
MemberDecorate 49(B5) 0 Offset 0
MemberDecorate 49(B5) 1 Offset 4
MemberDecorate 49(B5) 2 Offset 8
MemberDecorate 49(B5) 3 Offset 16
MemberDecorate 49(B5) 4 Offset 48
MemberDecorate 49(B5) 5 Offset 64
MemberDecorate 49(B5) 6 Offset 96
MemberDecorate 49(B5) 7 Offset 1696
Decorate 49(B5) Block
Decorate 51(b5) DescriptorSet 0
MemberDecorate 89(S2) 0 ColMajor
MemberDecorate 89(S2) 0 Offset 0
MemberDecorate 89(S2) 0 MatrixStride 16
MemberDecorate 89(S2) 1 Offset 64
MemberDecorate 89(S2) 2 Offset 68
MemberDecorate 90(S3) 0 Offset 0
MemberDecorate 91(B4) 0 Offset 0
MemberDecorate 91(B4) 1 Offset 80
Decorate 91(B4) BufferBlock
Decorate 93(b4) DescriptorSet 0
MemberDecorate 94(S2) 0 RowMajor
MemberDecorate 94(S2) 0 Offset 0
MemberDecorate 94(S2) 0 MatrixStride 16
MemberDecorate 94(S2) 1 Offset 64
MemberDecorate 94(S2) 2 Offset 68
MemberDecorate 95(B3) 0 Offset 0
Decorate 95(B3) BufferBlock
Decorate 97(b3) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 16 0
7: TypeVector 6(int16_t) 2
8: TypeVector 6(int16_t) 3
9: TypeInt 32 0
10: 9(int) Constant 2
11: TypeArray 6(int16_t) 10
12(S): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3)
13: TypeArray 12(S) 10
14: 9(int) Constant 100
15: TypeArray 7(i16vec2) 14
16: TypeRuntimeArray 6(int16_t)
17(B2): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3) 11 12(S) 13 15 16
18: TypePointer Uniform 17(B2)
19(b2): 18(ptr) Variable Uniform
20: TypeInt 32 1
21: 20(int) Constant 0
22: TypeArray 6(int16_t) 10
23(S): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3)
24: TypeArray 23(S) 10
25(B1): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3) 22 23(S) 24 9(int)
26: TypePointer Uniform 25(B1)
27(b1): 26(ptr) Variable Uniform
28: TypePointer Uniform 6(int16_t)
32: 20(int) Constant 1
33: 20(int) Constant 2
34: TypePointer Uniform 8(i16vec3)
37: TypeVector 9(int) 3
39: TypeVector 9(int) 2
42: TypePointer Uniform 7(i16vec2)
44: TypeArray 6(int16_t) 10
45(S): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3)
46: TypeArray 45(S) 10
47: TypeArray 7(i16vec2) 14
48: TypeArray 6(int16_t) 14
49(B5): TypeStruct 6(int16_t) 7(i16vec2) 8(i16vec3) 44 45(S) 46 47 48
50: TypePointer Uniform 49(B5)
51(b5): 50(ptr) Variable Uniform
58: 20(int) Constant 3
68: TypePointer Function 9(int)
73: TypeVector 9(int) 4
74: TypePointer Function 73(ivec4)
82: 9(int) Constant 1
86: TypeFloat 32
87: TypeVector 86(float) 4
88: TypeMatrix 87(fvec4) 4
89(S2): TypeStruct 88 6(int16_t) 9(int)
90(S3): TypeStruct 89(S2)
91(B4): TypeStruct 89(S2) 90(S3)
92: TypePointer Uniform 91(B4)
93(b4): 92(ptr) Variable Uniform
94(S2): TypeStruct 88 6(int16_t) 9(int)
95(B3): TypeStruct 94(S2)
96: TypePointer Uniform 95(B3)
97(b3): 96(ptr) Variable Uniform
98: TypePointer Uniform 88
105: 9(int) Constant 0
109: 20(int) Constant 5
113: TypePointer Function 37(ivec3)
115: 20(int) Constant 7
116: 20(int) Constant 6
117: TypePointer Uniform 9(int)
167: 39(ivec2) ConstantComposite 82 10
170: 9(int) Constant 3
4(main): 2 Function None 3
5: Label
69(x0): 68(ptr) Variable Function
75(x1): 74(ptr) Variable Function
114(v3): 113(ptr) Variable Function
136(u3): 113(ptr) Variable Function
29: 28(ptr) AccessChain 27(b1) 21
30: 6(int16_t) Load 29
31: 28(ptr) AccessChain 19(b2) 21
Store 31 30
35: 34(ptr) AccessChain 19(b2) 33
36: 8(i16vec3) Load 35
38: 37(ivec3) UConvert 36
40: 39(ivec2) VectorShuffle 38 38 0 1
41: 7(i16vec2) UConvert 40
43: 42(ptr) AccessChain 19(b2) 32
Store 43 41
52: 34(ptr) AccessChain 51(b5) 33
53: 8(i16vec3) Load 52
54: 37(ivec3) UConvert 53
55: 39(ivec2) VectorShuffle 54 54 0 1
56: 7(i16vec2) UConvert 55
57: 42(ptr) AccessChain 19(b2) 32
Store 57 56
59: 28(ptr) AccessChain 19(b2) 58 21
60: 6(int16_t) Load 59
61: 28(ptr) AccessChain 19(b2) 58 21
Store 61 60
62: 28(ptr) AccessChain 51(b5) 58 32
63: 6(int16_t) Load 62
64: 28(ptr) AccessChain 19(b2) 58 32
Store 64 63
65: 42(ptr) AccessChain 19(b2) 32
66: 7(i16vec2) Load 65
67: 42(ptr) AccessChain 19(b2) 32
Store 67 66
70: 28(ptr) AccessChain 27(b1) 21
71: 6(int16_t) Load 70
72: 9(int) UConvert 71
Store 69(x0) 72
76: 28(ptr) AccessChain 27(b1) 21
77: 6(int16_t) Load 76
78: 9(int) UConvert 77
79: 42(ptr) AccessChain 19(b2) 32
80: 7(i16vec2) Load 79
81: 39(ivec2) UConvert 80
83: 9(int) CompositeExtract 81 0
84: 9(int) CompositeExtract 81 1
85: 73(ivec4) CompositeConstruct 78 83 84 82
Store 75(x1) 85
99: 98(ptr) AccessChain 97(b3) 21 21
100: 88 Load 99
101: 98(ptr) AccessChain 93(b4) 21 21
Store 101 100
102: 42(ptr) AccessChain 19(b2) 32
103: 7(i16vec2) Load 102
104: 39(ivec2) UConvert 103
106: 9(int) CompositeExtract 104 0
107: 6(int16_t) UConvert 106
108: 28(ptr) AccessChain 19(b2) 21
Store 108 107
110: 42(ptr) AccessChain 19(b2) 109 32 32
111: 7(i16vec2) Load 110
112: 42(ptr) AccessChain 19(b2) 32
Store 112 111
118: 117(ptr) AccessChain 27(b1) 116
119: 9(int) Load 118
120: 28(ptr) AccessChain 19(b2) 115 119
121: 6(int16_t) Load 120
122: 9(int) UConvert 121
123: 117(ptr) AccessChain 27(b1) 116
124: 9(int) Load 123
125: 9(int) IAdd 124 82
126: 28(ptr) AccessChain 19(b2) 115 125
127: 6(int16_t) Load 126
128: 9(int) UConvert 127
129: 117(ptr) AccessChain 27(b1) 116
130: 9(int) Load 129
131: 9(int) IAdd 130 10
132: 28(ptr) AccessChain 19(b2) 115 131
133: 6(int16_t) Load 132
134: 9(int) UConvert 133
135: 37(ivec3) CompositeConstruct 122 128 134
Store 114(v3) 135
137: 117(ptr) AccessChain 27(b1) 116
138: 9(int) Load 137
139: 28(ptr) AccessChain 51(b5) 115 138
140: 6(int16_t) Load 139
141: 9(int) UConvert 140
142: 117(ptr) AccessChain 27(b1) 116
143: 9(int) Load 142
144: 9(int) IAdd 143 82
145: 28(ptr) AccessChain 51(b5) 115 144
146: 6(int16_t) Load 145
147: 9(int) UConvert 146
148: 117(ptr) AccessChain 27(b1) 116
149: 9(int) Load 148
150: 9(int) IAdd 149 10
151: 28(ptr) AccessChain 51(b5) 115 150
152: 6(int16_t) Load 151
153: 9(int) UConvert 152
154: 37(ivec3) CompositeConstruct 141 147 153
Store 136(u3) 154
155: 42(ptr) AccessChain 19(b2) 116 21
156: 7(i16vec2) Load 155
157: 42(ptr) AccessChain 19(b2) 116 21
Store 157 156
158: 42(ptr) AccessChain 51(b5) 116 32
159: 7(i16vec2) Load 158
160: 42(ptr) AccessChain 19(b2) 116 32
Store 160 159
161: 28(ptr) AccessChain 27(b1) 21
162: 6(int16_t) Load 161
163: 28(ptr) AccessChain 19(b2) 32 105
Store 163 162
164: 28(ptr) AccessChain 19(b2) 32 105
165: 6(int16_t) Load 164
166: 28(ptr) AccessChain 19(b2) 21
Store 166 165
168: 7(i16vec2) UConvert 167
169: 42(ptr) AccessChain 19(b2) 32
Store 169 168
171: 6(int16_t) UConvert 170
172: 28(ptr) AccessChain 19(b2) 21
Store 172 171
Return
FunctionEnd

View File

@ -0,0 +1,338 @@
spv.16bitstorage.frag
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 173
Capability Shader
Capability Float16
Capability StorageUniformBufferBlock16
Capability StorageUniform16
Extension "SPV_AMD_gpu_shader_half_float"
Extension "SPV_KHR_16bit_storage"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_EXT_shader_16bit_storage"
Name 4 "main"
Name 12 "S"
MemberName 12(S) 0 "x"
MemberName 12(S) 1 "y"
MemberName 12(S) 2 "z"
Name 17 "B2"
MemberName 17(B2) 0 "o"
MemberName 17(B2) 1 "p"
MemberName 17(B2) 2 "q"
MemberName 17(B2) 3 "r"
MemberName 17(B2) 4 "u"
MemberName 17(B2) 5 "v"
MemberName 17(B2) 6 "x"
MemberName 17(B2) 7 "w"
Name 19 "b2"
Name 23 "S"
MemberName 23(S) 0 "x"
MemberName 23(S) 1 "y"
MemberName 23(S) 2 "z"
Name 25 "B1"
MemberName 25(B1) 0 "a"
MemberName 25(B1) 1 "b"
MemberName 25(B1) 2 "c"
MemberName 25(B1) 3 "d"
MemberName 25(B1) 4 "g"
MemberName 25(B1) 5 "h"
MemberName 25(B1) 6 "j"
Name 27 "b1"
Name 46 "S"
MemberName 46(S) 0 "x"
MemberName 46(S) 1 "y"
MemberName 46(S) 2 "z"
Name 50 "B5"
MemberName 50(B5) 0 "o"
MemberName 50(B5) 1 "p"
MemberName 50(B5) 2 "q"
MemberName 50(B5) 3 "r"
MemberName 50(B5) 4 "u"
MemberName 50(B5) 5 "v"
MemberName 50(B5) 6 "x"
MemberName 50(B5) 7 "w"
Name 52 "b5"
Name 70 "x0"
Name 76 "x1"
Name 88 "S2"
MemberName 88(S2) 0 "x"
MemberName 88(S2) 1 "y"
MemberName 88(S2) 2 "z"
Name 89 "S3"
MemberName 89(S3) 0 "x"
Name 90 "B4"
MemberName 90(B4) 0 "x"
MemberName 90(B4) 1 "y"
Name 92 "b4"
Name 93 "S2"
MemberName 93(S2) 0 "x"
MemberName 93(S2) 1 "y"
MemberName 93(S2) 2 "z"
Name 94 "B3"
MemberName 94(B3) 0 "x"
Name 96 "b3"
Name 113 "v3"
Name 135 "u3"
Decorate 11 ArrayStride 2
MemberDecorate 12(S) 0 Offset 0
MemberDecorate 12(S) 1 Offset 4
MemberDecorate 12(S) 2 Offset 8
Decorate 13 ArrayStride 16
Decorate 15 ArrayStride 4
Decorate 16 ArrayStride 2
MemberDecorate 17(B2) 0 Offset 0
MemberDecorate 17(B2) 1 Offset 4
MemberDecorate 17(B2) 2 Offset 8
MemberDecorate 17(B2) 3 Offset 14
MemberDecorate 17(B2) 4 Offset 24
MemberDecorate 17(B2) 5 Offset 40
MemberDecorate 17(B2) 6 Offset 72
MemberDecorate 17(B2) 7 Offset 472
Decorate 17(B2) BufferBlock
Decorate 19(b2) DescriptorSet 0
Decorate 22 ArrayStride 16
MemberDecorate 23(S) 0 Offset 0
MemberDecorate 23(S) 1 Offset 4
MemberDecorate 23(S) 2 Offset 8
Decorate 24 ArrayStride 16
MemberDecorate 25(B1) 0 Offset 0
MemberDecorate 25(B1) 1 Offset 4
MemberDecorate 25(B1) 2 Offset 8
MemberDecorate 25(B1) 3 Offset 16
MemberDecorate 25(B1) 4 Offset 48
MemberDecorate 25(B1) 5 Offset 64
MemberDecorate 25(B1) 6 Offset 96
Decorate 25(B1) Block
Decorate 27(b1) DescriptorSet 0
Decorate 45 ArrayStride 16
MemberDecorate 46(S) 0 Offset 0
MemberDecorate 46(S) 1 Offset 4
MemberDecorate 46(S) 2 Offset 8
Decorate 47 ArrayStride 16
Decorate 48 ArrayStride 16
Decorate 49 ArrayStride 16
MemberDecorate 50(B5) 0 Offset 0
MemberDecorate 50(B5) 1 Offset 4
MemberDecorate 50(B5) 2 Offset 8
MemberDecorate 50(B5) 3 Offset 16
MemberDecorate 50(B5) 4 Offset 48
MemberDecorate 50(B5) 5 Offset 64
MemberDecorate 50(B5) 6 Offset 96
MemberDecorate 50(B5) 7 Offset 1696
Decorate 50(B5) Block
Decorate 52(b5) DescriptorSet 0
MemberDecorate 88(S2) 0 ColMajor
MemberDecorate 88(S2) 0 Offset 0
MemberDecorate 88(S2) 0 MatrixStride 16
MemberDecorate 88(S2) 1 Offset 64
MemberDecorate 88(S2) 2 Offset 68
MemberDecorate 89(S3) 0 Offset 0
MemberDecorate 90(B4) 0 Offset 0
MemberDecorate 90(B4) 1 Offset 80
Decorate 90(B4) BufferBlock
Decorate 92(b4) DescriptorSet 0
MemberDecorate 93(S2) 0 RowMajor
MemberDecorate 93(S2) 0 Offset 0
MemberDecorate 93(S2) 0 MatrixStride 16
MemberDecorate 93(S2) 1 Offset 64
MemberDecorate 93(S2) 2 Offset 68
MemberDecorate 94(B3) 0 Offset 0
Decorate 94(B3) BufferBlock
Decorate 96(b3) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeFloat 16
7: TypeVector 6(float16_t) 2
8: TypeVector 6(float16_t) 3
9: TypeInt 32 0
10: 9(int) Constant 2
11: TypeArray 6(float16_t) 10
12(S): TypeStruct 6(float16_t) 7(f16vec2) 8(f16vec3)
13: TypeArray 12(S) 10
14: 9(int) Constant 100
15: TypeArray 7(f16vec2) 14
16: TypeRuntimeArray 6(float16_t)
17(B2): TypeStruct 6(float16_t) 7(f16vec2) 8(f16vec3) 11 12(S) 13 15 16
18: TypePointer Uniform 17(B2)
19(b2): 18(ptr) Variable Uniform
20: TypeInt 32 1
21: 20(int) Constant 0
22: TypeArray 6(float16_t) 10
23(S): TypeStruct 6(float16_t) 7(f16vec2) 8(f16vec3)
24: TypeArray 23(S) 10
25(B1): TypeStruct 6(float16_t) 7(f16vec2) 8(f16vec3) 22 23(S) 24 20(int)
26: TypePointer Uniform 25(B1)
27(b1): 26(ptr) Variable Uniform
28: TypePointer Uniform 6(float16_t)
32: 20(int) Constant 1
33: 20(int) Constant 2
34: TypePointer Uniform 8(f16vec3)
37: TypeFloat 32
38: TypeVector 37(float) 3
40: TypeVector 37(float) 2
43: TypePointer Uniform 7(f16vec2)
45: TypeArray 6(float16_t) 10
46(S): TypeStruct 6(float16_t) 7(f16vec2) 8(f16vec3)
47: TypeArray 46(S) 10
48: TypeArray 7(f16vec2) 14
49: TypeArray 6(float16_t) 14
50(B5): TypeStruct 6(float16_t) 7(f16vec2) 8(f16vec3) 45 46(S) 47 48 49
51: TypePointer Uniform 50(B5)
52(b5): 51(ptr) Variable Uniform
59: 20(int) Constant 3
69: TypePointer Function 37(float)
74: TypeVector 37(float) 4
75: TypePointer Function 74(fvec4)
83: 37(float) Constant 1065353216
87: TypeMatrix 74(fvec4) 4
88(S2): TypeStruct 87 6(float16_t) 37(float)
89(S3): TypeStruct 88(S2)
90(B4): TypeStruct 88(S2) 89(S3)
91: TypePointer Uniform 90(B4)
92(b4): 91(ptr) Variable Uniform
93(S2): TypeStruct 87 6(float16_t) 37(float)
94(B3): TypeStruct 93(S2)
95: TypePointer Uniform 94(B3)
96(b3): 95(ptr) Variable Uniform
97: TypePointer Uniform 87
104: 9(int) Constant 0
108: 20(int) Constant 5
112: TypePointer Function 38(fvec3)
114: 20(int) Constant 7
115: 20(int) Constant 6
116: TypePointer Uniform 20(int)
166: 37(float) Constant 1073741824
167: 40(fvec2) ConstantComposite 83 166
170: 37(float) Constant 1077936128
4(main): 2 Function None 3
5: Label
70(x0): 69(ptr) Variable Function
76(x1): 75(ptr) Variable Function
113(v3): 112(ptr) Variable Function
135(u3): 112(ptr) Variable Function
29: 28(ptr) AccessChain 27(b1) 21
30:6(float16_t) Load 29
31: 28(ptr) AccessChain 19(b2) 21
Store 31 30
35: 34(ptr) AccessChain 19(b2) 33
36: 8(f16vec3) Load 35
39: 38(fvec3) FConvert 36
41: 40(fvec2) VectorShuffle 39 39 0 1
42: 7(f16vec2) FConvert 41
44: 43(ptr) AccessChain 19(b2) 32
Store 44 42
53: 34(ptr) AccessChain 52(b5) 33
54: 8(f16vec3) Load 53
55: 38(fvec3) FConvert 54
56: 40(fvec2) VectorShuffle 55 55 0 1
57: 7(f16vec2) FConvert 56
58: 43(ptr) AccessChain 19(b2) 32
Store 58 57
60: 28(ptr) AccessChain 19(b2) 59 21
61:6(float16_t) Load 60
62: 28(ptr) AccessChain 19(b2) 59 21
Store 62 61
63: 28(ptr) AccessChain 52(b5) 59 32
64:6(float16_t) Load 63
65: 28(ptr) AccessChain 19(b2) 59 32
Store 65 64
66: 43(ptr) AccessChain 19(b2) 32
67: 7(f16vec2) Load 66
68: 43(ptr) AccessChain 19(b2) 32
Store 68 67
71: 28(ptr) AccessChain 27(b1) 21
72:6(float16_t) Load 71
73: 37(float) FConvert 72
Store 70(x0) 73
77: 28(ptr) AccessChain 27(b1) 21
78:6(float16_t) Load 77
79: 37(float) FConvert 78
80: 43(ptr) AccessChain 19(b2) 32
81: 7(f16vec2) Load 80
82: 40(fvec2) FConvert 81
84: 37(float) CompositeExtract 82 0
85: 37(float) CompositeExtract 82 1
86: 74(fvec4) CompositeConstruct 79 84 85 83
Store 76(x1) 86
98: 97(ptr) AccessChain 96(b3) 21 21
99: 87 Load 98
100: 97(ptr) AccessChain 92(b4) 21 21
Store 100 99
101: 43(ptr) AccessChain 19(b2) 32
102: 7(f16vec2) Load 101
103: 40(fvec2) FConvert 102
105: 37(float) CompositeExtract 103 0
106:6(float16_t) FConvert 105
107: 28(ptr) AccessChain 19(b2) 21
Store 107 106
109: 43(ptr) AccessChain 19(b2) 108 32 32
110: 7(f16vec2) Load 109
111: 43(ptr) AccessChain 19(b2) 32
Store 111 110
117: 116(ptr) AccessChain 27(b1) 115
118: 20(int) Load 117
119: 28(ptr) AccessChain 19(b2) 114 118
120:6(float16_t) Load 119
121: 37(float) FConvert 120
122: 116(ptr) AccessChain 27(b1) 115
123: 20(int) Load 122
124: 20(int) IAdd 123 32
125: 28(ptr) AccessChain 19(b2) 114 124
126:6(float16_t) Load 125
127: 37(float) FConvert 126
128: 116(ptr) AccessChain 27(b1) 115
129: 20(int) Load 128
130: 20(int) IAdd 129 33
131: 28(ptr) AccessChain 19(b2) 114 130
132:6(float16_t) Load 131
133: 37(float) FConvert 132
134: 38(fvec3) CompositeConstruct 121 127 133
Store 113(v3) 134
136: 116(ptr) AccessChain 27(b1) 115
137: 20(int) Load 136
138: 28(ptr) AccessChain 52(b5) 114 137
139:6(float16_t) Load 138
140: 37(float) FConvert 139
141: 116(ptr) AccessChain 27(b1) 115
142: 20(int) Load 141
143: 20(int) IAdd 142 32
144: 28(ptr) AccessChain 52(b5) 114 143
145:6(float16_t) Load 144
146: 37(float) FConvert 145
147: 116(ptr) AccessChain 27(b1) 115
148: 20(int) Load 147
149: 20(int) IAdd 148 33
150: 28(ptr) AccessChain 52(b5) 114 149
151:6(float16_t) Load 150
152: 37(float) FConvert 151
153: 38(fvec3) CompositeConstruct 140 146 152
Store 135(u3) 153
154: 43(ptr) AccessChain 19(b2) 115 21
155: 7(f16vec2) Load 154
156: 43(ptr) AccessChain 19(b2) 115 21
Store 156 155
157: 43(ptr) AccessChain 52(b5) 115 32
158: 7(f16vec2) Load 157
159: 43(ptr) AccessChain 19(b2) 115 32
Store 159 158
160: 28(ptr) AccessChain 27(b1) 21
161:6(float16_t) Load 160
162: 28(ptr) AccessChain 19(b2) 32 104
Store 162 161
163: 28(ptr) AccessChain 19(b2) 32 104
164:6(float16_t) Load 163
165: 28(ptr) AccessChain 19(b2) 21
Store 165 164
168: 7(f16vec2) FConvert 167
169: 43(ptr) AccessChain 19(b2) 32
Store 169 168
171:6(float16_t) FConvert 170
172: 28(ptr) AccessChain 19(b2) 21
Store 172 171
Return
FunctionEnd

View File

@ -0,0 +1,91 @@
spv.16bitstorage_Error-int.frag
ERROR: 0:54: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:58: 'can't use with structs containing int16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:61: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:74: ''[' does not operate on types containing (u)int16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:75: 'can't swizzle types containing (u)int16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:76: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:76: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:76: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:77: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:77: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform int16_t' (or there is no acceptable conversion)
ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform int16_t (or there is no acceptable conversion)
ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int16_t' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:81: 'can't swizzle types containing (u)int16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:82: 'can't use with structs containing int16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:83: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:84: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:85: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform int16_t' (or there is no acceptable conversion)
ERROR: 0:87: 'can't use with arrays containing int16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:88: '16-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:89: '16-bit array constructors not supported' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:89: '16-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:92: 'Can't construct structure containing 16-bit type' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:93: 'func2' : no matching overloaded function found
ERROR: 0:99: '' : syntax error, unexpected IDENTIFIER
ERROR: 26 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@ -0,0 +1,91 @@
spv.16bitstorage_Error-uint.frag
ERROR: 0:54: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:58: 'can't use with structs containing uint16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:61: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:74: ''[' does not operate on types containing (u)int16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:75: 'can't swizzle types containing (u)int16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:76: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:76: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:76: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:77: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:77: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform uint16_t' (or there is no acceptable conversion)
ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform uint16_t (or there is no acceptable conversion)
ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint16_t' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:81: 'can't swizzle types containing (u)int16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:82: 'can't use with structs containing uint16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:83: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:84: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:85: '(u)int16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform uint16_t' (or there is no acceptable conversion)
ERROR: 0:87: 'can't use with arrays containing uint16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:88: '16-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:89: '16-bit array constructors not supported' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:89: '16-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:92: 'Can't construct structure containing 16-bit type' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_int16
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int16
ERROR: 0:93: 'func2' : no matching overloaded function found
ERROR: 0:99: '' : syntax error, unexpected IDENTIFIER
ERROR: 26 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@ -0,0 +1,99 @@
spv.16bitstorage_Error.frag
ERROR: 0:54: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:58: 'can't use with structs containing float16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:61: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:74: ''[' does not operate on types containing float16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:75: 'can't swizzle types containing float16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:76: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:76: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:76: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:77: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:77: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform float16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform float16_t' (or there is no acceptable conversion)
ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform float16_t (or there is no acceptable conversion)
ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform float16_t' and a right operand of type ' const float' (or there is no acceptable conversion)
ERROR: 0:81: 'can't swizzle types containing float16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:82: 'can't use with structs containing float16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:83: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:84: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:85: 'float16 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform float16_t' and a right operand of type 'layout( column_major std140 offset=0) uniform float16_t' (or there is no acceptable conversion)
ERROR: 0:87: 'can't use with arrays containing float16' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:88: 'explicit types' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:88: 'explicit types' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:89: '16-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:90: '16-bit array constructors not supported' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:90: '16-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:93: 'Can't construct structure containing 16-bit type' : required extension not requested: Possible extensions include:
GL_AMD_gpu_shader_half_float
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_float16
ERROR: 0:94: 'func2' : no matching overloaded function found
ERROR: 0:100: '' : syntax error, unexpected IDENTIFIER
ERROR: 28 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@ -0,0 +1,335 @@
spv.8bitstorage-int.frag
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 171
Capability Shader
Capability Int8
Capability CapabilityStorageBuffer8BitAccess
Capability CapabilityUniformAndStorageBuffer8BitAccess
Extension "SPV_KHR_8bit_storage"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_EXT_shader_8bit_storage"
Name 4 "main"
Name 12 "S"
MemberName 12(S) 0 "x"
MemberName 12(S) 1 "y"
MemberName 12(S) 2 "z"
Name 17 "B2"
MemberName 17(B2) 0 "o"
MemberName 17(B2) 1 "p"
MemberName 17(B2) 2 "q"
MemberName 17(B2) 3 "r"
MemberName 17(B2) 4 "u"
MemberName 17(B2) 5 "v"
MemberName 17(B2) 6 "x"
MemberName 17(B2) 7 "w"
Name 19 "b2"
Name 23 "S"
MemberName 23(S) 0 "x"
MemberName 23(S) 1 "y"
MemberName 23(S) 2 "z"
Name 25 "B1"
MemberName 25(B1) 0 "a"
MemberName 25(B1) 1 "b"
MemberName 25(B1) 2 "c"
MemberName 25(B1) 3 "d"
MemberName 25(B1) 4 "g"
MemberName 25(B1) 5 "h"
MemberName 25(B1) 6 "j"
Name 27 "b1"
Name 45 "S"
MemberName 45(S) 0 "x"
MemberName 45(S) 1 "y"
MemberName 45(S) 2 "z"
Name 49 "B5"
MemberName 49(B5) 0 "o"
MemberName 49(B5) 1 "p"
MemberName 49(B5) 2 "q"
MemberName 49(B5) 3 "r"
MemberName 49(B5) 4 "u"
MemberName 49(B5) 5 "v"
MemberName 49(B5) 6 "x"
MemberName 49(B5) 7 "w"
Name 51 "b5"
Name 69 "x0"
Name 75 "x1"
Name 88 "S2"
MemberName 88(S2) 0 "x"
MemberName 88(S2) 1 "y"
MemberName 88(S2) 2 "z"
Name 89 "S3"
MemberName 89(S3) 0 "x"
Name 90 "B4"
MemberName 90(B4) 0 "x"
MemberName 90(B4) 1 "y"
Name 92 "b4"
Name 93 "S2"
MemberName 93(S2) 0 "x"
MemberName 93(S2) 1 "y"
MemberName 93(S2) 2 "z"
Name 94 "B3"
MemberName 94(B3) 0 "x"
Name 96 "b3"
Name 113 "v3"
Name 135 "u3"
Decorate 11 ArrayStride 1
MemberDecorate 12(S) 0 Offset 0
MemberDecorate 12(S) 1 Offset 2
MemberDecorate 12(S) 2 Offset 4
Decorate 13 ArrayStride 8
Decorate 15 ArrayStride 2
Decorate 16 ArrayStride 1
MemberDecorate 17(B2) 0 Offset 0
MemberDecorate 17(B2) 1 Offset 2
MemberDecorate 17(B2) 2 Offset 4
MemberDecorate 17(B2) 3 Offset 7
MemberDecorate 17(B2) 4 Offset 12
MemberDecorate 17(B2) 5 Offset 20
MemberDecorate 17(B2) 6 Offset 36
MemberDecorate 17(B2) 7 Offset 236
Decorate 17(B2) BufferBlock
Decorate 19(b2) DescriptorSet 0
Decorate 22 ArrayStride 16
MemberDecorate 23(S) 0 Offset 0
MemberDecorate 23(S) 1 Offset 2
MemberDecorate 23(S) 2 Offset 4
Decorate 24 ArrayStride 16
MemberDecorate 25(B1) 0 Offset 0
MemberDecorate 25(B1) 1 Offset 2
MemberDecorate 25(B1) 2 Offset 4
MemberDecorate 25(B1) 3 Offset 16
MemberDecorate 25(B1) 4 Offset 48
MemberDecorate 25(B1) 5 Offset 64
MemberDecorate 25(B1) 6 Offset 96
Decorate 25(B1) Block
Decorate 27(b1) DescriptorSet 0
Decorate 44 ArrayStride 16
MemberDecorate 45(S) 0 Offset 0
MemberDecorate 45(S) 1 Offset 2
MemberDecorate 45(S) 2 Offset 4
Decorate 46 ArrayStride 16
Decorate 47 ArrayStride 16
Decorate 48 ArrayStride 16
MemberDecorate 49(B5) 0 Offset 0
MemberDecorate 49(B5) 1 Offset 2
MemberDecorate 49(B5) 2 Offset 4
MemberDecorate 49(B5) 3 Offset 16
MemberDecorate 49(B5) 4 Offset 48
MemberDecorate 49(B5) 5 Offset 64
MemberDecorate 49(B5) 6 Offset 96
MemberDecorate 49(B5) 7 Offset 1696
Decorate 49(B5) Block
Decorate 51(b5) DescriptorSet 0
MemberDecorate 88(S2) 0 ColMajor
MemberDecorate 88(S2) 0 Offset 0
MemberDecorate 88(S2) 0 MatrixStride 16
MemberDecorate 88(S2) 1 Offset 64
MemberDecorate 88(S2) 2 Offset 68
MemberDecorate 89(S3) 0 Offset 0
MemberDecorate 90(B4) 0 Offset 0
MemberDecorate 90(B4) 1 Offset 80
Decorate 90(B4) BufferBlock
Decorate 92(b4) DescriptorSet 0
MemberDecorate 93(S2) 0 RowMajor
MemberDecorate 93(S2) 0 Offset 0
MemberDecorate 93(S2) 0 MatrixStride 16
MemberDecorate 93(S2) 1 Offset 64
MemberDecorate 93(S2) 2 Offset 68
MemberDecorate 94(B3) 0 Offset 0
Decorate 94(B3) BufferBlock
Decorate 96(b3) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 8 1
7: TypeVector 6(int8_t) 2
8: TypeVector 6(int8_t) 3
9: TypeInt 32 0
10: 9(int) Constant 2
11: TypeArray 6(int8_t) 10
12(S): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3)
13: TypeArray 12(S) 10
14: 9(int) Constant 100
15: TypeArray 7(i8vec2) 14
16: TypeRuntimeArray 6(int8_t)
17(B2): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3) 11 12(S) 13 15 16
18: TypePointer Uniform 17(B2)
19(b2): 18(ptr) Variable Uniform
20: TypeInt 32 1
21: 20(int) Constant 0
22: TypeArray 6(int8_t) 10
23(S): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3)
24: TypeArray 23(S) 10
25(B1): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3) 22 23(S) 24 20(int)
26: TypePointer Uniform 25(B1)
27(b1): 26(ptr) Variable Uniform
28: TypePointer Uniform 6(int8_t)
32: 20(int) Constant 1
33: 20(int) Constant 2
34: TypePointer Uniform 8(i8vec3)
37: TypeVector 20(int) 3
39: TypeVector 20(int) 2
42: TypePointer Uniform 7(i8vec2)
44: TypeArray 6(int8_t) 10
45(S): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3)
46: TypeArray 45(S) 10
47: TypeArray 7(i8vec2) 14
48: TypeArray 6(int8_t) 14
49(B5): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3) 44 45(S) 46 47 48
50: TypePointer Uniform 49(B5)
51(b5): 50(ptr) Variable Uniform
58: 20(int) Constant 3
68: TypePointer Function 20(int)
73: TypeVector 20(int) 4
74: TypePointer Function 73(ivec4)
85: TypeFloat 32
86: TypeVector 85(float) 4
87: TypeMatrix 86(fvec4) 4
88(S2): TypeStruct 87 6(int8_t) 20(int)
89(S3): TypeStruct 88(S2)
90(B4): TypeStruct 88(S2) 89(S3)
91: TypePointer Uniform 90(B4)
92(b4): 91(ptr) Variable Uniform
93(S2): TypeStruct 87 6(int8_t) 20(int)
94(B3): TypeStruct 93(S2)
95: TypePointer Uniform 94(B3)
96(b3): 95(ptr) Variable Uniform
97: TypePointer Uniform 87
104: 9(int) Constant 0
108: 20(int) Constant 5
112: TypePointer Function 37(ivec3)
114: 20(int) Constant 7
115: 20(int) Constant 6
116: TypePointer Uniform 20(int)
166: 39(ivec2) ConstantComposite 32 33
4(main): 2 Function None 3
5: Label
69(x0): 68(ptr) Variable Function
75(x1): 74(ptr) Variable Function
113(v3): 112(ptr) Variable Function
135(u3): 112(ptr) Variable Function
29: 28(ptr) AccessChain 27(b1) 21
30: 6(int8_t) Load 29
31: 28(ptr) AccessChain 19(b2) 21
Store 31 30
35: 34(ptr) AccessChain 19(b2) 33
36: 8(i8vec3) Load 35
38: 37(ivec3) SConvert 36
40: 39(ivec2) VectorShuffle 38 38 0 1
41: 7(i8vec2) SConvert 40
43: 42(ptr) AccessChain 19(b2) 32
Store 43 41
52: 34(ptr) AccessChain 51(b5) 33
53: 8(i8vec3) Load 52
54: 37(ivec3) SConvert 53
55: 39(ivec2) VectorShuffle 54 54 0 1
56: 7(i8vec2) SConvert 55
57: 42(ptr) AccessChain 19(b2) 32
Store 57 56
59: 28(ptr) AccessChain 19(b2) 58 21
60: 6(int8_t) Load 59
61: 28(ptr) AccessChain 19(b2) 58 21
Store 61 60
62: 28(ptr) AccessChain 51(b5) 58 32
63: 6(int8_t) Load 62
64: 28(ptr) AccessChain 19(b2) 58 32
Store 64 63
65: 42(ptr) AccessChain 19(b2) 32
66: 7(i8vec2) Load 65
67: 42(ptr) AccessChain 19(b2) 32
Store 67 66
70: 28(ptr) AccessChain 27(b1) 21
71: 6(int8_t) Load 70
72: 20(int) SConvert 71
Store 69(x0) 72
76: 28(ptr) AccessChain 27(b1) 21
77: 6(int8_t) Load 76
78: 20(int) SConvert 77
79: 42(ptr) AccessChain 19(b2) 32
80: 7(i8vec2) Load 79
81: 39(ivec2) SConvert 80
82: 20(int) CompositeExtract 81 0
83: 20(int) CompositeExtract 81 1
84: 73(ivec4) CompositeConstruct 78 82 83 32
Store 75(x1) 84
98: 97(ptr) AccessChain 96(b3) 21 21
99: 87 Load 98
100: 97(ptr) AccessChain 92(b4) 21 21
Store 100 99
101: 42(ptr) AccessChain 19(b2) 32
102: 7(i8vec2) Load 101
103: 39(ivec2) SConvert 102
105: 20(int) CompositeExtract 103 0
106: 6(int8_t) SConvert 105
107: 28(ptr) AccessChain 19(b2) 21
Store 107 106
109: 42(ptr) AccessChain 19(b2) 108 32 32
110: 7(i8vec2) Load 109
111: 42(ptr) AccessChain 19(b2) 32
Store 111 110
117: 116(ptr) AccessChain 27(b1) 115
118: 20(int) Load 117
119: 28(ptr) AccessChain 19(b2) 114 118
120: 6(int8_t) Load 119
121: 20(int) SConvert 120
122: 116(ptr) AccessChain 27(b1) 115
123: 20(int) Load 122
124: 20(int) IAdd 123 32
125: 28(ptr) AccessChain 19(b2) 114 124
126: 6(int8_t) Load 125
127: 20(int) SConvert 126
128: 116(ptr) AccessChain 27(b1) 115
129: 20(int) Load 128
130: 20(int) IAdd 129 33
131: 28(ptr) AccessChain 19(b2) 114 130
132: 6(int8_t) Load 131
133: 20(int) SConvert 132
134: 37(ivec3) CompositeConstruct 121 127 133
Store 113(v3) 134
136: 116(ptr) AccessChain 27(b1) 115
137: 20(int) Load 136
138: 28(ptr) AccessChain 51(b5) 114 137
139: 6(int8_t) Load 138
140: 20(int) SConvert 139
141: 116(ptr) AccessChain 27(b1) 115
142: 20(int) Load 141
143: 20(int) IAdd 142 32
144: 28(ptr) AccessChain 51(b5) 114 143
145: 6(int8_t) Load 144
146: 20(int) SConvert 145
147: 116(ptr) AccessChain 27(b1) 115
148: 20(int) Load 147
149: 20(int) IAdd 148 33
150: 28(ptr) AccessChain 51(b5) 114 149
151: 6(int8_t) Load 150
152: 20(int) SConvert 151
153: 37(ivec3) CompositeConstruct 140 146 152
Store 135(u3) 153
154: 42(ptr) AccessChain 19(b2) 115 21
155: 7(i8vec2) Load 154
156: 42(ptr) AccessChain 19(b2) 115 21
Store 156 155
157: 42(ptr) AccessChain 51(b5) 115 32
158: 7(i8vec2) Load 157
159: 42(ptr) AccessChain 19(b2) 115 32
Store 159 158
160: 28(ptr) AccessChain 27(b1) 21
161: 6(int8_t) Load 160
162: 28(ptr) AccessChain 19(b2) 32 104
Store 162 161
163: 28(ptr) AccessChain 19(b2) 32 104
164: 6(int8_t) Load 163
165: 28(ptr) AccessChain 19(b2) 21
Store 165 164
167: 7(i8vec2) SConvert 166
168: 42(ptr) AccessChain 19(b2) 32
Store 168 167
169: 6(int8_t) SConvert 58
170: 28(ptr) AccessChain 19(b2) 21
Store 170 169
Return
FunctionEnd

View File

@ -0,0 +1,337 @@
spv.8bitstorage-uint.frag
// Module Version 10000
// Generated by (magic number): 80007
// Id's are bound by 173
Capability Shader
Capability Int8
Capability CapabilityStorageBuffer8BitAccess
Capability CapabilityUniformAndStorageBuffer8BitAccess
Extension "SPV_KHR_8bit_storage"
1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main"
ExecutionMode 4 OriginUpperLeft
Source GLSL 450
SourceExtension "GL_EXT_shader_8bit_storage"
Name 4 "main"
Name 12 "S"
MemberName 12(S) 0 "x"
MemberName 12(S) 1 "y"
MemberName 12(S) 2 "z"
Name 17 "B2"
MemberName 17(B2) 0 "o"
MemberName 17(B2) 1 "p"
MemberName 17(B2) 2 "q"
MemberName 17(B2) 3 "r"
MemberName 17(B2) 4 "u"
MemberName 17(B2) 5 "v"
MemberName 17(B2) 6 "x"
MemberName 17(B2) 7 "w"
Name 19 "b2"
Name 23 "S"
MemberName 23(S) 0 "x"
MemberName 23(S) 1 "y"
MemberName 23(S) 2 "z"
Name 25 "B1"
MemberName 25(B1) 0 "a"
MemberName 25(B1) 1 "b"
MemberName 25(B1) 2 "c"
MemberName 25(B1) 3 "d"
MemberName 25(B1) 4 "g"
MemberName 25(B1) 5 "h"
MemberName 25(B1) 6 "j"
Name 27 "b1"
Name 45 "S"
MemberName 45(S) 0 "x"
MemberName 45(S) 1 "y"
MemberName 45(S) 2 "z"
Name 49 "B5"
MemberName 49(B5) 0 "o"
MemberName 49(B5) 1 "p"
MemberName 49(B5) 2 "q"
MemberName 49(B5) 3 "r"
MemberName 49(B5) 4 "u"
MemberName 49(B5) 5 "v"
MemberName 49(B5) 6 "x"
MemberName 49(B5) 7 "w"
Name 51 "b5"
Name 69 "x0"
Name 75 "x1"
Name 89 "S2"
MemberName 89(S2) 0 "x"
MemberName 89(S2) 1 "y"
MemberName 89(S2) 2 "z"
Name 90 "S3"
MemberName 90(S3) 0 "x"
Name 91 "B4"
MemberName 91(B4) 0 "x"
MemberName 91(B4) 1 "y"
Name 93 "b4"
Name 94 "S2"
MemberName 94(S2) 0 "x"
MemberName 94(S2) 1 "y"
MemberName 94(S2) 2 "z"
Name 95 "B3"
MemberName 95(B3) 0 "x"
Name 97 "b3"
Name 114 "v3"
Name 136 "u3"
Decorate 11 ArrayStride 1
MemberDecorate 12(S) 0 Offset 0
MemberDecorate 12(S) 1 Offset 2
MemberDecorate 12(S) 2 Offset 4
Decorate 13 ArrayStride 8
Decorate 15 ArrayStride 2
Decorate 16 ArrayStride 1
MemberDecorate 17(B2) 0 Offset 0
MemberDecorate 17(B2) 1 Offset 2
MemberDecorate 17(B2) 2 Offset 4
MemberDecorate 17(B2) 3 Offset 7
MemberDecorate 17(B2) 4 Offset 12
MemberDecorate 17(B2) 5 Offset 20
MemberDecorate 17(B2) 6 Offset 36
MemberDecorate 17(B2) 7 Offset 236
Decorate 17(B2) BufferBlock
Decorate 19(b2) DescriptorSet 0
Decorate 22 ArrayStride 16
MemberDecorate 23(S) 0 Offset 0
MemberDecorate 23(S) 1 Offset 2
MemberDecorate 23(S) 2 Offset 4
Decorate 24 ArrayStride 16
MemberDecorate 25(B1) 0 Offset 0
MemberDecorate 25(B1) 1 Offset 2
MemberDecorate 25(B1) 2 Offset 4
MemberDecorate 25(B1) 3 Offset 16
MemberDecorate 25(B1) 4 Offset 48
MemberDecorate 25(B1) 5 Offset 64
MemberDecorate 25(B1) 6 Offset 96
Decorate 25(B1) Block
Decorate 27(b1) DescriptorSet 0
Decorate 44 ArrayStride 16
MemberDecorate 45(S) 0 Offset 0
MemberDecorate 45(S) 1 Offset 2
MemberDecorate 45(S) 2 Offset 4
Decorate 46 ArrayStride 16
Decorate 47 ArrayStride 16
Decorate 48 ArrayStride 16
MemberDecorate 49(B5) 0 Offset 0
MemberDecorate 49(B5) 1 Offset 2
MemberDecorate 49(B5) 2 Offset 4
MemberDecorate 49(B5) 3 Offset 16
MemberDecorate 49(B5) 4 Offset 48
MemberDecorate 49(B5) 5 Offset 64
MemberDecorate 49(B5) 6 Offset 96
MemberDecorate 49(B5) 7 Offset 1696
Decorate 49(B5) Block
Decorate 51(b5) DescriptorSet 0
MemberDecorate 89(S2) 0 ColMajor
MemberDecorate 89(S2) 0 Offset 0
MemberDecorate 89(S2) 0 MatrixStride 16
MemberDecorate 89(S2) 1 Offset 64
MemberDecorate 89(S2) 2 Offset 68
MemberDecorate 90(S3) 0 Offset 0
MemberDecorate 91(B4) 0 Offset 0
MemberDecorate 91(B4) 1 Offset 80
Decorate 91(B4) BufferBlock
Decorate 93(b4) DescriptorSet 0
MemberDecorate 94(S2) 0 RowMajor
MemberDecorate 94(S2) 0 Offset 0
MemberDecorate 94(S2) 0 MatrixStride 16
MemberDecorate 94(S2) 1 Offset 64
MemberDecorate 94(S2) 2 Offset 68
MemberDecorate 95(B3) 0 Offset 0
Decorate 95(B3) BufferBlock
Decorate 97(b3) DescriptorSet 0
2: TypeVoid
3: TypeFunction 2
6: TypeInt 8 0
7: TypeVector 6(int8_t) 2
8: TypeVector 6(int8_t) 3
9: TypeInt 32 0
10: 9(int) Constant 2
11: TypeArray 6(int8_t) 10
12(S): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3)
13: TypeArray 12(S) 10
14: 9(int) Constant 100
15: TypeArray 7(i8vec2) 14
16: TypeRuntimeArray 6(int8_t)
17(B2): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3) 11 12(S) 13 15 16
18: TypePointer Uniform 17(B2)
19(b2): 18(ptr) Variable Uniform
20: TypeInt 32 1
21: 20(int) Constant 0
22: TypeArray 6(int8_t) 10
23(S): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3)
24: TypeArray 23(S) 10
25(B1): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3) 22 23(S) 24 9(int)
26: TypePointer Uniform 25(B1)
27(b1): 26(ptr) Variable Uniform
28: TypePointer Uniform 6(int8_t)
32: 20(int) Constant 1
33: 20(int) Constant 2
34: TypePointer Uniform 8(i8vec3)
37: TypeVector 9(int) 3
39: TypeVector 9(int) 2
42: TypePointer Uniform 7(i8vec2)
44: TypeArray 6(int8_t) 10
45(S): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3)
46: TypeArray 45(S) 10
47: TypeArray 7(i8vec2) 14
48: TypeArray 6(int8_t) 14
49(B5): TypeStruct 6(int8_t) 7(i8vec2) 8(i8vec3) 44 45(S) 46 47 48
50: TypePointer Uniform 49(B5)
51(b5): 50(ptr) Variable Uniform
58: 20(int) Constant 3
68: TypePointer Function 9(int)
73: TypeVector 9(int) 4
74: TypePointer Function 73(ivec4)
82: 9(int) Constant 1
86: TypeFloat 32
87: TypeVector 86(float) 4
88: TypeMatrix 87(fvec4) 4
89(S2): TypeStruct 88 6(int8_t) 9(int)
90(S3): TypeStruct 89(S2)
91(B4): TypeStruct 89(S2) 90(S3)
92: TypePointer Uniform 91(B4)
93(b4): 92(ptr) Variable Uniform
94(S2): TypeStruct 88 6(int8_t) 9(int)
95(B3): TypeStruct 94(S2)
96: TypePointer Uniform 95(B3)
97(b3): 96(ptr) Variable Uniform
98: TypePointer Uniform 88
105: 9(int) Constant 0
109: 20(int) Constant 5
113: TypePointer Function 37(ivec3)
115: 20(int) Constant 7
116: 20(int) Constant 6
117: TypePointer Uniform 9(int)
167: 39(ivec2) ConstantComposite 82 10
170: 9(int) Constant 3
4(main): 2 Function None 3
5: Label
69(x0): 68(ptr) Variable Function
75(x1): 74(ptr) Variable Function
114(v3): 113(ptr) Variable Function
136(u3): 113(ptr) Variable Function
29: 28(ptr) AccessChain 27(b1) 21
30: 6(int8_t) Load 29
31: 28(ptr) AccessChain 19(b2) 21
Store 31 30
35: 34(ptr) AccessChain 19(b2) 33
36: 8(i8vec3) Load 35
38: 37(ivec3) UConvert 36
40: 39(ivec2) VectorShuffle 38 38 0 1
41: 7(i8vec2) UConvert 40
43: 42(ptr) AccessChain 19(b2) 32
Store 43 41
52: 34(ptr) AccessChain 51(b5) 33
53: 8(i8vec3) Load 52
54: 37(ivec3) UConvert 53
55: 39(ivec2) VectorShuffle 54 54 0 1
56: 7(i8vec2) UConvert 55
57: 42(ptr) AccessChain 19(b2) 32
Store 57 56
59: 28(ptr) AccessChain 19(b2) 58 21
60: 6(int8_t) Load 59
61: 28(ptr) AccessChain 19(b2) 58 21
Store 61 60
62: 28(ptr) AccessChain 51(b5) 58 32
63: 6(int8_t) Load 62
64: 28(ptr) AccessChain 19(b2) 58 32
Store 64 63
65: 42(ptr) AccessChain 19(b2) 32
66: 7(i8vec2) Load 65
67: 42(ptr) AccessChain 19(b2) 32
Store 67 66
70: 28(ptr) AccessChain 27(b1) 21
71: 6(int8_t) Load 70
72: 9(int) UConvert 71
Store 69(x0) 72
76: 28(ptr) AccessChain 27(b1) 21
77: 6(int8_t) Load 76
78: 9(int) UConvert 77
79: 42(ptr) AccessChain 19(b2) 32
80: 7(i8vec2) Load 79
81: 39(ivec2) UConvert 80
83: 9(int) CompositeExtract 81 0
84: 9(int) CompositeExtract 81 1
85: 73(ivec4) CompositeConstruct 78 83 84 82
Store 75(x1) 85
99: 98(ptr) AccessChain 97(b3) 21 21
100: 88 Load 99
101: 98(ptr) AccessChain 93(b4) 21 21
Store 101 100
102: 42(ptr) AccessChain 19(b2) 32
103: 7(i8vec2) Load 102
104: 39(ivec2) UConvert 103
106: 9(int) CompositeExtract 104 0
107: 6(int8_t) UConvert 106
108: 28(ptr) AccessChain 19(b2) 21
Store 108 107
110: 42(ptr) AccessChain 19(b2) 109 32 32
111: 7(i8vec2) Load 110
112: 42(ptr) AccessChain 19(b2) 32
Store 112 111
118: 117(ptr) AccessChain 27(b1) 116
119: 9(int) Load 118
120: 28(ptr) AccessChain 19(b2) 115 119
121: 6(int8_t) Load 120
122: 9(int) UConvert 121
123: 117(ptr) AccessChain 27(b1) 116
124: 9(int) Load 123
125: 9(int) IAdd 124 82
126: 28(ptr) AccessChain 19(b2) 115 125
127: 6(int8_t) Load 126
128: 9(int) UConvert 127
129: 117(ptr) AccessChain 27(b1) 116
130: 9(int) Load 129
131: 9(int) IAdd 130 10
132: 28(ptr) AccessChain 19(b2) 115 131
133: 6(int8_t) Load 132
134: 9(int) UConvert 133
135: 37(ivec3) CompositeConstruct 122 128 134
Store 114(v3) 135
137: 117(ptr) AccessChain 27(b1) 116
138: 9(int) Load 137
139: 28(ptr) AccessChain 51(b5) 115 138
140: 6(int8_t) Load 139
141: 9(int) UConvert 140
142: 117(ptr) AccessChain 27(b1) 116
143: 9(int) Load 142
144: 9(int) IAdd 143 82
145: 28(ptr) AccessChain 51(b5) 115 144
146: 6(int8_t) Load 145
147: 9(int) UConvert 146
148: 117(ptr) AccessChain 27(b1) 116
149: 9(int) Load 148
150: 9(int) IAdd 149 10
151: 28(ptr) AccessChain 51(b5) 115 150
152: 6(int8_t) Load 151
153: 9(int) UConvert 152
154: 37(ivec3) CompositeConstruct 141 147 153
Store 136(u3) 154
155: 42(ptr) AccessChain 19(b2) 116 21
156: 7(i8vec2) Load 155
157: 42(ptr) AccessChain 19(b2) 116 21
Store 157 156
158: 42(ptr) AccessChain 51(b5) 116 32
159: 7(i8vec2) Load 158
160: 42(ptr) AccessChain 19(b2) 116 32
Store 160 159
161: 28(ptr) AccessChain 27(b1) 21
162: 6(int8_t) Load 161
163: 28(ptr) AccessChain 19(b2) 32 105
Store 163 162
164: 28(ptr) AccessChain 19(b2) 32 105
165: 6(int8_t) Load 164
166: 28(ptr) AccessChain 19(b2) 21
Store 166 165
168: 7(i8vec2) UConvert 167
169: 42(ptr) AccessChain 19(b2) 32
Store 169 168
171: 6(int8_t) UConvert 170
172: 28(ptr) AccessChain 19(b2) 21
Store 172 171
Return
FunctionEnd

View File

@ -0,0 +1,71 @@
spv.8bitstorage_Error-int.frag
ERROR: 0:54: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:58: 'can't use with structs containing int8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:61: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:74: ''[' does not operate on types containing (u)int8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:75: 'can't swizzle types containing (u)int8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:76: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:76: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:76: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:77: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:77: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int8_t' and a right operand of type 'layout( column_major std140 offset=0) uniform int8_t' (or there is no acceptable conversion)
ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform int8_t (or there is no acceptable conversion)
ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int8_t' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:81: 'can't swizzle types containing (u)int8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:82: 'can't use with structs containing int8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:83: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:84: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:85: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform int8_t' and a right operand of type 'layout( column_major std140 offset=0) uniform int8_t' (or there is no acceptable conversion)
ERROR: 0:87: 'can't use with arrays containing int8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:88: '8-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:89: '8-bit array constructors not supported' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:89: '8-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:92: 'Can't construct structure containing 8-bit type' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:93: 'func2' : no matching overloaded function found
ERROR: 0:99: '' : syntax error, unexpected IDENTIFIER
ERROR: 26 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

View File

@ -0,0 +1,71 @@
spv.8bitstorage_Error-uint.frag
ERROR: 0:54: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:58: 'can't use with structs containing uint8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:61: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:74: ''[' does not operate on types containing (u)int8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:75: 'can't swizzle types containing (u)int8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:76: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:76: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:76: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:77: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:77: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:78: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint8_t' and a right operand of type 'layout( column_major std140 offset=0) uniform uint8_t' (or there is no acceptable conversion)
ERROR: 0:79: '-' : wrong operand type no operation '-' exists that takes an operand of type layout( column_major std140 offset=0) uniform uint8_t (or there is no acceptable conversion)
ERROR: 0:80: '+' : wrong operand types: no operation '+' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint8_t' and a right operand of type ' const int' (or there is no acceptable conversion)
ERROR: 0:81: 'can't swizzle types containing (u)int8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:82: 'can't use with structs containing uint8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:83: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:84: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:85: '(u)int8 types can only be in uniform block or buffer storage' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:86: '==' : wrong operand types: no operation '==' exists that takes a left-hand operand of type 'layout( column_major std140 offset=0) uniform uint8_t' and a right operand of type 'layout( column_major std140 offset=0) uniform uint8_t' (or there is no acceptable conversion)
ERROR: 0:87: 'can't use with arrays containing uint8' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:88: '8-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:89: '8-bit array constructors not supported' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:89: '8-bit vector constructors only take vector types' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:92: 'Can't construct structure containing 8-bit type' : required extension not requested: Possible extensions include:
GL_KHX_shader_explicit_arithmetic_types
GL_KHX_shader_explicit_arithmetic_types_int8
ERROR: 0:93: 'func2' : no matching overloaded function found
ERROR: 0:99: '' : syntax error, unexpected IDENTIFIER
ERROR: 26 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
spv.int8.frag spv.int8.frag
// Module Version 10300 // Module Version 10300
// Generated by (magic number): 80007 // Generated by (magic number): 80007
// Id's are bound by 531 // Id's are bound by 518
Capability Shader Capability Shader
Capability Float16 Capability Float16
@ -9,6 +9,8 @@ spv.int8.frag
Capability Int64 Capability Int64
Capability Int16 Capability Int16
Capability Int8 Capability Int8
Capability CapabilityUniformAndStorageBuffer8BitAccess
Extension "SPV_KHR_8bit_storage"
1: ExtInstImport "GLSL.std.450" 1: ExtInstImport "GLSL.std.450"
MemoryModel Logical GLSL450 MemoryModel Logical GLSL450
EntryPoint Fragment 4 "main" EntryPoint Fragment 4 "main"
@ -47,52 +49,52 @@ spv.int8.frag
Name 144 "u16v" Name 144 "u16v"
Name 174 "bv" Name 174 "bv"
Name 192 "u8v" Name 192 "u8v"
Name 196 "i8" Name 197 "i8"
Name 216 "i" Name 217 "i"
Name 223 "uv" Name 224 "uv"
Name 242 "i16" Name 240 "i16"
Name 279 "b" Name 276 "b"
Name 341 "i8v" Name 338 "i8v"
Name 344 "i8" Name 341 "i8"
Name 354 "u8v" Name 351 "u8v"
Name 356 "u8" Name 353 "u8"
Name 430 "i16" Name 423 "i16"
Name 433 "i32" Name 426 "i32"
Name 436 "i8v4" Name 429 "i8v4"
Name 440 "u16" Name 433 "u16"
Name 441 "u8v2" Name 434 "u8v2"
Name 444 "u32" Name 437 "u32"
Name 447 "u8v4" Name 440 "u8v4"
Name 459 "bv" Name 452 "bv"
Name 526 "Block" Name 513 "Block"
MemberName 526(Block) 0 "i8" MemberName 513(Block) 0 "i8"
MemberName 526(Block) 1 "i8v2" MemberName 513(Block) 1 "i8v2"
MemberName 526(Block) 2 "i8v3" MemberName 513(Block) 2 "i8v3"
MemberName 526(Block) 3 "i8v4" MemberName 513(Block) 3 "i8v4"
MemberName 526(Block) 4 "u8" MemberName 513(Block) 4 "u8"
MemberName 526(Block) 5 "u8v2" MemberName 513(Block) 5 "u8v2"
MemberName 526(Block) 6 "u8v3" MemberName 513(Block) 6 "u8v3"
MemberName 526(Block) 7 "u8v4" MemberName 513(Block) 7 "u8v4"
Name 528 "block" Name 515 "block"
Name 529 "si8" Name 516 "si8"
Name 530 "su8" Name 517 "su8"
MemberDecorate 24(Uniforms) 0 Offset 0 MemberDecorate 24(Uniforms) 0 Offset 0
Decorate 24(Uniforms) Block Decorate 24(Uniforms) Block
Decorate 26 DescriptorSet 0 Decorate 26 DescriptorSet 0
Decorate 26 Binding 0 Decorate 26 Binding 0
MemberDecorate 526(Block) 0 Offset 0 MemberDecorate 513(Block) 0 Offset 0
MemberDecorate 526(Block) 1 Offset 2 MemberDecorate 513(Block) 1 Offset 2
MemberDecorate 526(Block) 2 Offset 4 MemberDecorate 513(Block) 2 Offset 4
MemberDecorate 526(Block) 3 Offset 8 MemberDecorate 513(Block) 3 Offset 8
MemberDecorate 526(Block) 4 Offset 12 MemberDecorate 513(Block) 4 Offset 12
MemberDecorate 526(Block) 5 Offset 14 MemberDecorate 513(Block) 5 Offset 14
MemberDecorate 526(Block) 6 Offset 16 MemberDecorate 513(Block) 6 Offset 16
MemberDecorate 526(Block) 7 Offset 20 MemberDecorate 513(Block) 7 Offset 20
Decorate 526(Block) Block Decorate 513(Block) Block
Decorate 528(block) DescriptorSet 0 Decorate 515(block) DescriptorSet 0
Decorate 528(block) Binding 1 Decorate 515(block) Binding 1
Decorate 529(si8) SpecId 100 Decorate 516(si8) SpecId 100
Decorate 530(su8) SpecId 101 Decorate 517(su8) SpecId 101
2: TypeVoid 2: TypeVoid
3: TypeFunction 2 3: TypeFunction 2
14: TypeInt 8 1 14: TypeInt 8 1
@ -157,37 +159,36 @@ spv.int8.frag
182: 36(int8_t) Constant 1 182: 36(int8_t) Constant 1
183: 49(i8vec2) ConstantComposite 181 181 183: 49(i8vec2) ConstantComposite 181 181
184: 49(i8vec2) ConstantComposite 182 182 184: 49(i8vec2) ConstantComposite 182 182
190: TypeVector 14(int8_t) 3 190: TypeVector 36(int8_t) 3
191: TypePointer Function 190(i8vec3) 191: TypePointer Function 190(i8vec3)
215: TypePointer Function 27(int) 194: TypeVector 14(int8_t) 3
221: TypeVector 17(int) 3 216: TypePointer Function 27(int)
222: TypePointer Function 221(ivec3) 222: TypeVector 17(int) 3
225: TypeVector 27(int) 3 223: TypePointer Function 222(ivec3)
241: TypePointer Function 57(int16_t) 239: TypePointer Function 57(int16_t)
264: 17(int) Constant 1 261: 17(int) Constant 1
270: 17(int) Constant 2 267: 17(int) Constant 2
278: TypePointer Function 171(bool) 275: TypePointer Function 171(bool)
280: 17(int) Constant 0 277: 17(int) Constant 0
293: TypePointer Function 17(int) 291: TypePointer Function 17(int)
352: 52(i8vec2) ConstantComposite 21 21 349: 52(i8vec2) ConstantComposite 21 21
358: TypeVector 36(int8_t) 3 358: 190(i8vec3) ConstantComposite 181 181 181
362: 190(i8vec3) ConstantComposite 22 22 22 400: 171(bool) ConstantTrue
404: 171(bool) ConstantTrue 407: 171(bool) ConstantFalse
411: 171(bool) ConstantFalse 408: 172(bvec2) ConstantComposite 407 407
412: 172(bvec2) ConstantComposite 411 411 420: TypeVector 171(bool) 3
427: TypeVector 171(bool) 3 421: 420(bvec3) ConstantComposite 407 407 407
428: 427(bvec3) ConstantComposite 411 411 411 427: TypeVector 14(int8_t) 4
434: TypeVector 14(int8_t) 4 428: TypePointer Function 427(i8vec4)
435: TypePointer Function 434(i8vec4) 432: TypePointer Function 64(int16_t)
439: TypePointer Function 64(int16_t) 438: TypeVector 36(int8_t) 4
445: TypeVector 36(int8_t) 4 439: TypePointer Function 438(i8vec4)
446: TypePointer Function 445(i8vec4) 451: TypePointer Function 420(bvec3)
458: TypePointer Function 427(bvec3) 513(Block): TypeStruct 14(int8_t) 52(i8vec2) 194(i8vec3) 427(i8vec4) 36(int8_t) 49(i8vec2) 190(i8vec3) 438(i8vec4)
526(Block): TypeStruct 14(int8_t) 52(i8vec2) 190(i8vec3) 434(i8vec4) 36(int8_t) 49(i8vec2) 190(i8vec3) 445(i8vec4) 514: TypePointer Uniform 513(Block)
527: TypePointer Uniform 526(Block) 515(block): 514(ptr) Variable Uniform
528(block): 527(ptr) Variable Uniform 516(si8): 14(int8_t) SpecConstant 4294967286
529(si8): 14(int8_t) SpecConstant 4294967286 517(su8): 36(int8_t) SpecConstant 20
530(su8): 36(int8_t) SpecConstant 20
4(main): 2 Function None 3 4(main): 2 Function None 3
5: Label 5: Label
Return Return
@ -360,389 +361,377 @@ spv.int8.frag
10(operators(): 2 Function None 3 10(operators(): 2 Function None 3
11: Label 11: Label
192(u8v): 191(ptr) Variable Function 192(u8v): 191(ptr) Variable Function
196(i8): 15(ptr) Variable Function 197(i8): 15(ptr) Variable Function
216(i): 215(ptr) Variable Function 217(i): 216(ptr) Variable Function
223(uv): 222(ptr) Variable Function 224(uv): 223(ptr) Variable Function
242(i16): 241(ptr) Variable Function 240(i16): 239(ptr) Variable Function
279(b): 278(ptr) Variable Function 276(b): 275(ptr) Variable Function
193: 190(i8vec3) Load 192(u8v) 193: 190(i8vec3) Load 192(u8v)
194: 190(i8vec3) CompositeConstruct 176 176 176 195: 194(i8vec3) CompositeConstruct 176 176 176
195: 190(i8vec3) IAdd 193 194 196: 190(i8vec3) IAdd 193 195
Store 192(u8v) 195 Store 192(u8v) 196
197: 14(int8_t) Load 196(i8) 198: 14(int8_t) Load 197(i8)
198: 14(int8_t) ISub 197 176 199: 14(int8_t) ISub 198 176
Store 196(i8) 198 Store 197(i8) 199
199: 14(int8_t) Load 196(i8) 200: 14(int8_t) Load 197(i8)
200: 14(int8_t) IAdd 199 176 201: 14(int8_t) IAdd 200 176
Store 196(i8) 200 Store 197(i8) 201
201: 190(i8vec3) Load 192(u8v) 202: 190(i8vec3) Load 192(u8v)
202: 190(i8vec3) CompositeConstruct 176 176 176 203: 194(i8vec3) CompositeConstruct 176 176 176
203: 190(i8vec3) ISub 201 202 204: 190(i8vec3) ISub 202 203
Store 192(u8v) 203 Store 192(u8v) 204
204: 190(i8vec3) Load 192(u8v) 205: 190(i8vec3) Load 192(u8v)
205: 190(i8vec3) Not 204 206: 190(i8vec3) Not 205
Store 192(u8v) 205 Store 192(u8v) 206
206: 14(int8_t) Load 196(i8) 207: 14(int8_t) Load 197(i8)
Store 196(i8) 206 Store 197(i8) 207
207: 190(i8vec3) Load 192(u8v) 208: 190(i8vec3) Load 192(u8v)
208: 190(i8vec3) SNegate 207 209: 190(i8vec3) SNegate 208
Store 192(u8v) 208 Store 192(u8v) 209
209: 14(int8_t) Load 196(i8) 210: 14(int8_t) Load 197(i8)
210: 14(int8_t) Load 196(i8) 211: 14(int8_t) Load 197(i8)
211: 14(int8_t) IAdd 210 209 212: 14(int8_t) IAdd 211 210
Store 196(i8) 211 Store 197(i8) 212
212: 190(i8vec3) Load 192(u8v)
213: 190(i8vec3) Load 192(u8v) 213: 190(i8vec3) Load 192(u8v)
214: 190(i8vec3) ISub 213 212 214: 190(i8vec3) Load 192(u8v)
Store 192(u8v) 214 215: 190(i8vec3) ISub 214 213
217: 14(int8_t) Load 196(i8) Store 192(u8v) 215
218: 27(int) SConvert 217 218: 14(int8_t) Load 197(i8)
219: 27(int) Load 216(i) 219: 27(int) SConvert 218
220: 27(int) IMul 219 218 220: 27(int) Load 217(i)
Store 216(i) 220 221: 27(int) IMul 220 219
224: 190(i8vec3) Load 192(u8v) Store 217(i) 221
226: 225(ivec3) SConvert 224 225: 190(i8vec3) Load 192(u8v)
227: 221(ivec3) Bitcast 226 226: 222(ivec3) UConvert 225
228: 221(ivec3) Load 223(uv) 227: 222(ivec3) Load 224(uv)
229: 221(ivec3) UDiv 228 227 228: 222(ivec3) UDiv 227 226
Store 223(uv) 229 Store 224(uv) 228
230: 14(int8_t) Load 196(i8) 229: 14(int8_t) Load 197(i8)
231: 27(int) SConvert 230 230: 27(int) SConvert 229
232: 17(int) Bitcast 231 231: 17(int) Bitcast 230
233: 221(ivec3) Load 223(uv) 232: 222(ivec3) Load 224(uv)
234: 221(ivec3) CompositeConstruct 232 232 232 233: 222(ivec3) CompositeConstruct 231 231 231
235: 221(ivec3) UMod 233 234 234: 222(ivec3) UMod 232 233
Store 223(uv) 235 Store 224(uv) 234
236: 190(i8vec3) Load 192(u8v) 235: 190(i8vec3) Load 192(u8v)
237: 225(ivec3) SConvert 236 236: 222(ivec3) UConvert 235
238: 221(ivec3) Bitcast 237 237: 222(ivec3) Load 224(uv)
239: 221(ivec3) Load 223(uv) 238: 222(ivec3) IAdd 236 237
240: 221(ivec3) IAdd 238 239 Store 224(uv) 238
Store 223(uv) 240 241: 14(int8_t) Load 197(i8)
243: 14(int8_t) Load 196(i8) 242: 57(int16_t) SConvert 241
244: 57(int16_t) SConvert 243 243: 57(int16_t) Load 240(i16)
245: 57(int16_t) Load 242(i16) 244: 57(int16_t) ISub 242 243
246: 57(int16_t) ISub 244 245 Store 240(i16) 244
Store 242(i16) 246 245: 190(i8vec3) Load 192(u8v)
247: 190(i8vec3) Load 192(u8v) 246: 222(ivec3) UConvert 245
248: 225(ivec3) SConvert 247 247: 222(ivec3) Load 224(uv)
249: 221(ivec3) Bitcast 248 248: 222(ivec3) IMul 246 247
250: 221(ivec3) Load 223(uv) Store 224(uv) 248
251: 221(ivec3) IMul 249 250 249: 14(int8_t) Load 197(i8)
Store 223(uv) 251 250: 57(int16_t) SConvert 249
252: 14(int8_t) Load 196(i8) 251: 57(int16_t) Load 240(i16)
253: 57(int16_t) SConvert 252 252: 57(int16_t) IMul 250 251
254: 57(int16_t) Load 242(i16) Store 240(i16) 252
255: 57(int16_t) IMul 253 254 253: 14(int8_t) Load 197(i8)
Store 242(i16) 255 254: 27(int) SConvert 253
256: 14(int8_t) Load 196(i8) 255: 27(int) Load 217(i)
257: 27(int) SConvert 256 256: 27(int) SMod 254 255
258: 27(int) Load 216(i) Store 217(i) 256
259: 27(int) SMod 257 258 257: 14(int8_t) Load 197(i8)
Store 216(i) 259 258: 190(i8vec3) Load 192(u8v)
260: 14(int8_t) Load 196(i8) 259: 194(i8vec3) CompositeConstruct 257 257 257
261: 190(i8vec3) Load 192(u8v) 260: 190(i8vec3) ShiftLeftLogical 258 259
262: 190(i8vec3) CompositeConstruct 260 260 260 Store 192(u8v) 260
263: 190(i8vec3) ShiftLeftLogical 261 262 262: 37(ptr) AccessChain 192(u8v) 261
Store 192(u8v) 263 263: 36(int8_t) Load 262
265: 15(ptr) AccessChain 192(u8v) 264 264: 14(int8_t) Load 197(i8)
266: 14(int8_t) Load 265 265: 14(int8_t) ShiftRightArithmetic 264 263
267: 14(int8_t) Load 196(i8) Store 197(i8) 265
268: 14(int8_t) ShiftRightArithmetic 267 266 266: 14(int8_t) Load 197(i8)
Store 196(i8) 268 268: 37(ptr) AccessChain 192(u8v) 267
269: 14(int8_t) Load 196(i8) 269: 36(int8_t) Load 268
271: 15(ptr) AccessChain 192(u8v) 270 270: 14(int8_t) ShiftLeftLogical 266 269
272: 14(int8_t) Load 271 Store 197(i8) 270
273: 14(int8_t) ShiftLeftLogical 269 272 271: 190(i8vec3) Load 192(u8v)
Store 196(i8) 273 272: 14(int8_t) Load 197(i8)
274: 190(i8vec3) Load 192(u8v) 273: 194(i8vec3) CompositeConstruct 272 272 272
275: 14(int8_t) Load 196(i8) 274: 190(i8vec3) ShiftLeftLogical 271 273
276: 190(i8vec3) CompositeConstruct 275 275 275 Store 192(u8v) 274
277: 190(i8vec3) ShiftLeftLogical 274 276 278: 37(ptr) AccessChain 192(u8v) 277
Store 192(u8v) 277 279: 36(int8_t) Load 278
281: 15(ptr) AccessChain 192(u8v) 280 280: 14(int8_t) Load 197(i8)
282: 14(int8_t) Load 281 281: 36(int8_t) Bitcast 280
283: 14(int8_t) Load 196(i8) 282: 171(bool) INotEqual 279 281
284: 171(bool) INotEqual 282 283 Store 276(b) 282
Store 279(b) 284 283: 14(int8_t) Load 197(i8)
285: 14(int8_t) Load 196(i8) 284: 36(int8_t) Bitcast 283
286: 15(ptr) AccessChain 192(u8v) 280 285: 37(ptr) AccessChain 192(u8v) 277
287: 14(int8_t) Load 286 286: 36(int8_t) Load 285
288: 171(bool) IEqual 285 287 287: 171(bool) IEqual 284 286
Store 279(b) 288 Store 276(b) 287
289: 15(ptr) AccessChain 192(u8v) 280 288: 37(ptr) AccessChain 192(u8v) 277
290: 14(int8_t) Load 289 289: 36(int8_t) Load 288
291: 27(int) SConvert 290 290: 17(int) UConvert 289
292: 17(int) Bitcast 291 292: 291(ptr) AccessChain 224(uv) 261
294: 293(ptr) AccessChain 223(uv) 264 293: 17(int) Load 292
295: 17(int) Load 294 294: 171(bool) UGreaterThan 290 293
296: 171(bool) UGreaterThan 292 295 Store 276(b) 294
Store 279(b) 296 295: 14(int8_t) Load 197(i8)
297: 14(int8_t) Load 196(i8) 296: 27(int) SConvert 295
298: 27(int) SConvert 297 297: 27(int) Load 217(i)
299: 27(int) Load 216(i) 298: 171(bool) SLessThan 296 297
300: 171(bool) SLessThan 298 299 Store 276(b) 298
Store 279(b) 300 299: 37(ptr) AccessChain 192(u8v) 261
301: 15(ptr) AccessChain 192(u8v) 264 300: 36(int8_t) Load 299
302: 14(int8_t) Load 301 301: 17(int) UConvert 300
303: 27(int) SConvert 302 302: 291(ptr) AccessChain 224(uv) 277
304: 17(int) Bitcast 303 303: 17(int) Load 302
305: 293(ptr) AccessChain 223(uv) 280 304: 171(bool) UGreaterThanEqual 301 303
306: 17(int) Load 305 Store 276(b) 304
307: 171(bool) UGreaterThanEqual 304 306 305: 14(int8_t) Load 197(i8)
Store 279(b) 307 306: 27(int) SConvert 305
308: 14(int8_t) Load 196(i8) 307: 27(int) Load 217(i)
309: 27(int) SConvert 308 308: 171(bool) SLessThanEqual 306 307
310: 27(int) Load 216(i) Store 276(b) 308
311: 171(bool) SLessThanEqual 309 310 309: 14(int8_t) Load 197(i8)
Store 279(b) 311 310: 27(int) SConvert 309
312: 14(int8_t) Load 196(i8) 311: 17(int) Bitcast 310
313: 27(int) SConvert 312 312: 222(ivec3) Load 224(uv)
314: 17(int) Bitcast 313 313: 222(ivec3) CompositeConstruct 311 311 311
315: 221(ivec3) Load 223(uv) 314: 222(ivec3) BitwiseOr 312 313
316: 221(ivec3) CompositeConstruct 314 314 314 Store 224(uv) 314
317: 221(ivec3) BitwiseOr 315 316 315: 14(int8_t) Load 197(i8)
Store 223(uv) 317 316: 27(int) SConvert 315
318: 14(int8_t) Load 196(i8) 317: 27(int) Load 217(i)
319: 27(int) SConvert 318 318: 27(int) BitwiseOr 316 317
320: 27(int) Load 216(i) Store 217(i) 318
321: 27(int) BitwiseOr 319 320 319: 14(int8_t) Load 197(i8)
Store 216(i) 321 320: 57(int16_t) SConvert 319
322: 14(int8_t) Load 196(i8) 321: 57(int16_t) Load 240(i16)
323: 57(int16_t) SConvert 322 322: 57(int16_t) BitwiseAnd 321 320
324: 57(int16_t) Load 242(i16) Store 240(i16) 322
325: 57(int16_t) BitwiseAnd 324 323 323: 190(i8vec3) Load 192(u8v)
Store 242(i16) 325 324: 222(ivec3) UConvert 323
326: 190(i8vec3) Load 192(u8v) 325: 222(ivec3) Load 224(uv)
327: 225(ivec3) SConvert 326 326: 222(ivec3) BitwiseAnd 324 325
328: 221(ivec3) Bitcast 327 Store 224(uv) 326
329: 221(ivec3) Load 223(uv) 327: 14(int8_t) Load 197(i8)
330: 221(ivec3) BitwiseAnd 328 329 328: 27(int) SConvert 327
Store 223(uv) 330 329: 17(int) Bitcast 328
331: 14(int8_t) Load 196(i8) 330: 222(ivec3) Load 224(uv)
332: 27(int) SConvert 331 331: 222(ivec3) CompositeConstruct 329 329 329
333: 17(int) Bitcast 332 332: 222(ivec3) BitwiseXor 330 331
334: 221(ivec3) Load 223(uv) Store 224(uv) 332
335: 221(ivec3) CompositeConstruct 333 333 333 333: 190(i8vec3) Load 192(u8v)
336: 221(ivec3) BitwiseXor 334 335 334: 14(int8_t) Load 197(i8)
Store 223(uv) 336 335: 36(int8_t) Bitcast 334
337: 190(i8vec3) Load 192(u8v) 336: 190(i8vec3) CompositeConstruct 335 335 335
338: 14(int8_t) Load 196(i8) 337: 190(i8vec3) BitwiseXor 333 336
339: 190(i8vec3) CompositeConstruct 338 338 338 Store 192(u8v) 337
340: 190(i8vec3) BitwiseXor 337 339
Store 192(u8v) 340
Return Return
FunctionEnd FunctionEnd
12(builtinFuncs(): 2 Function None 3 12(builtinFuncs(): 2 Function None 3
13: Label 13: Label
341(i8v): 53(ptr) Variable Function 338(i8v): 53(ptr) Variable Function
344(i8): 15(ptr) Variable Function 341(i8): 15(ptr) Variable Function
354(u8v): 191(ptr) Variable Function 351(u8v): 191(ptr) Variable Function
356(u8): 37(ptr) Variable Function 353(u8): 37(ptr) Variable Function
430(i16): 241(ptr) Variable Function 423(i16): 239(ptr) Variable Function
433(i32): 215(ptr) Variable Function 426(i32): 216(ptr) Variable Function
436(i8v4): 435(ptr) Variable Function 429(i8v4): 428(ptr) Variable Function
440(u16): 439(ptr) Variable Function 433(u16): 432(ptr) Variable Function
441(u8v2): 50(ptr) Variable Function 434(u8v2): 50(ptr) Variable Function
444(u32): 293(ptr) Variable Function 437(u32): 291(ptr) Variable Function
447(u8v4): 446(ptr) Variable Function 440(u8v4): 439(ptr) Variable Function
459(bv): 458(ptr) Variable Function 452(bv): 451(ptr) Variable Function
342: 52(i8vec2) Load 341(i8v) 339: 52(i8vec2) Load 338(i8v)
343: 52(i8vec2) ExtInst 1(GLSL.std.450) 5(SAbs) 342 340: 52(i8vec2) ExtInst 1(GLSL.std.450) 5(SAbs) 339
Store 341(i8v) 343 Store 338(i8v) 340
345: 14(int8_t) Load 344(i8) 342: 14(int8_t) Load 341(i8)
346: 14(int8_t) ExtInst 1(GLSL.std.450) 7(SSign) 345 343: 14(int8_t) ExtInst 1(GLSL.std.450) 7(SSign) 342
Store 344(i8) 346 Store 341(i8) 343
347: 52(i8vec2) Load 341(i8v) 344: 52(i8vec2) Load 338(i8v)
348: 14(int8_t) Load 344(i8) 345: 14(int8_t) Load 341(i8)
349: 52(i8vec2) CompositeConstruct 348 348 346: 52(i8vec2) CompositeConstruct 345 345
350: 52(i8vec2) ExtInst 1(GLSL.std.450) 39(SMin) 347 349 347: 52(i8vec2) ExtInst 1(GLSL.std.450) 39(SMin) 344 346
Store 341(i8v) 350 Store 338(i8v) 347
351: 52(i8vec2) Load 341(i8v) 348: 52(i8vec2) Load 338(i8v)
353: 52(i8vec2) ExtInst 1(GLSL.std.450) 39(SMin) 351 352 350: 52(i8vec2) ExtInst 1(GLSL.std.450) 39(SMin) 348 349
Store 341(i8v) 353 Store 338(i8v) 350
355: 190(i8vec3) Load 354(u8v) 352: 190(i8vec3) Load 351(u8v)
357: 36(int8_t) Load 356(u8) 354: 36(int8_t) Load 353(u8)
359: 358(i8vec3) CompositeConstruct 357 357 357 355: 190(i8vec3) CompositeConstruct 354 354 354
360: 190(i8vec3) ExtInst 1(GLSL.std.450) 39(SMin) 355 359 356: 190(i8vec3) ExtInst 1(GLSL.std.450) 38(UMin) 352 355
Store 354(u8v) 360 Store 351(u8v) 356
361: 190(i8vec3) Load 354(u8v) 357: 190(i8vec3) Load 351(u8v)
363: 190(i8vec3) ExtInst 1(GLSL.std.450) 39(SMin) 361 362 359: 190(i8vec3) ExtInst 1(GLSL.std.450) 38(UMin) 357 358
Store 354(u8v) 363 Store 351(u8v) 359
364: 52(i8vec2) Load 341(i8v) 360: 52(i8vec2) Load 338(i8v)
365: 14(int8_t) Load 344(i8) 361: 14(int8_t) Load 341(i8)
366: 52(i8vec2) CompositeConstruct 365 365 362: 52(i8vec2) CompositeConstruct 361 361
367: 52(i8vec2) ExtInst 1(GLSL.std.450) 42(SMax) 364 366 363: 52(i8vec2) ExtInst 1(GLSL.std.450) 42(SMax) 360 362
Store 341(i8v) 367 Store 338(i8v) 363
368: 52(i8vec2) Load 341(i8v) 364: 52(i8vec2) Load 338(i8v)
369: 52(i8vec2) ExtInst 1(GLSL.std.450) 42(SMax) 368 352 365: 52(i8vec2) ExtInst 1(GLSL.std.450) 42(SMax) 364 349
Store 341(i8v) 369 Store 338(i8v) 365
370: 190(i8vec3) Load 354(u8v) 366: 190(i8vec3) Load 351(u8v)
371: 36(int8_t) Load 356(u8) 367: 36(int8_t) Load 353(u8)
372: 358(i8vec3) CompositeConstruct 371 371 371 368: 190(i8vec3) CompositeConstruct 367 367 367
373: 190(i8vec3) ExtInst 1(GLSL.std.450) 42(SMax) 370 372 369: 190(i8vec3) ExtInst 1(GLSL.std.450) 41(UMax) 366 368
Store 354(u8v) 373 Store 351(u8v) 369
374: 190(i8vec3) Load 354(u8v) 370: 190(i8vec3) Load 351(u8v)
375: 190(i8vec3) ExtInst 1(GLSL.std.450) 42(SMax) 374 362 371: 190(i8vec3) ExtInst 1(GLSL.std.450) 41(UMax) 370 358
Store 354(u8v) 375 Store 351(u8v) 371
376: 52(i8vec2) Load 341(i8v) 372: 52(i8vec2) Load 338(i8v)
377: 14(int8_t) Load 344(i8) 373: 14(int8_t) Load 341(i8)
378: 14(int8_t) SNegate 377 374: 14(int8_t) SNegate 373
379: 14(int8_t) Load 344(i8) 375: 14(int8_t) Load 341(i8)
380: 52(i8vec2) CompositeConstruct 378 378 376: 52(i8vec2) CompositeConstruct 374 374
381: 52(i8vec2) CompositeConstruct 379 379 377: 52(i8vec2) CompositeConstruct 375 375
382: 52(i8vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 376 380 381 378: 52(i8vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 372 376 377
Store 341(i8v) 382 Store 338(i8v) 378
383: 52(i8vec2) Load 341(i8v) 379: 52(i8vec2) Load 338(i8v)
384: 52(i8vec2) Load 341(i8v) 380: 52(i8vec2) Load 338(i8v)
385: 52(i8vec2) SNegate 384 381: 52(i8vec2) SNegate 380
386: 52(i8vec2) Load 341(i8v) 382: 52(i8vec2) Load 338(i8v)
387: 52(i8vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 383 385 386 383: 52(i8vec2) ExtInst 1(GLSL.std.450) 45(SClamp) 379 381 382
Store 341(i8v) 387 Store 338(i8v) 383
388: 190(i8vec3) Load 354(u8v) 384: 190(i8vec3) Load 351(u8v)
389: 36(int8_t) Load 356(u8) 385: 36(int8_t) Load 353(u8)
390: 36(int8_t) SNegate 389 386: 36(int8_t) SNegate 385
391: 36(int8_t) Load 356(u8) 387: 36(int8_t) Load 353(u8)
392: 358(i8vec3) CompositeConstruct 390 390 390 388: 190(i8vec3) CompositeConstruct 386 386 386
393: 358(i8vec3) CompositeConstruct 391 391 391 389: 190(i8vec3) CompositeConstruct 387 387 387
394: 190(i8vec3) ExtInst 1(GLSL.std.450) 45(SClamp) 388 392 393 390: 190(i8vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 384 388 389
Store 354(u8v) 394 Store 351(u8v) 390
395: 190(i8vec3) Load 354(u8v) 391: 190(i8vec3) Load 351(u8v)
396: 190(i8vec3) Load 354(u8v) 392: 190(i8vec3) Load 351(u8v)
397: 190(i8vec3) SNegate 396 393: 190(i8vec3) SNegate 392
398: 190(i8vec3) Load 354(u8v) 394: 190(i8vec3) Load 351(u8v)
399: 190(i8vec3) ExtInst 1(GLSL.std.450) 45(SClamp) 395 397 398 395: 190(i8vec3) ExtInst 1(GLSL.std.450) 44(UClamp) 391 393 394
Store 354(u8v) 399 Store 351(u8v) 395
400: 15(ptr) AccessChain 341(i8v) 280 396: 15(ptr) AccessChain 338(i8v) 277
401: 14(int8_t) Load 400 397: 14(int8_t) Load 396
402: 15(ptr) AccessChain 341(i8v) 264 398: 15(ptr) AccessChain 338(i8v) 261
403: 14(int8_t) Load 402 399: 14(int8_t) Load 398
405: 14(int8_t) Select 404 403 401 401: 14(int8_t) Select 400 399 397
Store 344(i8) 405 Store 341(i8) 401
406: 14(int8_t) Load 344(i8) 402: 14(int8_t) Load 341(i8)
407: 52(i8vec2) CompositeConstruct 406 406 403: 52(i8vec2) CompositeConstruct 402 402
408: 14(int8_t) Load 344(i8) 404: 14(int8_t) Load 341(i8)
409: 14(int8_t) SNegate 408 405: 14(int8_t) SNegate 404
410: 52(i8vec2) CompositeConstruct 409 409 406: 52(i8vec2) CompositeConstruct 405 405
413: 52(i8vec2) Select 412 410 407 409: 52(i8vec2) Select 408 406 403
Store 341(i8v) 413 Store 338(i8v) 409
414: 15(ptr) AccessChain 354(u8v) 280 410: 37(ptr) AccessChain 351(u8v) 277
415: 14(int8_t) Load 414 411: 36(int8_t) Load 410
416: 15(ptr) AccessChain 354(u8v) 264 412: 37(ptr) AccessChain 351(u8v) 261
417: 14(int8_t) Load 416 413: 36(int8_t) Load 412
418: 14(int8_t) Select 404 417 415 414: 36(int8_t) Select 400 413 411
419: 36(int8_t) Bitcast 418 Store 353(u8) 414
Store 356(u8) 419 415: 36(int8_t) Load 353(u8)
420: 36(int8_t) Load 356(u8) 416: 190(i8vec3) CompositeConstruct 415 415 415
421: 14(int8_t) Bitcast 420 417: 36(int8_t) Load 353(u8)
422: 190(i8vec3) CompositeConstruct 421 421 421 418: 36(int8_t) SNegate 417
423: 36(int8_t) Load 356(u8) 419: 190(i8vec3) CompositeConstruct 418 418 418
424: 36(int8_t) SNegate 423 422: 190(i8vec3) Select 421 419 416
425: 14(int8_t) Bitcast 424 Store 351(u8v) 422
426: 190(i8vec3) CompositeConstruct 425 425 425 424: 52(i8vec2) Load 338(i8v)
429: 190(i8vec3) Select 428 426 422 425: 57(int16_t) Bitcast 424
Store 354(u8v) 429 Store 423(i16) 425
431: 52(i8vec2) Load 341(i8v) 430: 427(i8vec4) Load 429(i8v4)
432: 57(int16_t) Bitcast 431 431: 27(int) Bitcast 430
Store 430(i16) 432 Store 426(i32) 431
437: 434(i8vec4) Load 436(i8v4) 435: 49(i8vec2) Load 434(u8v2)
438: 27(int) Bitcast 437 436: 64(int16_t) Bitcast 435
Store 433(i32) 438 Store 433(u16) 436
442: 49(i8vec2) Load 441(u8v2) 441: 438(i8vec4) Load 440(u8v4)
443: 64(int16_t) Bitcast 442 442: 17(int) Bitcast 441
Store 440(u16) 443 Store 437(u32) 442
448: 445(i8vec4) Load 447(u8v4) 443: 57(int16_t) Load 423(i16)
449: 17(int) Bitcast 448 444: 52(i8vec2) Bitcast 443
Store 444(u32) 449 Store 338(i8v) 444
450: 57(int16_t) Load 430(i16) 445: 27(int) Load 426(i32)
451: 52(i8vec2) Bitcast 450 446: 427(i8vec4) Bitcast 445
Store 341(i8v) 451 Store 429(i8v4) 446
452: 27(int) Load 433(i32) 447: 64(int16_t) Load 433(u16)
453: 434(i8vec4) Bitcast 452 448: 49(i8vec2) Bitcast 447
Store 436(i8v4) 453 Store 434(u8v2) 448
454: 64(int16_t) Load 440(u16) 449: 17(int) Load 437(u32)
455: 49(i8vec2) Bitcast 454 450: 438(i8vec4) Bitcast 449
Store 441(u8v2) 455 Store 440(u8v4) 450
456: 17(int) Load 444(u32) 453: 190(i8vec3) Load 351(u8v)
457: 445(i8vec4) Bitcast 456 454: 36(int8_t) Load 353(u8)
Store 447(u8v4) 457 455: 190(i8vec3) CompositeConstruct 454 454 454
460: 190(i8vec3) Load 354(u8v) 456: 420(bvec3) ULessThan 453 455
461: 36(int8_t) Load 356(u8) Store 452(bv) 456
462: 14(int8_t) Bitcast 461 457: 52(i8vec2) Load 338(i8v)
463: 190(i8vec3) CompositeConstruct 462 462 462 458: 14(int8_t) Load 341(i8)
464: 427(bvec3) SLessThan 460 463 459: 52(i8vec2) CompositeConstruct 458 458
Store 459(bv) 464 460: 172(bvec2) SLessThan 457 459
465: 52(i8vec2) Load 341(i8v) 461: 420(bvec3) Load 452(bv)
466: 14(int8_t) Load 344(i8) 462: 420(bvec3) VectorShuffle 461 460 3 4 2
467: 52(i8vec2) CompositeConstruct 466 466 Store 452(bv) 462
468: 172(bvec2) SLessThan 465 467 463: 190(i8vec3) Load 351(u8v)
469: 427(bvec3) Load 459(bv) 464: 36(int8_t) Load 353(u8)
470: 427(bvec3) VectorShuffle 469 468 3 4 2 465: 190(i8vec3) CompositeConstruct 464 464 464
Store 459(bv) 470 466: 420(bvec3) ULessThanEqual 463 465
471: 190(i8vec3) Load 354(u8v) Store 452(bv) 466
472: 36(int8_t) Load 356(u8) 467: 52(i8vec2) Load 338(i8v)
473: 14(int8_t) Bitcast 472 468: 14(int8_t) Load 341(i8)
474: 190(i8vec3) CompositeConstruct 473 473 473 469: 52(i8vec2) CompositeConstruct 468 468
475: 427(bvec3) SLessThanEqual 471 474 470: 172(bvec2) SLessThanEqual 467 469
Store 459(bv) 475 471: 420(bvec3) Load 452(bv)
476: 52(i8vec2) Load 341(i8v) 472: 420(bvec3) VectorShuffle 471 470 3 4 2
477: 14(int8_t) Load 344(i8) Store 452(bv) 472
478: 52(i8vec2) CompositeConstruct 477 477 473: 190(i8vec3) Load 351(u8v)
479: 172(bvec2) SLessThanEqual 476 478 474: 36(int8_t) Load 353(u8)
480: 427(bvec3) Load 459(bv) 475: 190(i8vec3) CompositeConstruct 474 474 474
481: 427(bvec3) VectorShuffle 480 479 3 4 2 476: 420(bvec3) UGreaterThan 473 475
Store 459(bv) 481 Store 452(bv) 476
482: 190(i8vec3) Load 354(u8v) 477: 52(i8vec2) Load 338(i8v)
483: 36(int8_t) Load 356(u8) 478: 14(int8_t) Load 341(i8)
484: 14(int8_t) Bitcast 483 479: 52(i8vec2) CompositeConstruct 478 478
480: 172(bvec2) SGreaterThan 477 479
481: 420(bvec3) Load 452(bv)
482: 420(bvec3) VectorShuffle 481 480 3 4 2
Store 452(bv) 482
483: 190(i8vec3) Load 351(u8v)
484: 36(int8_t) Load 353(u8)
485: 190(i8vec3) CompositeConstruct 484 484 484 485: 190(i8vec3) CompositeConstruct 484 484 484
486: 427(bvec3) SGreaterThan 482 485 486: 420(bvec3) UGreaterThanEqual 483 485
Store 459(bv) 486 Store 452(bv) 486
487: 52(i8vec2) Load 341(i8v) 487: 52(i8vec2) Load 338(i8v)
488: 14(int8_t) Load 344(i8) 488: 14(int8_t) Load 341(i8)
489: 52(i8vec2) CompositeConstruct 488 488 489: 52(i8vec2) CompositeConstruct 488 488
490: 172(bvec2) SGreaterThan 487 489 490: 172(bvec2) SGreaterThanEqual 487 489
491: 427(bvec3) Load 459(bv) 491: 420(bvec3) Load 452(bv)
492: 427(bvec3) VectorShuffle 491 490 3 4 2 492: 420(bvec3) VectorShuffle 491 490 3 4 2
Store 459(bv) 492 Store 452(bv) 492
493: 190(i8vec3) Load 354(u8v) 493: 190(i8vec3) Load 351(u8v)
494: 36(int8_t) Load 356(u8) 494: 36(int8_t) Load 353(u8)
495: 14(int8_t) Bitcast 494 495: 190(i8vec3) CompositeConstruct 494 494 494
496: 190(i8vec3) CompositeConstruct 495 495 495 496: 420(bvec3) IEqual 493 495
497: 427(bvec3) SGreaterThanEqual 493 496 Store 452(bv) 496
Store 459(bv) 497 497: 52(i8vec2) Load 338(i8v)
498: 52(i8vec2) Load 341(i8v) 498: 14(int8_t) Load 341(i8)
499: 14(int8_t) Load 344(i8) 499: 52(i8vec2) CompositeConstruct 498 498
500: 52(i8vec2) CompositeConstruct 499 499 500: 172(bvec2) IEqual 497 499
501: 172(bvec2) SGreaterThanEqual 498 500 501: 420(bvec3) Load 452(bv)
502: 427(bvec3) Load 459(bv) 502: 420(bvec3) VectorShuffle 501 500 3 4 2
503: 427(bvec3) VectorShuffle 502 501 3 4 2 Store 452(bv) 502
Store 459(bv) 503 503: 190(i8vec3) Load 351(u8v)
504: 190(i8vec3) Load 354(u8v) 504: 36(int8_t) Load 353(u8)
505: 36(int8_t) Load 356(u8) 505: 190(i8vec3) CompositeConstruct 504 504 504
506: 14(int8_t) Bitcast 505 506: 420(bvec3) INotEqual 503 505
507: 190(i8vec3) CompositeConstruct 506 506 506 Store 452(bv) 506
508: 427(bvec3) IEqual 504 507 507: 52(i8vec2) Load 338(i8v)
Store 459(bv) 508 508: 14(int8_t) Load 341(i8)
509: 52(i8vec2) Load 341(i8v) 509: 52(i8vec2) CompositeConstruct 508 508
510: 14(int8_t) Load 344(i8) 510: 172(bvec2) INotEqual 507 509
511: 52(i8vec2) CompositeConstruct 510 510 511: 420(bvec3) Load 452(bv)
512: 172(bvec2) IEqual 509 511 512: 420(bvec3) VectorShuffle 511 510 3 4 2
513: 427(bvec3) Load 459(bv) Store 452(bv) 512
514: 427(bvec3) VectorShuffle 513 512 3 4 2
Store 459(bv) 514
515: 190(i8vec3) Load 354(u8v)
516: 36(int8_t) Load 356(u8)
517: 14(int8_t) Bitcast 516
518: 190(i8vec3) CompositeConstruct 517 517 517
519: 427(bvec3) INotEqual 515 518
Store 459(bv) 519
520: 52(i8vec2) Load 341(i8v)
521: 14(int8_t) Load 344(i8)
522: 52(i8vec2) CompositeConstruct 521 521
523: 172(bvec2) INotEqual 520 522
524: 427(bvec3) Load 459(bv)
525: 427(bvec3) VectorShuffle 524 523 3 4 2
Store 459(bv) 525
Return Return
FunctionEnd FunctionEnd

0
Test/runtimeArray.vert Normal file → Executable file
View File

90
Test/spv.16bitstorage-int.frag Executable file
View File

@ -0,0 +1,90 @@
#version 450 core
#extension GL_EXT_shader_16bit_storage : enable
struct S
{
int16_t x;
i16vec2 y;
i16vec3 z;
};
layout(column_major, std140) uniform B1
{
int16_t a;
i16vec2 b;
i16vec3 c;
int16_t d[2];
S g;
S h[2];
int j;
} b1;
layout(row_major, std430) buffer B2
{
int16_t o;
i16vec2 p;
i16vec3 q;
int16_t r[2];
S u;
S v[2];
i16vec2 x[100];
int16_t w[];
} b2;
layout(row_major, std140) uniform B5
{
int16_t o;
i16vec2 p;
i16vec3 q;
int16_t r[2];
S u;
S v[2];
i16vec2 x[100];
int16_t w[100];
} b5;
struct S2 {
mat4x4 x;
int16_t y;
int z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
S3 y;
} b4;
void main()
{
b2.o = b1.a;
b2.p = i16vec2(ivec3(b2.q).xy);
b2.p = i16vec2(ivec3(b5.q).xy);
b2.r[0] = b2.r[0];
b2.r[1] = b5.r[1];
b2.p = b2.p;
int x0 = int(b1.a);
ivec4 x1 = ivec4(b1.a, b2.p, 1);
b4.x.x = b3.x.x;
b2.o = int16_t(ivec2(b2.p).x);
b2.p = b2.v[1].y;
ivec3 v3 = ivec3(b2.w[b1.j], b2.w[b1.j+1], b2.w[b1.j+2]);
ivec3 u3 = ivec3(b5.w[b1.j], b5.w[b1.j+1], b5.w[b1.j+2]);
b2.x[0] = b2.x[0];
b2.x[1] = b5.x[1];
b2.p.x = b1.a;
b2.o = b2.p.x;
b2.p = i16vec2(ivec2(1, 2));
b2.o = int16_t(3);
}

90
Test/spv.16bitstorage-uint.frag Executable file
View File

@ -0,0 +1,90 @@
#version 450 core
#extension GL_EXT_shader_16bit_storage : enable
struct S
{
uint16_t x;
u16vec2 y;
u16vec3 z;
};
layout(column_major, std140) uniform B1
{
uint16_t a;
u16vec2 b;
u16vec3 c;
uint16_t d[2];
S g;
S h[2];
uint j;
} b1;
layout(row_major, std430) buffer B2
{
uint16_t o;
u16vec2 p;
u16vec3 q;
uint16_t r[2];
S u;
S v[2];
u16vec2 x[100];
uint16_t w[];
} b2;
layout(row_major, std140) uniform B5
{
uint16_t o;
u16vec2 p;
u16vec3 q;
uint16_t r[2];
S u;
S v[2];
u16vec2 x[100];
uint16_t w[100];
} b5;
struct S2 {
mat4x4 x;
uint16_t y;
uint z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
S3 y;
} b4;
void main()
{
b2.o = b1.a;
b2.p = u16vec2(uvec3(b2.q).xy);
b2.p = u16vec2(uvec3(b5.q).xy);
b2.r[0] = b2.r[0];
b2.r[1] = b5.r[1];
b2.p = b2.p;
uint x0 = uint(b1.a);
uvec4 x1 = uvec4(b1.a, b2.p, 1);
b4.x.x = b3.x.x;
b2.o = uint16_t(uvec2(b2.p).x);
b2.p = b2.v[1].y;
uvec3 v3 = uvec3(b2.w[b1.j], b2.w[b1.j+1], b2.w[b1.j+2]);
uvec3 u3 = uvec3(b5.w[b1.j], b5.w[b1.j+1], b5.w[b1.j+2]);
b2.x[0] = b2.x[0];
b2.x[1] = b5.x[1];
b2.p.x = b1.a;
b2.o = b2.p.x;
b2.p = u16vec2(uvec2(1, 2));
b2.o = uint16_t(3u);
}

90
Test/spv.16bitstorage.frag Executable file
View File

@ -0,0 +1,90 @@
#version 450 core
#extension GL_EXT_shader_16bit_storage : enable
struct S
{
float16_t x;
f16vec2 y;
f16vec3 z;
};
layout(column_major, std140) uniform B1
{
float16_t a;
f16vec2 b;
f16vec3 c;
float16_t d[2];
S g;
S h[2];
int j;
} b1;
layout(row_major, std430) buffer B2
{
float16_t o;
f16vec2 p;
f16vec3 q;
float16_t r[2];
S u;
S v[2];
f16vec2 x[100];
float16_t w[];
} b2;
layout(row_major, std140) uniform B5
{
float16_t o;
f16vec2 p;
f16vec3 q;
float16_t r[2];
S u;
S v[2];
f16vec2 x[100];
float16_t w[100];
} b5;
struct S2 {
mat4x4 x;
float16_t y;
float z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
S3 y;
} b4;
void main()
{
b2.o = b1.a;
b2.p = f16vec2(vec3(b2.q).xy);
b2.p = f16vec2(vec3(b5.q).xy);
b2.r[0] = b2.r[0];
b2.r[1] = b5.r[1];
b2.p = b2.p;
float x0 = float(b1.a);
vec4 x1 = vec4(b1.a, b2.p, 1.0);
b4.x.x = b3.x.x;
b2.o = float16_t(vec2(b2.p).x);
b2.p = b2.v[1].y;
vec3 v3 = vec3(b2.w[b1.j], b2.w[b1.j+1], b2.w[b1.j+2]);
vec3 u3 = vec3(b5.w[b1.j], b5.w[b1.j+1], b5.w[b1.j+2]);
b2.x[0] = b2.x[0];
b2.x[1] = b5.x[1];
b2.p.x = b1.a;
b2.o = b2.p.x;
b2.p = f16vec2(vec2(1.0, 2.0));
b2.o = float16_t(3.0);
}

View File

@ -0,0 +1,101 @@
#version 450 core
#extension GL_EXT_shader_16bit_storage : enable
struct S
{
int16_t x;
i16vec2 y;
i16vec3 z;
};
layout(column_major, std140) uniform B1
{
int16_t a;
i16vec2 b;
i16vec3 c;
int16_t d[2];
S g;
S h[2];
int j;
} b1;
layout(row_major, std430) buffer B2
{
int16_t o;
i16vec2 p;
i16vec3 q;
int16_t r[2];
S u;
S v[2];
int16_t w[];
} b2;
struct S2 {
mat4x4 x;
int16_t y;
int z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
} b4;
void func3(S2 x) {
}
S2 func4() {
return b4.x;
}
int func(int16_t a) {
return 0;
}
struct S4 {
int x;
int16_t y;
};
int func2(int a) { return 0; }
void main()
{
b2.o = b2.q[1];
b2.p = b2.q.xy;
b2.o = max(b1.a, b1.a);
bvec2 bv = lessThan(b2.p, b2.p);
b2.o = b1.a + b1.a;
b2.o = -b1.a;
b2.o = b1.a + 1;
b2.p = b2.p.yx;
b4.x = b3.x;
int16_t f0;
S2 f1;
S3 f2;
if (b1.a == b1.a) {}
b2.r = b2.r;
b2.p = i16vec2(3, 4);
i16vec2[2](i16vec2(ivec2(1,2)), i16vec2(ivec2(3,4)));
// NOT ERRORING YET
b3.x;
S4(0, int16_t(0));
func2(b1.a);
}
layout(column_major, std140) uniform B6
{
i16mat2x3 e;
} b6;

View File

@ -0,0 +1,101 @@
#version 450 core
#extension GL_EXT_shader_16bit_storage : enable
struct S
{
uint16_t x;
u16vec2 y;
u16vec3 z;
};
layout(column_major, std140) uniform B1
{
uint16_t a;
u16vec2 b;
u16vec3 c;
uint16_t d[2];
S g;
S h[2];
uint j;
} b1;
layout(row_major, std430) buffer B2
{
uint16_t o;
u16vec2 p;
u16vec3 q;
uint16_t r[2];
S u;
S v[2];
uint16_t w[];
} b2;
struct S2 {
mat4x4 x;
uint16_t y;
uint z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
} b4;
void func3(S2 x) {
}
S2 func4() {
return b4.x;
}
uint func(uint16_t a) {
return 0;
}
struct S4 {
uint x;
uint16_t y;
};
uint func2(uint a) { return 0; }
void main()
{
b2.o = b2.q[1];
b2.p = b2.q.xy;
b2.o = max(b1.a, b1.a);
bvec2 bv = lessThan(b2.p, b2.p);
b2.o = b1.a + b1.a;
b2.o = -b1.a;
b2.o = b1.a + 1;
b2.p = b2.p.yx;
b4.x = b3.x;
uint16_t f0;
S2 f1;
S3 f2;
if (b1.a == b1.a) {}
b2.r = b2.r;
b2.p = u16vec2(3, 4);
u16vec2[2](u16vec2(uvec2(1,2)), u16vec2(uvec2(3,4)));
// NOT ERRORING YET
b3.x;
S4(0u, uint16_t(0u));
func2(b1.a);
}
layout(column_major, std140) uniform B6
{
u16mat2x3 e;
} b6;

102
Test/spv.16bitstorage_Error.frag Executable file
View File

@ -0,0 +1,102 @@
#version 450 core
#extension GL_EXT_shader_16bit_storage : enable
struct S
{
float16_t x;
f16vec2 y;
f16vec3 z;
};
layout(column_major, std140) uniform B1
{
float16_t a;
f16vec2 b;
f16vec3 c;
float16_t d[2];
S g;
S h[2];
int j;
} b1;
layout(row_major, std430) buffer B2
{
float16_t o;
f16vec2 p;
f16vec3 q;
float16_t r[2];
S u;
S v[2];
float16_t w[];
} b2;
struct S2 {
mat4x4 x;
float16_t y;
float z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
} b4;
void func3(S2 x) {
}
S2 func4() {
return b4.x;
}
float func(float16_t a) {
return 0.0;
}
struct S4 {
float x;
float16_t y;
};
float func2(float a) { return 0.0; }
void main()
{
b2.o = b2.q[1];
b2.p = b2.q.xy;
b2.o = max(b1.a, b1.a);
bvec2 bv = lessThan(b2.p, b2.p);
b2.o = b1.a + b1.a;
b2.o = -b1.a;
b2.o = b1.a + 1.0;
b2.p = b2.p.yx;
b4.x = b3.x;
float16_t f0;
S2 f1;
S3 f2;
if (b1.a == b1.a) {}
b2.r = b2.r;
b2.o = 1.0HF;
b2.p = f16vec2(3.0, 4.0);
f16vec2[2](f16vec2(vec2(1.0,2.0)), f16vec2(vec2(3.0,4.0)));
// NOT ERRORING YET
b3.x;
S4(0.0, float16_t(0.0));
func2(b1.a);
}
layout(column_major, std140) uniform B6
{
f16mat2x3 e;
} b6;

90
Test/spv.8bitstorage-int.frag Executable file
View File

@ -0,0 +1,90 @@
#version 450 core
#extension GL_EXT_shader_8bit_storage : enable
struct S
{
int8_t x;
i8vec2 y;
i8vec3 z;
};
layout(column_major, std140) uniform B1
{
int8_t a;
i8vec2 b;
i8vec3 c;
int8_t d[2];
S g;
S h[2];
int j;
} b1;
layout(row_major, std430) buffer B2
{
int8_t o;
i8vec2 p;
i8vec3 q;
int8_t r[2];
S u;
S v[2];
i8vec2 x[100];
int8_t w[];
} b2;
layout(row_major, std140) uniform B5
{
int8_t o;
i8vec2 p;
i8vec3 q;
int8_t r[2];
S u;
S v[2];
i8vec2 x[100];
int8_t w[100];
} b5;
struct S2 {
mat4x4 x;
int8_t y;
int z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
S3 y;
} b4;
void main()
{
b2.o = b1.a;
b2.p = i8vec2(ivec3(b2.q).xy);
b2.p = i8vec2(ivec3(b5.q).xy);
b2.r[0] = b2.r[0];
b2.r[1] = b5.r[1];
b2.p = b2.p;
int x0 = int(b1.a);
ivec4 x1 = ivec4(b1.a, b2.p, 1);
b4.x.x = b3.x.x;
b2.o = int8_t(ivec2(b2.p).x);
b2.p = b2.v[1].y;
ivec3 v3 = ivec3(b2.w[b1.j], b2.w[b1.j+1], b2.w[b1.j+2]);
ivec3 u3 = ivec3(b5.w[b1.j], b5.w[b1.j+1], b5.w[b1.j+2]);
b2.x[0] = b2.x[0];
b2.x[1] = b5.x[1];
b2.p.x = b1.a;
b2.o = b2.p.x;
b2.p = i8vec2(ivec2(1, 2));
b2.o = int8_t(3);
}

90
Test/spv.8bitstorage-uint.frag Executable file
View File

@ -0,0 +1,90 @@
#version 450 core
#extension GL_EXT_shader_8bit_storage : enable
struct S
{
uint8_t x;
u8vec2 y;
u8vec3 z;
};
layout(column_major, std140) uniform B1
{
uint8_t a;
u8vec2 b;
u8vec3 c;
uint8_t d[2];
S g;
S h[2];
uint j;
} b1;
layout(row_major, std430) buffer B2
{
uint8_t o;
u8vec2 p;
u8vec3 q;
uint8_t r[2];
S u;
S v[2];
u8vec2 x[100];
uint8_t w[];
} b2;
layout(row_major, std140) uniform B5
{
uint8_t o;
u8vec2 p;
u8vec3 q;
uint8_t r[2];
S u;
S v[2];
u8vec2 x[100];
uint8_t w[100];
} b5;
struct S2 {
mat4x4 x;
uint8_t y;
uint z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
S3 y;
} b4;
void main()
{
b2.o = b1.a;
b2.p = u8vec2(uvec3(b2.q).xy);
b2.p = u8vec2(uvec3(b5.q).xy);
b2.r[0] = b2.r[0];
b2.r[1] = b5.r[1];
b2.p = b2.p;
uint x0 = uint(b1.a);
uvec4 x1 = uvec4(b1.a, b2.p, 1);
b4.x.x = b3.x.x;
b2.o = uint8_t(uvec2(b2.p).x);
b2.p = b2.v[1].y;
uvec3 v3 = uvec3(b2.w[b1.j], b2.w[b1.j+1], b2.w[b1.j+2]);
uvec3 u3 = uvec3(b5.w[b1.j], b5.w[b1.j+1], b5.w[b1.j+2]);
b2.x[0] = b2.x[0];
b2.x[1] = b5.x[1];
b2.p.x = b1.a;
b2.o = b2.p.x;
b2.p = u8vec2(uvec2(1, 2));
b2.o = uint8_t(3u);
}

View File

@ -0,0 +1,101 @@
#version 450 core
#extension GL_EXT_shader_8bit_storage : enable
struct S
{
int8_t x;
i8vec2 y;
i8vec3 z;
};
layout(column_major, std140) uniform B1
{
int8_t a;
i8vec2 b;
i8vec3 c;
int8_t d[2];
S g;
S h[2];
int j;
} b1;
layout(row_major, std430) buffer B2
{
int8_t o;
i8vec2 p;
i8vec3 q;
int8_t r[2];
S u;
S v[2];
int8_t w[];
} b2;
struct S2 {
mat4x4 x;
int8_t y;
int z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
} b4;
void func3(S2 x) {
}
S2 func4() {
return b4.x;
}
int func(int8_t a) {
return 0;
}
struct S4 {
int x;
int8_t y;
};
int func2(int a) { return 0; }
void main()
{
b2.o = b2.q[1];
b2.p = b2.q.xy;
b2.o = max(b1.a, b1.a);
bvec2 bv = lessThan(b2.p, b2.p);
b2.o = b1.a + b1.a;
b2.o = -b1.a;
b2.o = b1.a + 1;
b2.p = b2.p.yx;
b4.x = b3.x;
int8_t f0;
S2 f1;
S3 f2;
if (b1.a == b1.a) {}
b2.r = b2.r;
b2.p = i8vec2(3, 4);
i8vec2[2](i8vec2(ivec2(1,2)), i8vec2(ivec2(3,4)));
// NOT ERRORING YET
b3.x;
S4(0, int8_t(0));
func2(b1.a);
}
layout(column_major, std140) uniform B6
{
i8mat2x3 e;
} b6;

View File

@ -0,0 +1,101 @@
#version 450 core
#extension GL_EXT_shader_8bit_storage : enable
struct S
{
uint8_t x;
u8vec2 y;
u8vec3 z;
};
layout(column_major, std140) uniform B1
{
uint8_t a;
u8vec2 b;
u8vec3 c;
uint8_t d[2];
S g;
S h[2];
uint j;
} b1;
layout(row_major, std430) buffer B2
{
uint8_t o;
u8vec2 p;
u8vec3 q;
uint8_t r[2];
S u;
S v[2];
uint8_t w[];
} b2;
struct S2 {
mat4x4 x;
uint8_t y;
uint z;
};
struct S3 {
S2 x;
};
layout(row_major, std430) buffer B3
{
S2 x;
} b3;
layout(column_major, std430) buffer B4
{
S2 x;
} b4;
void func3(S2 x) {
}
S2 func4() {
return b4.x;
}
uint func(uint8_t a) {
return 0;
}
struct S4 {
uint x;
uint8_t y;
};
uint func2(uint a) { return 0; }
void main()
{
b2.o = b2.q[1];
b2.p = b2.q.xy;
b2.o = max(b1.a, b1.a);
bvec2 bv = lessThan(b2.p, b2.p);
b2.o = b1.a + b1.a;
b2.o = -b1.a;
b2.o = b1.a + 1;
b2.p = b2.p.yx;
b4.x = b3.x;
uint8_t f0;
S2 f1;
S3 f2;
if (b1.a == b1.a) {}
b2.r = b2.r;
b2.p = u8vec2(3, 4);
u8vec2[2](u8vec2(uvec2(1,2)), u8vec2(uvec2(3,4)));
// NOT ERRORING YET
b3.x;
S4(0u, uint8_t(0u));
func2(b1.a);
}
layout(column_major, std140) uniform B6
{
u8mat2x3 e;
} b6;

10
glslang/Include/Types.h Normal file → Executable file
View File

@ -1472,6 +1472,16 @@ public:
return contains([](const TType* t) { return t->isArray() && t->arraySizes->isOuterSpecialization(); } ); return contains([](const TType* t) { return t->isArray() && t->arraySizes->isOuterSpecialization(); } );
} }
virtual bool contains16BitInt() const
{
return containsBasicType(EbtInt16) || containsBasicType(EbtUint16);
}
virtual bool contains8BitInt() const
{
return containsBasicType(EbtInt8) || containsBasicType(EbtUint8);
}
// Array editing methods. Array descriptors can be shared across // Array editing methods. Array descriptors can be shared across
// type instances. This allows all uses of the same array // type instances. This allows all uses of the same array
// to be updated at once. E.g., all nodes can be explicitly sized // to be updated at once. E.g., all nodes can be explicitly sized

View File

@ -1,3 +1,3 @@
// This header is generated by the make-revision script. // This header is generated by the make-revision script.
#define GLSLANG_PATCH_LEVEL 2796 #define GLSLANG_PATCH_LEVEL 2797

76
glslang/MachineIndependent/Intermediate.cpp Normal file → Executable file
View File

@ -881,6 +881,9 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
// like vector and matrix sizes. // like vector and matrix sizes.
TBasicType promoteTo; TBasicType promoteTo;
// GL_EXT_shader_16bit_storage can't do OpConstantComposite with
// 16-bit types, so disable promotion for those types.
bool canPromoteConstant = true;
switch (op) { switch (op) {
// //
@ -897,18 +900,28 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
break; break;
case EOpConstructFloat16: case EOpConstructFloat16:
promoteTo = EbtFloat16; promoteTo = EbtFloat16;
canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) ||
extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_float16);
break; break;
case EOpConstructInt8: case EOpConstructInt8:
promoteTo = EbtInt8; promoteTo = EbtInt8;
canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) ||
extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int8);
break; break;
case EOpConstructUint8: case EOpConstructUint8:
promoteTo = EbtUint8; promoteTo = EbtUint8;
canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) ||
extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int8);
break; break;
case EOpConstructInt16: case EOpConstructInt16:
promoteTo = EbtInt16; promoteTo = EbtInt16;
canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) ||
extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int16);
break; break;
case EOpConstructUint16: case EOpConstructUint16:
promoteTo = EbtUint16; promoteTo = EbtUint16;
canPromoteConstant = extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types) ||
extensionRequested(E_GL_KHX_shader_explicit_arithmetic_types_int16);
break; break;
case EOpConstructInt: case EOpConstructInt:
promoteTo = EbtInt; promoteTo = EbtInt;
@ -999,7 +1012,7 @@ TIntermTyped* TIntermediate::addConversion(TOperator op, const TType& type, TInt
return nullptr; return nullptr;
} }
if (node->getAsConstantUnion()) if (canPromoteConstant && node->getAsConstantUnion())
return promoteConstantUnion(promoteTo, node->getAsConstantUnion()); return promoteConstantUnion(promoteTo, node->getAsConstantUnion());
// //
@ -1468,16 +1481,16 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtUint: case EbtUint:
case EbtInt64: case EbtInt64:
case EbtUint64: case EbtUint64:
case EbtFloat:
case EbtDouble:
return true;
#ifdef AMD_EXTENSIONS #ifdef AMD_EXTENSIONS
case EbtInt16: case EbtInt16:
case EbtUint16: case EbtUint16:
#endif return extensionRequested(E_GL_AMD_gpu_shader_int16);
case EbtFloat:
case EbtDouble:
#ifdef AMD_EXTENSIONS
case EbtFloat16: case EbtFloat16:
return extensionRequested(E_GL_AMD_gpu_shader_half_float);
#endif #endif
return true;
default: default:
return false; return false;
} }
@ -1485,17 +1498,21 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
switch (from) { switch (from) {
case EbtInt: case EbtInt:
case EbtUint: case EbtUint:
#ifdef AMD_EXTENSIONS
case EbtInt16:
case EbtUint16:
#endif
case EbtFloat: case EbtFloat:
#ifdef AMD_EXTENSIONS
case EbtFloat16:
#endif
return true; return true;
case EbtBool: case EbtBool:
return (source == EShSourceHlsl); return (source == EShSourceHlsl);
#ifdef AMD_EXTENSIONS
case EbtInt16:
case EbtUint16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
#endif
case EbtFloat16:
return
#ifdef AMD_EXTENSIONS
extensionRequested(E_GL_AMD_gpu_shader_half_float) ||
#endif
(source == EShSourceHlsl);
default: default:
return false; return false;
} }
@ -1504,25 +1521,27 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtInt: case EbtInt:
return version >= 400 || (source == EShSourceHlsl); return version >= 400 || (source == EShSourceHlsl);
case EbtUint: case EbtUint:
#ifdef AMD_EXTENSIONS
case EbtInt16:
case EbtUint16:
#endif
return true; return true;
case EbtBool: case EbtBool:
return (source == EShSourceHlsl); return (source == EShSourceHlsl);
#ifdef AMD_EXTENSIONS
case EbtInt16:
case EbtUint16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
#endif
default: default:
return false; return false;
} }
case EbtInt: case EbtInt:
switch (from) { switch (from) {
case EbtInt: case EbtInt:
#ifdef AMD_EXTENSIONS
case EbtInt16:
#endif
return true; return true;
case EbtBool: case EbtBool:
return (source == EShSourceHlsl); return (source == EShSourceHlsl);
#ifdef AMD_EXTENSIONS
case EbtInt16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
#endif
default: default:
return false; return false;
} }
@ -1532,11 +1551,12 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
case EbtUint: case EbtUint:
case EbtInt64: case EbtInt64:
case EbtUint64: case EbtUint64:
return true;
#ifdef AMD_EXTENSIONS #ifdef AMD_EXTENSIONS
case EbtInt16: case EbtInt16:
case EbtUint16: case EbtUint16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
#endif #endif
return true;
default: default:
return false; return false;
} }
@ -1544,32 +1564,36 @@ bool TIntermediate::canImplicitlyPromote(TBasicType from, TBasicType to, TOperat
switch (from) { switch (from) {
case EbtInt: case EbtInt:
case EbtInt64: case EbtInt64:
return true;
#ifdef AMD_EXTENSIONS #ifdef AMD_EXTENSIONS
case EbtInt16: case EbtInt16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
#endif #endif
return true;
default: default:
return false; return false;
} }
#ifdef AMD_EXTENSIONS
case EbtFloat16: case EbtFloat16:
switch (from) { switch (from) {
#ifdef AMD_EXTENSIONS
case EbtInt16: case EbtInt16:
case EbtUint16: case EbtUint16:
return extensionRequested(E_GL_AMD_gpu_shader_int16);
case EbtFloat16: case EbtFloat16:
return true; return extensionRequested(E_GL_AMD_gpu_shader_half_float);
#endif
default: default:
return false; return false;
} }
case EbtUint16: case EbtUint16:
switch (from) { switch (from) {
#ifdef AMD_EXTENSIONS
case EbtInt16: case EbtInt16:
case EbtUint16: case EbtUint16:
return true; return extensionRequested(E_GL_AMD_gpu_shader_int16);
#endif
default: default:
return false; return false;
} }
#endif
default: default:
return false; return false;
} }

View File

@ -354,25 +354,44 @@ TIntermTyped* TParseContext::handleVariable(const TSourceLoc& loc, TSymbol* symb
// //
TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index) TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIntermTyped* base, TIntermTyped* index)
{ {
TIntermTyped* result = nullptr;
int indexValue = 0; int indexValue = 0;
if (index->getQualifier().isFrontEndConstant()) if (index->getQualifier().isFrontEndConstant())
indexValue = index->getAsConstantUnion()->getConstArray()[0].getIConst(); indexValue = index->getAsConstantUnion()->getConstArray()[0].getIConst();
// basic type checks...
variableCheck(base); variableCheck(base);
if (! base->isArray() && ! base->isMatrix() && ! base->isVector()) { if (! base->isArray() && ! base->isMatrix() && ! base->isVector()) {
if (base->getAsSymbolNode()) if (base->getAsSymbolNode())
error(loc, " left of '[' is not of type array, matrix, or vector ", base->getAsSymbolNode()->getName().c_str(), ""); error(loc, " left of '[' is not of type array, matrix, or vector ", base->getAsSymbolNode()->getName().c_str(), "");
else else
error(loc, " left of '[' is not of type array, matrix, or vector ", "expression", ""); error(loc, " left of '[' is not of type array, matrix, or vector ", "expression", "");
} else if (base->getType().getQualifier().isFrontEndConstant() && index->getQualifier().isFrontEndConstant()) {
// Insert dummy error-recovery result
return intermediate.addConstantUnion(0.0, EbtFloat, loc);
}
if (!base->isArray() && base->isVector()) {
if (base->getType().containsBasicType(EbtFloat16)) {
requireFloat16Arithmetic(loc, "'[' does not operate on types containing float16");
}
if (base->getType().contains16BitInt()) {
requireInt16Arithmetic(loc, "'[' does not operate on types containing (u)int16");
}
if (base->getType().contains8BitInt()) {
requireInt8Arithmetic(loc, "'[' does not operate on types containing (u)int8");
}
}
// check for constant folding
if (base->getType().getQualifier().isFrontEndConstant() && index->getQualifier().isFrontEndConstant()) {
// both base and index are front-end constants // both base and index are front-end constants
checkIndex(loc, base->getType(), indexValue); checkIndex(loc, base->getType(), indexValue);
return intermediate.foldDereference(base, indexValue, loc); return intermediate.foldDereference(base, indexValue, loc);
} else { }
// at least one of base and index is not a front-end constant variable...
// at least one of base and index is not a front-end constant variable...
TIntermTyped* result = nullptr;
if (index->getQualifier().isFrontEndConstant()) if (index->getQualifier().isFrontEndConstant())
checkIndex(loc, base->getType(), indexValue); checkIndex(loc, base->getType(), indexValue);
@ -417,12 +436,7 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
result = intermediate.addIndex(EOpIndexIndirect, base, index, loc); result = intermediate.addIndex(EOpIndexIndirect, base, index, loc);
} }
}
if (result == nullptr) {
// Insert dummy error-recovery result
result = intermediate.addConstantUnion(0.0, EbtFloat, loc);
} else {
// Insert valid dereferenced result // Insert valid dereferenced result
TType newType(base->getType(), 0); // dereferenced type TType newType(base->getType(), 0); // dereferenced type
if (base->getType().getQualifier().isConstant() && index->getQualifier().isConstant()) { if (base->getType().getQualifier().isConstant() && index->getQualifier().isConstant()) {
@ -442,7 +456,6 @@ TIntermTyped* TParseContext::handleBracketDereference(const TSourceLoc& loc, TIn
if (anyIndexLimits) if (anyIndexLimits)
handleIndexLimits(loc, base, index); handleIndexLimits(loc, base, index);
}
return result; return result;
} }
@ -615,6 +628,12 @@ TIntermTyped* TParseContext::handleBinaryMath(const TSourceLoc& loc, const char*
break; break;
} }
if (((left->getType().containsBasicType(EbtFloat16) || right->getType().containsBasicType(EbtFloat16)) && !float16Arithmetic()) ||
((left->getType().contains16BitInt() || right->getType().contains16BitInt()) && !int16Arithmetic()) ||
((left->getType().contains8BitInt() || right->getType().contains8BitInt()) && !int8Arithmetic())) {
allowed = false;
}
TIntermTyped* result = nullptr; TIntermTyped* result = nullptr;
if (allowed) if (allowed)
result = intermediate.addBinaryMath(op, left, right, loc); result = intermediate.addBinaryMath(op, left, right, loc);
@ -630,7 +649,17 @@ TIntermTyped* TParseContext::handleUnaryMath(const TSourceLoc& loc, const char*
{ {
rValueErrorCheck(loc, str, childNode); rValueErrorCheck(loc, str, childNode);
TIntermTyped* result = intermediate.addUnaryMath(op, childNode, loc); bool allowed = true;
if ((childNode->getType().containsBasicType(EbtFloat16) && !float16Arithmetic()) ||
(childNode->getType().contains16BitInt() && !int16Arithmetic()) ||
(childNode->getType().contains8BitInt() && !int8Arithmetic())) {
allowed = false;
}
TIntermTyped* result = nullptr;
if (allowed)
result = intermediate.addUnaryMath(op, childNode, loc);
if (result) if (result)
return result; return result;
@ -692,6 +721,16 @@ TIntermTyped* TParseContext::handleDotDereference(const TSourceLoc& loc, TInterm
TSwizzleSelectors<TVectorSelector> selectors; TSwizzleSelectors<TVectorSelector> selectors;
parseSwizzleSelector(loc, field, base->getVectorSize(), selectors); parseSwizzleSelector(loc, field, base->getVectorSize(), selectors);
if (base->isVector() && selectors.size() != 1 && base->getType().containsBasicType(EbtFloat16)) {
requireFloat16Arithmetic(loc, "can't swizzle types containing float16");
}
if (base->isVector() && selectors.size() != 1 && base->getType().contains16BitInt()) {
requireInt16Arithmetic(loc, "can't swizzle types containing (u)int16");
}
if (base->isVector() && selectors.size() != 1 && base->getType().contains8BitInt()) {
requireInt8Arithmetic(loc, "can't swizzle types containing (u)int8");
}
if (base->isScalar()) { if (base->isScalar()) {
if (selectors.size() == 1) if (selectors.size() == 1)
return result; return result;
@ -970,6 +1009,16 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
if (builtIn && fnCandidate->getNumExtensions()) if (builtIn && fnCandidate->getNumExtensions())
requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(), fnCandidate->getName().c_str()); requireExtensions(loc, fnCandidate->getNumExtensions(), fnCandidate->getExtensions(), fnCandidate->getName().c_str());
if (builtIn && fnCandidate->getType().containsBasicType(EbtFloat16)) {
requireFloat16Arithmetic(loc, "float16 types can only be in uniform block or buffer storage");
}
if (builtIn && fnCandidate->getType().contains16BitInt()) {
requireInt16Arithmetic(loc, "(u)int16 types can only be in uniform block or buffer storage");
}
if (builtIn && fnCandidate->getType().contains8BitInt()) {
requireInt8Arithmetic(loc, "(u)int8 types can only be in uniform block or buffer storage");
}
if (arguments != nullptr) { if (arguments != nullptr) {
// Make sure qualifications work for these arguments. // Make sure qualifications work for these arguments.
TIntermAggregate* aggregate = arguments->getAsAggregate(); TIntermAggregate* aggregate = arguments->getAsAggregate();
@ -995,6 +1044,17 @@ TIntermTyped* TParseContext::handleFunctionCall(const TSourceLoc& loc, TFunction
if (argQualifier.writeonly && ! formalQualifier.writeonly) if (argQualifier.writeonly && ! formalQualifier.writeonly)
error(arguments->getLoc(), message, "writeonly", ""); error(arguments->getLoc(), message, "writeonly", "");
} }
if (builtIn && arg->getAsTyped()->getType().containsBasicType(EbtFloat16)) {
requireFloat16Arithmetic(arguments->getLoc(), "float16 types can only be in uniform block or buffer storage");
}
if (builtIn && arg->getAsTyped()->getType().contains16BitInt()) {
requireInt16Arithmetic(arguments->getLoc(), "(u)int16 types can only be in uniform block or buffer storage");
}
if (builtIn && arg->getAsTyped()->getType().contains8BitInt()) {
requireInt8Arithmetic(arguments->getLoc(), "(u)int8 types can only be in uniform block or buffer storage");
}
// TODO 4.5 functionality: A shader will fail to compile // TODO 4.5 functionality: A shader will fail to compile
// if the value passed to the memargument of an atomic memory function does not correspond to a buffer or // if the value passed to the memargument of an atomic memory function does not correspond to a buffer or
// shared variable. It is acceptable to pass an element of an array or a single component of a vector to the // shared variable. It is acceptable to pass an element of an array or a single component of a vector to the
@ -1179,6 +1239,8 @@ void TParseContext::computeBuiltinPrecisions(TIntermTyped& node, const TFunction
TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermTyped* value) TIntermNode* TParseContext::handleReturnValue(const TSourceLoc& loc, TIntermTyped* value)
{ {
storage16BitAssignmentCheck(loc, value->getType(), "return");
functionReturnsValue = true; functionReturnsValue = true;
if (currentFunctionType->getBasicType() == EbtVoid) { if (currentFunctionType->getBasicType() == EbtVoid) {
error(loc, "void function cannot return a value", "return", ""); error(loc, "void function cannot return a value", "return", "");
@ -2353,6 +2415,68 @@ bool TParseContext::constructorError(const TSourceLoc& loc, TIntermNode* node, T
specConstType = true; specConstType = true;
if (function[arg].type->isFloatingDomain()) if (function[arg].type->isFloatingDomain())
floatArgument = true; floatArgument = true;
if (type.isStruct()) {
if (function[arg].type->containsBasicType(EbtFloat16)) {
requireFloat16Arithmetic(loc, "Can't construct structure containing 16-bit type");
}
if (function[arg].type->containsBasicType(EbtUint16) ||
function[arg].type->containsBasicType(EbtInt16)) {
requireInt16Arithmetic(loc, "Can't construct structure containing 16-bit type");
}
if (function[arg].type->containsBasicType(EbtUint8) ||
function[arg].type->containsBasicType(EbtInt8)) {
requireInt8Arithmetic(loc, "Can't construct structure containing 8-bit type");
}
}
}
switch (op) {
case EOpConstructFloat16:
case EOpConstructF16Vec2:
case EOpConstructF16Vec3:
case EOpConstructF16Vec4:
if (type.isArray()) {
requireFloat16Arithmetic(loc, "16-bit array constructors not supported");
}
if (type.isVector() && function.getParamCount() != 1) {
requireFloat16Arithmetic(loc, "16-bit vector constructors only take vector types");
}
break;
case EOpConstructUint16:
case EOpConstructU16Vec2:
case EOpConstructU16Vec3:
case EOpConstructU16Vec4:
case EOpConstructInt16:
case EOpConstructI16Vec2:
case EOpConstructI16Vec3:
case EOpConstructI16Vec4:
if (type.isArray()) {
requireInt16Arithmetic(loc, "16-bit array constructors not supported");
}
if (type.isVector() && function.getParamCount() != 1) {
requireInt16Arithmetic(loc, "16-bit vector constructors only take vector types");
}
break;
case EOpConstructUint8:
case EOpConstructU8Vec2:
case EOpConstructU8Vec3:
case EOpConstructU8Vec4:
case EOpConstructInt8:
case EOpConstructI8Vec2:
case EOpConstructI8Vec3:
case EOpConstructI8Vec4:
if (type.isArray()) {
requireInt8Arithmetic(loc, "8-bit array constructors not supported");
}
if (type.isVector() && function.getParamCount() != 1) {
requireInt8Arithmetic(loc, "8-bit vector constructors only take vector types");
}
break;
default:
break;
} }
// inherit constness from children // inherit constness from children
@ -3037,6 +3161,16 @@ void TParseContext::parameterTypeCheck(const TSourceLoc& loc, TStorageQualifier
{ {
if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque()) if ((qualifier == EvqOut || qualifier == EvqInOut) && type.isOpaque())
error(loc, "samplers and atomic_uints cannot be output parameters", type.getBasicTypeString().c_str(), ""); error(loc, "samplers and atomic_uints cannot be output parameters", type.getBasicTypeString().c_str(), "");
if (!parsingBuiltins && type.containsBasicType(EbtFloat16)) {
requireFloat16Arithmetic(loc, "float16 types can only be in uniform block or buffer storage");
}
if (!parsingBuiltins && type.contains16BitInt()) {
requireInt16Arithmetic(loc, "(u)int16 types can only be in uniform block or buffer storage");
}
if (!parsingBuiltins && type.contains8BitInt()) {
requireInt8Arithmetic(loc, "(u)int8 types can only be in uniform block or buffer storage");
}
} }
bool TParseContext::containsFieldWithBasicType(const TType& type, TBasicType basicType) bool TParseContext::containsFieldWithBasicType(const TType& type, TBasicType basicType)
@ -3811,6 +3945,39 @@ void TParseContext::opaqueCheck(const TSourceLoc& loc, const TType& type, const
error(loc, "can't use with samplers or structs containing samplers", op, ""); error(loc, "can't use with samplers or structs containing samplers", op, "");
} }
void TParseContext::storage16BitAssignmentCheck(const TSourceLoc& loc, const TType& type, const char* op)
{
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtFloat16))
requireFloat16Arithmetic(loc, "can't use with structs containing float16");
if (type.isArray() && type.getBasicType() == EbtFloat16)
requireFloat16Arithmetic(loc, "can't use with arrays containing float16");
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtInt16))
requireInt16Arithmetic(loc, "can't use with structs containing int16");
if (type.isArray() && type.getBasicType() == EbtInt16)
requireInt16Arithmetic(loc, "can't use with arrays containing int16");
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtUint16))
requireInt16Arithmetic(loc, "can't use with structs containing uint16");
if (type.isArray() && type.getBasicType() == EbtUint16)
requireInt16Arithmetic(loc, "can't use with arrays containing uint16");
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtInt8))
requireInt8Arithmetic(loc, "can't use with structs containing int8");
if (type.isArray() && type.getBasicType() == EbtInt8)
requireInt8Arithmetic(loc, "can't use with arrays containing int8");
if (type.getBasicType() == EbtStruct && containsFieldWithBasicType(type, EbtUint8))
requireInt8Arithmetic(loc, "can't use with structs containing uint8");
if (type.isArray() && type.getBasicType() == EbtUint8)
requireInt8Arithmetic(loc, "can't use with arrays containing uint8");
}
void TParseContext::specializationCheck(const TSourceLoc& loc, const TType& type, const char* op) void TParseContext::specializationCheck(const TSourceLoc& loc, const TType& type, const char* op)
{ {
if (type.containsSpecializationSize()) if (type.containsSpecializationSize())
@ -5414,6 +5581,18 @@ TIntermNode* TParseContext::declareVariable(const TSourceLoc& loc, TString& iden
atomicUintCheck(loc, type, identifier); atomicUintCheck(loc, type, identifier);
transparentOpaqueCheck(loc, type, identifier); transparentOpaqueCheck(loc, type, identifier);
if (type.getQualifier().storage != EvqUniform && type.getQualifier().storage != EvqBuffer) {
if (type.containsBasicType(EbtFloat16)) {
requireFloat16Arithmetic(loc, "float16 types can only be in uniform block or buffer storage");
}
if (type.contains16BitInt()) {
requireInt16Arithmetic(loc, "(u)int16 types can only be in uniform block or buffer storage");
}
if (type.contains8BitInt()) {
requireInt8Arithmetic(loc, "(u)int8 types can only be in uniform block or buffer storage");
}
}
if (identifier != "gl_FragCoord" && (publicType.shaderQualifiers.originUpperLeft || publicType.shaderQualifiers.pixelCenterInteger)) if (identifier != "gl_FragCoord" && (publicType.shaderQualifiers.originUpperLeft || publicType.shaderQualifiers.pixelCenterInteger))
error(loc, "can only apply origin_upper_left and pixel_center_origin to gl_FragCoord", "layout qualifier", ""); error(loc, "can only apply origin_upper_left and pixel_center_origin to gl_FragCoord", "layout qualifier", "");
if (identifier != "gl_FragDepth" && publicType.shaderQualifiers.layoutDepth != EldNone) if (identifier != "gl_FragDepth" && publicType.shaderQualifiers.layoutDepth != EldNone)

1
glslang/MachineIndependent/ParseHelper.h Normal file → Executable file
View File

@ -367,6 +367,7 @@ public:
void nestedStructCheck(const TSourceLoc&); void nestedStructCheck(const TSourceLoc&);
void arrayObjectCheck(const TSourceLoc&, const TType&, const char* op); void arrayObjectCheck(const TSourceLoc&, const TType&, const char* op);
void opaqueCheck(const TSourceLoc&, const TType&, const char* op); void opaqueCheck(const TSourceLoc&, const TType&, const char* op);
void storage16BitAssignmentCheck(const TSourceLoc&, const TType&, const char* op);
void specializationCheck(const TSourceLoc&, const TType&, const char* op); void specializationCheck(const TSourceLoc&, const TType&, const char* op);
void structTypeCheck(const TSourceLoc&, TPublicType&); void structTypeCheck(const TSourceLoc&, TPublicType&);
void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop); void inductiveLoopCheck(const TSourceLoc&, TIntermNode* init, TIntermLoop* loop);

View File

@ -1110,6 +1110,7 @@ int TScanContext::tokenizeIdentifier()
afterType = true; afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() || if (parseContext.symbolTable.atBuiltInLevel() ||
((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || ((parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) ||
parseContext.extensionTurnedOn(E_GL_EXT_shader_8bit_storage) ||
parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int8)) && parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int8)) &&
parseContext.profile != EEsProfile && parseContext.version >= 450)) parseContext.profile != EEsProfile && parseContext.version >= 450))
return keyword; return keyword;
@ -1130,6 +1131,7 @@ int TScanContext::tokenizeIdentifier()
#ifdef AMD_EXTENSIONS #ifdef AMD_EXTENSIONS
parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16) || parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_int16) ||
#endif #endif
parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) ||
parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) || parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) ||
parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int16)))) parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_int16))))
return keyword; return keyword;
@ -1201,6 +1203,20 @@ int TScanContext::tokenizeIdentifier()
case F16VEC2: case F16VEC2:
case F16VEC3: case F16VEC3:
case F16VEC4: case F16VEC4:
afterType = true;
if (parseContext.symbolTable.atBuiltInLevel() ||
(parseContext.profile != EEsProfile && parseContext.version >= 450 &&
(
#ifdef AMD_EXTENSIONS
parseContext.extensionTurnedOn(E_GL_AMD_gpu_shader_half_float) ||
#endif
parseContext.extensionTurnedOn(E_GL_EXT_shader_16bit_storage) ||
parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types) ||
parseContext.extensionTurnedOn(E_GL_KHX_shader_explicit_arithmetic_types_float16))))
return keyword;
return identifierOrType();
case F16MAT2: case F16MAT2:
case F16MAT3: case F16MAT3:
case F16MAT4: case F16MAT4:

View File

@ -202,6 +202,9 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_EXT_nonuniform_qualifier] = EBhDisable; extensionBehavior[E_GL_EXT_nonuniform_qualifier] = EBhDisable;
extensionBehavior[E_GL_EXT_samplerless_texture_functions] = EBhDisable; extensionBehavior[E_GL_EXT_samplerless_texture_functions] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_16bit_storage] = EBhDisable;
extensionBehavior[E_GL_EXT_shader_8bit_storage] = EBhDisable;
// #line and #include // #line and #include
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable; extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable; extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable;
@ -363,6 +366,8 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_EXT_post_depth_coverage 1\n" "#define GL_EXT_post_depth_coverage 1\n"
"#define GL_EXT_control_flow_attributes 1\n" "#define GL_EXT_control_flow_attributes 1\n"
"#define GL_EXT_nonuniform_qualifier 1\n" "#define GL_EXT_nonuniform_qualifier 1\n"
"#define GL_EXT_shader_16bit_storage 1\n"
"#define GL_EXT_shader_8bit_storage 1\n"
"#define GL_EXT_samplerless_texture_functions 1\n" "#define GL_EXT_samplerless_texture_functions 1\n"
// GL_KHR_shader_subgroup // GL_KHR_shader_subgroup
@ -813,27 +818,94 @@ void TParseVersions::fullIntegerCheck(const TSourceLoc& loc, const char* op)
void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op) void TParseVersions::doubleCheck(const TSourceLoc& loc, const char* op)
{ {
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires(loc, ECoreProfile, 400, nullptr, op); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op);
profileRequires(loc, ECompatibilityProfile, 400, nullptr, op);
} }
// Call for any operation needing GLSL float16 data-type support. // Call for any operation needing GLSL float16 data-type support.
void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool builtIn) void TParseVersions::float16Check(const TSourceLoc& loc, const char* op, bool builtIn)
{ {
if (!builtIn) { if (!builtIn) {
const char* const extensions[] = {
#if AMD_EXTENSIONS #if AMD_EXTENSIONS
const char* const extensions[3] = {E_GL_AMD_gpu_shader_half_float, E_GL_AMD_gpu_shader_half_float,
#endif
E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_float16};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, "explicit types");
}
}
bool TParseVersions::float16Arithmetic()
{
const char* const extensions[] = {
#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_half_float,
#endif
E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_float16};
return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions);
}
bool TParseVersions::int16Arithmetic()
{
const char* const extensions[] = {
#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_int16,
#endif
E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int16};
return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions);
}
bool TParseVersions::int8Arithmetic()
{
const char* const extensions[] = {
E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int8};
return extensionsTurnedOn(sizeof(extensions)/sizeof(extensions[0]), extensions);
}
void TParseVersions::requireFloat16Arithmetic(const TSourceLoc& loc, const char* featureDesc)
{
const char* const extensions[] = {
#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_half_float,
#endif
E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_float16};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, featureDesc);
}
void TParseVersions::requireInt16Arithmetic(const TSourceLoc& loc, const char* featureDesc)
{
const char* const extensions[] = {
#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_int16,
#endif
E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int16};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, featureDesc);
}
void TParseVersions::requireInt8Arithmetic(const TSourceLoc& loc, const char* featureDesc)
{
const char* const extensions[] = {
E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int8};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, featureDesc);
}
void TParseVersions::float16ScalarVectorCheck(const TSourceLoc& loc, const char* op, bool builtIn)
{
if (!builtIn) {
const char* const extensions[] = {
#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_half_float,
#endif
E_GL_EXT_shader_16bit_storage,
E_GL_KHX_shader_explicit_arithmetic_types, E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_float16}; E_GL_KHX_shader_explicit_arithmetic_types_float16};
#else
const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_float16};
#endif
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, "explicit types"); requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, "explicit types");
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires(loc, ECoreProfile, 450, nullptr, op);
profileRequires(loc, ECompatibilityProfile, 450, nullptr, op);
} }
} }
@ -844,9 +916,6 @@ void TParseVersions::explicitFloat32Check(const TSourceLoc& loc, const char* op,
const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_float32}; E_GL_KHX_shader_explicit_arithmetic_types_float32};
requireExtensions(loc, 2, extensions, "explicit types"); requireExtensions(loc, 2, extensions, "explicit types");
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires(loc, ECoreProfile, 450, nullptr, op);
profileRequires(loc, ECompatibilityProfile, 450, nullptr, op);
} }
} }
@ -858,8 +927,7 @@ void TParseVersions::explicitFloat64Check(const TSourceLoc& loc, const char* op,
E_GL_KHX_shader_explicit_arithmetic_types_float64}; E_GL_KHX_shader_explicit_arithmetic_types_float64};
requireExtensions(loc, 2, extensions, "explicit types"); requireExtensions(loc, 2, extensions, "explicit types");
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires(loc, ECoreProfile, 450, nullptr, op); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op);
profileRequires(loc, ECompatibilityProfile, 450, nullptr, op);
} }
} }
@ -870,9 +938,6 @@ void TParseVersions::explicitInt8Check(const TSourceLoc& loc, const char* op, bo
const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int8}; E_GL_KHX_shader_explicit_arithmetic_types_int8};
requireExtensions(loc, 2, extensions, "explicit types"); requireExtensions(loc, 2, extensions, "explicit types");
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires(loc, ECoreProfile, 450, nullptr, op);
profileRequires(loc, ECompatibilityProfile, 450, nullptr, op);
} }
} }
@ -883,8 +948,7 @@ void TParseVersions::float16OpaqueCheck(const TSourceLoc& loc, const char* op, b
if (! builtIn) { if (! builtIn) {
requireExtensions(loc, 1, &E_GL_AMD_gpu_shader_half_float_fetch, op); requireExtensions(loc, 1, &E_GL_AMD_gpu_shader_half_float_fetch, op);
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires(loc, ECoreProfile, 450, nullptr, op); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op);
profileRequires(loc, ECompatibilityProfile, 450, nullptr, op);
} }
} }
#endif #endif
@ -893,18 +957,38 @@ void TParseVersions::float16OpaqueCheck(const TSourceLoc& loc, const char* op, b
void TParseVersions::explicitInt16Check(const TSourceLoc& loc, const char* op, bool builtIn) void TParseVersions::explicitInt16Check(const TSourceLoc& loc, const char* op, bool builtIn)
{ {
if (! builtIn) { if (! builtIn) {
const char* const extensions[] = {
#if AMD_EXTENSIONS #if AMD_EXTENSIONS
const char* const extensions[3] = {E_GL_AMD_gpu_shader_int16, E_GL_AMD_gpu_shader_int16,
#endif
E_GL_KHX_shader_explicit_arithmetic_types, E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int16}; E_GL_KHX_shader_explicit_arithmetic_types_int16};
#else
const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int16};
#endif
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, "explicit types"); requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, "explicit types");
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); }
profileRequires(loc, ECoreProfile, 450, nullptr, op); }
profileRequires(loc, ECompatibilityProfile, 450, nullptr, op);
void TParseVersions::int16ScalarVectorCheck(const TSourceLoc& loc, const char* op, bool builtIn)
{
if (! builtIn) {
const char* const extensions[] = {
#if AMD_EXTENSIONS
E_GL_AMD_gpu_shader_int16,
#endif
E_GL_EXT_shader_16bit_storage,
E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int16};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, "explicit types");
}
}
void TParseVersions::int8ScalarVectorCheck(const TSourceLoc& loc, const char* op, bool builtIn)
{
if (! builtIn) {
const char* const extensions[] = {
E_GL_EXT_shader_8bit_storage,
E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int8};
requireExtensions(loc, sizeof(extensions)/sizeof(extensions[0]), extensions, "explicit types");
} }
} }
@ -915,9 +999,6 @@ void TParseVersions::explicitInt32Check(const TSourceLoc& loc, const char* op, b
const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types, const char* const extensions[2] = {E_GL_KHX_shader_explicit_arithmetic_types,
E_GL_KHX_shader_explicit_arithmetic_types_int32}; E_GL_KHX_shader_explicit_arithmetic_types_int32};
requireExtensions(loc, 2, extensions, "explicit types"); requireExtensions(loc, 2, extensions, "explicit types");
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires(loc, ECoreProfile, 450, nullptr, op);
profileRequires(loc, ECompatibilityProfile, 450, nullptr, op);
} }
} }
@ -930,8 +1011,7 @@ void TParseVersions::int64Check(const TSourceLoc& loc, const char* op, bool buil
E_GL_KHX_shader_explicit_arithmetic_types_int64}; E_GL_KHX_shader_explicit_arithmetic_types_int64};
requireExtensions(loc, 3, extensions, "shader int64"); requireExtensions(loc, 3, extensions, "shader int64");
requireProfile(loc, ECoreProfile | ECompatibilityProfile, op); requireProfile(loc, ECoreProfile | ECompatibilityProfile, op);
profileRequires(loc, ECoreProfile, 450, nullptr, op); profileRequires(loc, ECoreProfile | ECompatibilityProfile, 400, nullptr, op);
profileRequires(loc, ECompatibilityProfile, 450, nullptr, op);
} }
} }

View File

@ -152,6 +152,10 @@ const char* const E_GL_KHR_shader_subgroup_quad = "GL_KHR_shader_sub
const char* const E_GL_EXT_shader_non_constant_global_initializers = "GL_EXT_shader_non_constant_global_initializers"; const char* const E_GL_EXT_shader_non_constant_global_initializers = "GL_EXT_shader_non_constant_global_initializers";
const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_load_formatted"; const char* const E_GL_EXT_shader_image_load_formatted = "GL_EXT_shader_image_load_formatted";
const char* const E_GL_EXT_shader_16bit_storage = "GL_EXT_shader_16bit_storage";
const char* const E_GL_EXT_shader_8bit_storage = "GL_EXT_shader_8bit_storage";
// EXT extensions // EXT extensions
const char* const E_GL_EXT_device_group = "GL_EXT_device_group"; const char* const E_GL_EXT_device_group = "GL_EXT_device_group";
const char* const E_GL_EXT_multiview = "GL_EXT_multiview"; const char* const E_GL_EXT_multiview = "GL_EXT_multiview";

43
glslang/MachineIndependent/glslang.y Normal file → Executable file
View File

@ -699,6 +699,7 @@ assignment_expression
| unary_expression assignment_operator assignment_expression { | unary_expression assignment_operator assignment_expression {
parseContext.arrayObjectCheck($2.loc, $1->getType(), "array assignment"); parseContext.arrayObjectCheck($2.loc, $1->getType(), "array assignment");
parseContext.opaqueCheck($2.loc, $1->getType(), "="); parseContext.opaqueCheck($2.loc, $1->getType(), "=");
parseContext.storage16BitAssignmentCheck($2.loc, $1->getType(), "=");
parseContext.specializationCheck($2.loc, $1->getType(), "="); parseContext.specializationCheck($2.loc, $1->getType(), "=");
parseContext.lValueErrorCheck($2.loc, "assign", $1); parseContext.lValueErrorCheck($2.loc, "assign", $1);
parseContext.rValueErrorCheck($2.loc, "assign", $3); parseContext.rValueErrorCheck($2.loc, "assign", $3);
@ -1419,7 +1420,7 @@ type_specifier_nonarray
$$.basicType = EbtDouble; $$.basicType = EbtDouble;
} }
| FLOAT16_T { | FLOAT16_T {
parseContext.float16Check($1.loc, "float16_t", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16ScalarVectorCheck($1.loc, "float16_t", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
} }
@ -1443,22 +1444,22 @@ type_specifier_nonarray
$$.basicType = EbtUint; $$.basicType = EbtUint;
} }
| INT8_T { | INT8_T {
parseContext.explicitInt8Check($1.loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt8; $$.basicType = EbtInt8;
} }
| UINT8_T { | UINT8_T {
parseContext.explicitInt8Check($1.loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint8; $$.basicType = EbtUint8;
} }
| INT16_T { | INT16_T {
parseContext.explicitInt16Check($1.loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt16; $$.basicType = EbtInt16;
} }
| UINT16_T { | UINT16_T {
parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint16; $$.basicType = EbtUint16;
} }
@ -1520,19 +1521,19 @@ type_specifier_nonarray
$$.setVector(4); $$.setVector(4);
} }
| F16VEC2 { | F16VEC2 {
parseContext.float16Check($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setVector(2); $$.setVector(2);
} }
| F16VEC3 { | F16VEC3 {
parseContext.float16Check($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setVector(3); $$.setVector(3);
} }
| F16VEC4 { | F16VEC4 {
parseContext.float16Check($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.float16ScalarVectorCheck($1.loc, "half float vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtFloat16; $$.basicType = EbtFloat16;
$$.setVector(4); $$.setVector(4);
@ -1604,37 +1605,37 @@ type_specifier_nonarray
$$.setVector(4); $$.setVector(4);
} }
| I8VEC2 { | I8VEC2 {
parseContext.explicitInt8Check($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt8; $$.basicType = EbtInt8;
$$.setVector(2); $$.setVector(2);
} }
| I8VEC3 { | I8VEC3 {
parseContext.explicitInt8Check($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt8; $$.basicType = EbtInt8;
$$.setVector(3); $$.setVector(3);
} }
| I8VEC4 { | I8VEC4 {
parseContext.explicitInt8Check($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt8; $$.basicType = EbtInt8;
$$.setVector(4); $$.setVector(4);
} }
| I16VEC2 { | I16VEC2 {
parseContext.explicitInt16Check($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt16; $$.basicType = EbtInt16;
$$.setVector(2); $$.setVector(2);
} }
| I16VEC3 { | I16VEC3 {
parseContext.explicitInt16Check($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt16; $$.basicType = EbtInt16;
$$.setVector(3); $$.setVector(3);
} }
| I16VEC4 { | I16VEC4 {
parseContext.explicitInt16Check($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit signed integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt16; $$.basicType = EbtInt16;
$$.setVector(4); $$.setVector(4);
@ -1694,37 +1695,37 @@ type_specifier_nonarray
$$.setVector(4); $$.setVector(4);
} }
| U8VEC2 { | U8VEC2 {
parseContext.explicitInt8Check($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint8; $$.basicType = EbtUint8;
$$.setVector(2); $$.setVector(2);
} }
| U8VEC3 { | U8VEC3 {
parseContext.explicitInt8Check($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtInt8; $$.basicType = EbtUint8;
$$.setVector(3); $$.setVector(3);
} }
| U8VEC4 { | U8VEC4 {
parseContext.explicitInt8Check($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int8ScalarVectorCheck($1.loc, "8-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint8; $$.basicType = EbtUint8;
$$.setVector(4); $$.setVector(4);
} }
| U16VEC2 { | U16VEC2 {
parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint16; $$.basicType = EbtUint16;
$$.setVector(2); $$.setVector(2);
} }
| U16VEC3 { | U16VEC3 {
parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint16; $$.basicType = EbtUint16;
$$.setVector(3); $$.setVector(3);
} }
| U16VEC4 { | U16VEC4 {
parseContext.explicitInt16Check($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel()); parseContext.int16ScalarVectorCheck($1.loc, "16-bit unsigned integer vector", parseContext.symbolTable.atBuiltInLevel());
$$.init($1.loc, parseContext.symbolTable.atGlobalLevel()); $$.init($1.loc, parseContext.symbolTable.atGlobalLevel());
$$.basicType = EbtUint16; $$.basicType = EbtUint16;
$$.setVector(4); $$.setVector(4);

2059
glslang/MachineIndependent/glslang_tab.cpp Normal file → Executable file

File diff suppressed because it is too large Load Diff

View File

@ -79,6 +79,15 @@ public:
virtual void fullIntegerCheck(const TSourceLoc&, const char* op); virtual void fullIntegerCheck(const TSourceLoc&, const char* op);
virtual void doubleCheck(const TSourceLoc&, const char* op); virtual void doubleCheck(const TSourceLoc&, const char* op);
virtual void float16Check(const TSourceLoc&, const char* op, bool builtIn = false); virtual void float16Check(const TSourceLoc&, const char* op, bool builtIn = false);
virtual void float16ScalarVectorCheck(const TSourceLoc&, const char* op, bool builtIn = false);
virtual bool float16Arithmetic();
virtual void requireFloat16Arithmetic(const TSourceLoc& loc, const char* featureDesc);
virtual void int16ScalarVectorCheck(const TSourceLoc&, const char* op, bool builtIn = false);
virtual bool int16Arithmetic();
virtual void requireInt16Arithmetic(const TSourceLoc& loc, const char* featureDesc);
virtual void int8ScalarVectorCheck(const TSourceLoc&, const char* op, bool builtIn = false);
virtual bool int8Arithmetic();
virtual void requireInt8Arithmetic(const TSourceLoc& loc, const char* featureDesc);
#ifdef AMD_EXTENSIONS #ifdef AMD_EXTENSIONS
virtual void float16OpaqueCheck(const TSourceLoc&, const char* op, bool builtIn = false); virtual void float16OpaqueCheck(const TSourceLoc&, const char* op, bool builtIn = false);
#endif #endif

2
glslang/Public/ShaderLang.h Normal file → Executable file
View File

@ -70,7 +70,7 @@
// This should always increase, as some paths to do not consume // This should always increase, as some paths to do not consume
// a more major number. // a more major number.
// It should increment by one when new functionality is added. // It should increment by one when new functionality is added.
#define GLSLANG_MINOR_VERSION 7 #define GLSLANG_MINOR_VERSION 8
// //
// Call before doing any other compiler/linker operations. // Call before doing any other compiler/linker operations.

View File

@ -215,6 +215,12 @@ INSTANTIATE_TEST_CASE_P(
"spv.140.frag", "spv.140.frag",
"spv.150.geom", "spv.150.geom",
"spv.150.vert", "spv.150.vert",
"spv.16bitstorage.frag",
"spv.16bitstorage_Error.frag",
"spv.16bitstorage-int.frag",
"spv.16bitstorage_Error-int.frag",
"spv.16bitstorage-uint.frag",
"spv.16bitstorage_Error-uint.frag",
"spv.300BuiltIns.vert", "spv.300BuiltIns.vert",
"spv.300layout.frag", "spv.300layout.frag",
"spv.300layout.vert", "spv.300layout.vert",
@ -231,6 +237,10 @@ INSTANTIATE_TEST_CASE_P(
"spv.450.tesc", "spv.450.tesc",
"spv.450.geom", "spv.450.geom",
"spv.450.noRedecl.tesc", "spv.450.noRedecl.tesc",
"spv.8bitstorage-int.frag",
"spv.8bitstorage_Error-int.frag",
"spv.8bitstorage-uint.frag",
"spv.8bitstorage_Error-uint.frag",
"spv.accessChain.frag", "spv.accessChain.frag",
"spv.aggOps.frag", "spv.aggOps.frag",
"spv.always-discard.frag", "spv.always-discard.frag",

2
known_good_khr.json Normal file → Executable file
View File

@ -12,7 +12,7 @@
"site" : "gitlab", "site" : "gitlab",
"subrepo" : "spirv/SPIRV-Headers", "subrepo" : "spirv/SPIRV-Headers",
"subdir" : "External/spirv-tools/external/spirv-headers", "subdir" : "External/spirv-tools/external/spirv-headers",
"commit" : "4082a777bd5df31ed45acf40e64263094e85ed2e" "commit" : "gitlab-prelim-rc4"
} }
] ]
} }