From 2e7e2b568ce93697e36a7c0b50364dc78bd1bb97 Mon Sep 17 00:00:00 2001 From: ArielG-NV <159081215+ArielG-NV@users.noreply.github.com> Date: Thu, 25 Jul 2024 18:04:47 -0400 Subject: Add `_Internal`/`External` atom enforcement and validation. (#4702) * Add `_Internal`/`External` atom validation and use enforcement. Fixes: #4676 Changes: * Added `validateInternalAtomExternalAtomPair` to the capability generator to ensure all `_Internal` atoms have a corresponding `External` atom. * Validation of 'RequireCapabilityAttribute' warns if a user uses an '_Internal' atom. * Added 'External' atoms to atoms with an already existing '_Internal' atom. * Printing an atom removes '_'. * Fixed some incorrect which were checking for the incorrect warning/error (capability4.slang, capability5.slang, capability6.slang). * switch capability name to use `UnownedStringSlice` instead of `const char*` switch capability name to use `UnownedStringSlice` instead of `const char*`, this includes using functions like `.startsWith`. * grammer --------- Co-authored-by: Yong He --- tests/language-feature/capability/capability5.slang | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/language-feature/capability/capability5.slang') diff --git a/tests/language-feature/capability/capability5.slang b/tests/language-feature/capability/capability5.slang index 6199f045a..33a002175 100644 --- a/tests/language-feature/capability/capability5.slang +++ b/tests/language-feature/capability/capability5.slang @@ -3,7 +3,7 @@ //TEST:SIMPLE(filecheck=PASS): -target glsl -entry main -stage compute -allow-glsl -profile sm_6_0 //TEST:SIMPLE(filecheck=WARN): -target glsl -entry main -stage compute -allow-glsl -capability GLSL_130 //TEST:SIMPLE(filecheck=ERROR): -target glsl -entry main -stage compute -allow-glsl -capability GLSL_130 -restrictive-capability-check -// CHECK_IGNORE_CAPS-NOT: error 36104 +// CHECK_IGNORE_CAPS-NOT: error 41012 // Check that a non-static member method implictly requires capabilities // defined in ThisType. -- cgit v1.2.3