arrayLength
함수
Returns the number of elements of a runtime-sized storage array as a u32, read from the buffer the host bound; xs.length on such an array reads the same thing.
이름마다 붙은 시그니처와 설명은 커밋 26de7be8의 컴파일러 소스에서 그대로 가져온 영어 원문입니다.
구문
declare function arrayLength<T>(xs: array<T>): u32매개변수
-
xsarray<T>
반환값
설명
The argument must be the storage binding itself or a trailing array field of one. Compiles to arrayLength(&xs) on WGSL; GLSL ES 3.00 has no storage buffers, so a module using it emits WGSL alone.
대상별 출력
- WGSL
-
arrayLength(&a) - GLSL ES 3.00
- arrayLength has no GLSL ES 3.00 spelling (no storage buffers, no runtime-sized arrays)