diff options
| author | James Helferty (NVIDIA) <jhelferty@nvidia.com> | 2025-05-12 21:03:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-13 01:03:59 +0000 |
| commit | 2fb95f99c3efbe54f92f6338ab8c6970f1ec35ee (patch) | |
| tree | 2be801abc4214cb0a3ea687551d1f616db898792 /source | |
| parent | b423ea55b4b00004bde1f91d95d9e5161d0ae629 (diff) | |
Add half-precision matrix type aliases in GLSL (#7066)
Fixes #6708
This commit adds type aliases for half-precision matrices, including
f16mat3x2, f16mat3x3, f16mat3x4, f16mat4x2, f16mat4x3, and f16mat4x4.
Convenience aliases for square matrices (f16mat2, f16mat3, f16mat4) are
also added.
This commit introduces a new test file that validates the usage of
half-precision types in a compute shader context.
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/glsl.meta.slang | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/slang/glsl.meta.slang b/source/slang/glsl.meta.slang index 05cef836c..2d9078855 100644 --- a/source/slang/glsl.meta.slang +++ b/source/slang/glsl.meta.slang @@ -101,6 +101,18 @@ public typealias f16mat2x2 = matrix<half, 2, 2>; public typealias f16mat2x3 = matrix<half, 2, 3>; public typealias f16mat2x4 = matrix<half, 2, 4>; +public typealias f16mat3x2 = matrix<half, 3, 2>; +public typealias f16mat3x3 = matrix<half, 3, 3>; +public typealias f16mat3x4 = matrix<half, 3, 4>; + +public typealias f16mat4x2 = matrix<half, 4, 2>; +public typealias f16mat4x3 = matrix<half, 4, 3>; +public typealias f16mat4x4 = matrix<half, 4, 4>; + +// Convenience aliases for square matrices +public typealias f16mat2 = f16mat2x2; +public typealias f16mat3 = f16mat3x3; +public typealias f16mat4 = f16mat4x4; public out float4 gl_Position : SV_Position; public out float gl_PointSize : SV_PointSize; |
