From 7f72256bcf3e9a33feec641ce8bc98bc750b6297 Mon Sep 17 00:00:00 2001 From: DarrelFW321 <60972474+DarrelFW321@users.noreply.github.com> Date: Fri, 21 Mar 2025 20:11:29 -0400 Subject: Add GLSL array length syntax support (#6665) --- source/slang/glsl.meta.slang | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source') diff --git a/source/slang/glsl.meta.slang b/source/slang/glsl.meta.slang index 4412ae460..9e6c6c3cc 100644 --- a/source/slang/glsl.meta.slang +++ b/source/slang/glsl.meta.slang @@ -321,6 +321,17 @@ ${{{{ } }}}} +/// Array length +__generic +public extension Array +{ + [ForceInline] + public int length() + { + return this.getCount(); + } +} + // // Section 8.1. Angle and Trigonometry Functions // -- cgit v1.2.3