Dusk: support WGSL aliased vector and matrix types #1088

Closed
opened 2023-10-26 01:33:01 +00:00 by clickingbuttons · 1 comment
clickingbuttons commented 2023-10-26 01:33:01 +00:00 (Migrated from github.com)

Looks like these types parse fine but AstGen fails.

https://gpuweb.github.io/gpuweb/wgsl/#vector-types

Predeclared alias Original type Restrictions
vec2i vec2  
vec3i vec3  
vec4i vec4  
vec2u vec2  
vec3u vec3  
vec4u vec4  
vec2f vec2  
vec3f vec3  
vec4f vec4  
vec2h vec2 Requires the f16 extension.
vec3h vec3
vec4h vec4

https://gpuweb.github.io/gpuweb/wgsl/#matrix-types

Predeclared alias Original type Restrictions
mat2x2f mat2x2  
mat2x3f mat2x3  
mat2x4f mat2x4  
mat3x2f mat3x2  
mat3x3f mat3x3  
mat3x4f mat3x4  
mat4x2f mat4x2  
mat4x3f mat4x3  
mat4x4f mat4x4  
mat2x2h mat2x2 Requires the f16 extension.
mat2x3h mat2x3
mat2x4h mat2x4
mat3x2h mat3x2
mat3x3h mat3x3
mat3x4h mat3x4
mat4x2h mat4x2
mat4x3h mat4x3
mat4x4h mat4x4
Looks like these types parse fine but AstGen fails. https://gpuweb.github.io/gpuweb/wgsl/#vector-types Predeclared alias | Original type | Restrictions -- | -- | -- vec2i | vec2<i32> |   vec3i | vec3<i32> |   vec4i | vec4<i32> |   vec2u | vec2<u32> |   vec3u | vec3<u32> |   vec4u | vec4<u32> |   vec2f | vec2<f32> |   vec3f | vec3<f32> |   vec4f | vec4<f32> |   vec2h | vec2<f16> | Requires the f16 extension. vec3h | vec3<f16> vec4h | vec4<f16> https://gpuweb.github.io/gpuweb/wgsl/#matrix-types Predeclared alias | Original type | Restrictions -- | -- | -- mat2x2f | mat2x2<f32> |   mat2x3f | mat2x3<f32> |   mat2x4f | mat2x4<f32> |   mat3x2f | mat3x2<f32> |   mat3x3f | mat3x3<f32> |   mat3x4f | mat3x4<f32> |   mat4x2f | mat4x2<f32> |   mat4x3f | mat4x3<f32> |   mat4x4f | mat4x4<f32> |   mat2x2h | mat2x2<f16> | Requires the f16 extension. mat2x3h | mat2x3<f16> mat2x4h | mat2x4<f16> mat3x2h | mat3x2<f16> mat3x3h | mat3x3<f16> mat3x4h | mat3x4<f16> mat4x2h | mat4x2<f16> mat4x3h | mat4x3<f16> mat4x4h | mat4x4<f16>
emidoots commented 2023-10-28 00:17:05 +00:00 (Migrated from github.com)
Duplicate of https://github.com/hexops/mach/issues/1091
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#1088
No description provided.