@@ -78,7 +78,7 @@ describe('ArrayToContainedAttribs', () => {
78
78
79
79
describe ( 'tgpu.vertexLayout' , ( ) => {
80
80
it ( 'creates attributes from loose array of vec3f' , ( ) => {
81
- const vertexLayout = tgpu [ '~unstable' ] . vertexLayout ( ( count : number ) =>
81
+ const vertexLayout = tgpu . vertexLayout ( ( count : number ) =>
82
82
d . disarrayOf ( d . vec3f , count ) ,
83
83
) ;
84
84
@@ -97,7 +97,7 @@ describe('tgpu.vertexLayout', () => {
97
97
c : d . f32 , // + 4
98
98
} ) ;
99
99
100
- const vertexLayout = tgpu [ '~unstable' ] . vertexLayout ( ( count : number ) =>
100
+ const vertexLayout = tgpu . vertexLayout ( ( count : number ) =>
101
101
d . disarrayOf ( VertexData , count ) ,
102
102
) ;
103
103
@@ -128,7 +128,7 @@ describe('tgpu.vertexLayout', () => {
128
128
c : d . f32 , // + 4
129
129
} ) ;
130
130
131
- const vertexLayout = tgpu [ '~unstable' ] . vertexLayout ( ( count : number ) =>
131
+ const vertexLayout = tgpu . vertexLayout ( ( count : number ) =>
132
132
d . disarrayOf ( VertexData , count ) ,
133
133
) ;
134
134
@@ -153,7 +153,7 @@ describe('tgpu.vertexLayout', () => {
153
153
} ) ;
154
154
155
155
it ( 'creates attributes from loose array with f16 variants' , ( ) => {
156
- const vertexLayout = tgpu [ '~unstable' ] . vertexLayout ( ( count : number ) =>
156
+ const vertexLayout = tgpu . vertexLayout ( ( count : number ) =>
157
157
d . disarrayOf ( d . float16x4 , count ) ,
158
158
) ;
159
159
@@ -169,9 +169,7 @@ describe('tgpu.vertexLayout', () => {
169
169
describe ( 'connectAttributesToShader' , ( ) => {
170
170
it ( 'connects a single f32 attribute' , ( ) => {
171
171
const shaderInputLayout = d . f32 ;
172
- const layout = tgpu [ '~unstable' ] . vertexLayout ( ( n : number ) =>
173
- d . arrayOf ( d . f32 , n ) ,
174
- ) ;
172
+ const layout = tgpu . vertexLayout ( ( n : number ) => d . arrayOf ( d . f32 , n ) ) ;
175
173
const attrib = layout . attrib ;
176
174
177
175
expect ( connectAttributesToShader ( shaderInputLayout , attrib ) ) . toEqual ( {
@@ -194,7 +192,7 @@ describe('connectAttributesToShader', () => {
194
192
195
193
it ( 'connects a single vec4f attribute (with custom shader location)' , ( ) => {
196
194
const shaderInputLayout = d . location ( 3 , d . vec4f ) ;
197
- const layout = tgpu [ '~unstable' ] . vertexLayout ( ( n : number ) =>
195
+ const layout = tgpu . vertexLayout ( ( n : number ) =>
198
196
d . disarrayOf ( d . unorm16x4 , n ) ,
199
197
) ;
200
198
const attrib = layout . attrib ;
@@ -224,7 +222,7 @@ describe('connectAttributesToShader', () => {
224
222
c : d . u32 /* should get @location(4) automatically */ ,
225
223
} ;
226
224
227
- const layout = tgpu [ '~unstable' ] . vertexLayout ( ( n : number ) =>
225
+ const layout = tgpu . vertexLayout ( ( n : number ) =>
228
226
d . disarrayOf (
229
227
d . unstruct ( {
230
228
alpha : d . f32 , // 4 bytes
@@ -278,7 +276,7 @@ describe('connectAttributesToShader', () => {
278
276
c : d . u32 /* should get @location(4) automatically */ ,
279
277
} ;
280
278
281
- const alphaBetaLayout = tgpu [ '~unstable' ] . vertexLayout ( ( n : number ) =>
279
+ const alphaBetaLayout = tgpu . vertexLayout ( ( n : number ) =>
282
280
d . disarrayOf (
283
281
d . unstruct ( {
284
282
alpha : d . f32 , // 4 bytes
@@ -288,9 +286,7 @@ describe('connectAttributesToShader', () => {
288
286
) ,
289
287
) ;
290
288
291
- const gammaLayout = tgpu [ '~unstable' ] . vertexLayout ( ( n : number ) =>
292
- d . arrayOf ( d . u32 , n ) ,
293
- ) ;
289
+ const gammaLayout = tgpu . vertexLayout ( ( n : number ) => d . arrayOf ( d . u32 , n ) ) ;
294
290
295
291
const result = connectAttributesToShader ( shaderInputLayout , {
296
292
// purposefully out of order, which should be controlled by the shader input.
@@ -335,7 +331,7 @@ describe('connectAttributesToShader', () => {
335
331
336
332
it ( 'connects a single vec4h attribute' , ( ) => {
337
333
const shaderInputLayout = d . vec4h ;
338
- const layout = tgpu [ '~unstable' ] . vertexLayout ( ( n : number ) =>
334
+ const layout = tgpu . vertexLayout ( ( n : number ) =>
339
335
d . disarrayOf ( d . float16x4 , n ) ,
340
336
) ;
341
337
const attrib = layout . attrib ;
@@ -366,7 +362,7 @@ describe('connectAttributesToShader', () => {
366
362
d : d . f32 ,
367
363
} ;
368
364
369
- const layout = tgpu [ '~unstable' ] . vertexLayout ( ( n : number ) =>
365
+ const layout = tgpu . vertexLayout ( ( n : number ) =>
370
366
d . disarrayOf (
371
367
d . unstruct ( {
372
368
alpha : d . f16 , // 2 bytes
@@ -421,7 +417,7 @@ describe('connectAttributesToShader', () => {
421
417
422
418
it ( 'throws when trying to use type that has no attribute representation' , ( ) => {
423
419
expect ( ( ) =>
424
- tgpu [ '~unstable' ] . vertexLayout ( ( n : number ) => d . disarrayOf ( d . vec3h , n ) ) ,
420
+ tgpu . vertexLayout ( ( n : number ) => d . disarrayOf ( d . vec3h , n ) ) ,
425
421
) . toThrow ( ) ;
426
422
} ) ;
427
423
} ) ;
0 commit comments