From 387f2be1e48a805ef0da34510a5ae0ebc0ba9c3e Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 15 Jan 2025 20:43:01 -0800 Subject: Inline global constants that contains opaque handles for legalization. (#6098) * Inline global constants that contains opaque handles for legalization. * Add diagnostics on opaque type global variables. * Fix. * Fix test. --- tests/diagnostics/variable-redeclaration.slang.expected | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tests/diagnostics/variable-redeclaration.slang.expected') diff --git a/tests/diagnostics/variable-redeclaration.slang.expected b/tests/diagnostics/variable-redeclaration.slang.expected index 944037b1c..1998c13c8 100644 --- a/tests/diagnostics/variable-redeclaration.slang.expected +++ b/tests/diagnostics/variable-redeclaration.slang.expected @@ -18,6 +18,12 @@ tests/diagnostics/variable-redeclaration.slang(51): error 30200: declaration of tests/diagnostics/variable-redeclaration.slang(50): note: see previous declaration of 'size' int size, ^~~~ +tests/diagnostics/variable-redeclaration.slang(14): error 30076: global variable cannot have opaque type. +static Texture2D gA; + ^~ +tests/diagnostics/variable-redeclaration.slang(14): note: do you intend to define a `uniform` parameter instead? +static Texture2D gA; + ^~ tests/diagnostics/variable-redeclaration.slang(21): error 30200: declaration of 'y' conflicts with existing declaration int y = x; ^ -- cgit v1.2.3