@@ -49,10 +49,8 @@ pub fn f16x2_to_vec2<V: Vector<f32, 2>>(int: u32) -> V {
49
49
unsafe {
50
50
asm ! (
51
51
"%glsl = OpExtInstImport \" GLSL.std.450\" " ,
52
- "%float = OpTypeFloat 32" ,
53
- "%vec2 = OpTypeVector %float 2" ,
54
52
// 62 = UnpackHalf2x16
55
- "%result = OpExtInst %vec2 %glsl 62 {int}" ,
53
+ "%result = OpExtInst typeof*{result} %glsl 62 {int}" ,
56
54
"OpStore {result} %result" ,
57
55
int = in( reg) int,
58
56
result = in( reg) & mut result,
@@ -164,10 +162,8 @@ pub fn u8x4_to_vec4_snorm<V: Vector<f32, 4>>(int: u32) -> V {
164
162
unsafe {
165
163
asm ! (
166
164
"%glsl = OpExtInstImport \" GLSL.std.450\" " ,
167
- "%float = OpTypeFloat 32" ,
168
- "%vec4 = OpTypeVector %float 4" ,
169
165
// 63 = UnpackSnorm4x8
170
- "%result = OpExtInst %vec4 %glsl 63 {int}" ,
166
+ "%result = OpExtInst typeof*{result} %glsl 63 {int}" ,
171
167
"OpStore {result} %result" ,
172
168
int = in( reg) int,
173
169
result = in( reg) & mut result,
@@ -185,10 +181,8 @@ pub fn u8x4_to_vec4_unorm<V: Vector<f32, 4>>(int: u32) -> V {
185
181
unsafe {
186
182
asm ! (
187
183
"%glsl = OpExtInstImport \" GLSL.std.450\" " ,
188
- "%float = OpTypeFloat 32" ,
189
- "%vec4 = OpTypeVector %float 4" ,
190
184
// 64 = UnpackUnorm4x8
191
- "%result = OpExtInst %vec4 %glsl 64 {int}" ,
185
+ "%result = OpExtInst typeof*{result} %glsl 64 {int}" ,
192
186
"OpStore {result} %result" ,
193
187
int = in( reg) int,
194
188
result = in( reg) & mut result,
@@ -206,10 +200,8 @@ pub fn u16x2_to_vec2_snorm<V: Vector<f32, 2>>(int: u32) -> V {
206
200
unsafe {
207
201
asm ! (
208
202
"%glsl = OpExtInstImport \" GLSL.std.450\" " ,
209
- "%float = OpTypeFloat 32" ,
210
- "%vec2 = OpTypeVector %float 2" ,
211
203
// 60 = UnpackSnorm2x16
212
- "%result = OpExtInst %vec2 %glsl 60 {int}" ,
204
+ "%result = OpExtInst typeof*{result} %glsl 60 {int}" ,
213
205
"OpStore {result} %result" ,
214
206
int = in( reg) int,
215
207
result = in( reg) & mut result,
@@ -227,10 +219,8 @@ pub fn u16x2_to_vec2_unorm<V: Vector<f32, 2>>(int: u32) -> V {
227
219
unsafe {
228
220
asm ! (
229
221
"%glsl = OpExtInstImport \" GLSL.std.450\" " ,
230
- "%float = OpTypeFloat 32" ,
231
- "%vec2 = OpTypeVector %float 2" ,
232
222
// 61 = UnpackUnorm2x16
233
- "%result = OpExtInst %vec2 %glsl 61 {int}" ,
223
+ "%result = OpExtInst typeof*{result} %glsl 61 {int}" ,
234
224
"OpStore {result} %result" ,
235
225
int = in( reg) int,
236
226
result = in( reg) & mut result,
0 commit comments