diff options
| author | Yong He <yonghe@outlook.com> | 2023-12-06 12:05:07 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-06 12:05:07 -0800 |
| commit | 11111e5733b189127dc2c4934d67693b9bc6e764 (patch) | |
| tree | 0ba84df3e856eb104abec2ecac47242bc70a7b7d /tests/compute | |
| parent | fa6d8717d02912697c09f2d7de802723ac6d6e47 (diff) | |
Support visibility control and default to `internal`. (#3380)
* Support visibility control and default to `internal`.
* Fix wip.
* Fixes.
* Fix.
* Fix test.
* Add legacy language detection and compatibility for existing code.
* Add doc.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'tests/compute')
| -rw-r--r-- | tests/compute/array-existential-parameter.slang | 2 | ||||
| -rw-r--r-- | tests/compute/dynamic-dispatch-11.slang | 2 | ||||
| -rw-r--r-- | tests/compute/dynamic-dispatch-12.slang | 8 | ||||
| -rw-r--r-- | tests/compute/dynamic-dispatch-13.slang | 4 | ||||
| -rw-r--r-- | tests/compute/dynamic-dispatch-14.slang | 10 | ||||
| -rw-r--r-- | tests/compute/dynamic-dispatch-15.slang | 10 | ||||
| -rw-r--r-- | tests/compute/dynamic-dispatch-bindless-texture.slang | 2 | ||||
| -rw-r--r-- | tests/compute/interface-assoc-type-param.slang | 4 | ||||
| -rw-r--r-- | tests/compute/interface-func-param-in-struct.slang | 4 | ||||
| -rw-r--r-- | tests/compute/interface-param-partial-specialize.slang | 4 |
10 files changed, 25 insertions, 25 deletions
diff --git a/tests/compute/array-existential-parameter.slang b/tests/compute/array-existential-parameter.slang index 813c5a40b..b7473e447 100644 --- a/tests/compute/array-existential-parameter.slang +++ b/tests/compute/array-existential-parameter.slang @@ -38,7 +38,7 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) //TEST_INPUT: globalExistentialType __Dynamic // Type must be marked `public` to ensure it is visible in the generated DLL. -public struct MyImpl : IInterface +export struct MyImpl : IInterface { int val; int run(int input) diff --git a/tests/compute/dynamic-dispatch-11.slang b/tests/compute/dynamic-dispatch-11.slang index d6f64aa99..59e7ce581 100644 --- a/tests/compute/dynamic-dispatch-11.slang +++ b/tests/compute/dynamic-dispatch-11.slang @@ -34,7 +34,7 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) // No type input for dynamic dispatch //TEST_INPUT: globalExistentialType MyImpl // Type must be marked `public` to ensure it is visible in the generated DLL. -public struct MyImpl : IInterface +export struct MyImpl : IInterface { int val; int run(int input) diff --git a/tests/compute/dynamic-dispatch-12.slang b/tests/compute/dynamic-dispatch-12.slang index 906a5da0e..28f9c4c14 100644 --- a/tests/compute/dynamic-dispatch-12.slang +++ b/tests/compute/dynamic-dispatch-12.slang @@ -37,14 +37,14 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) } // Specialize gCb1, but not gCb2 -//TEST_INPUT: globalExistentialType MyImpl -//TEST_INPUT: globalExistentialType __Dynamic +// TEST_INPUT: globalExistentialType MyImpl +// TEST_INPUT: globalExistentialType __Dynamic // Type must be marked `public` to ensure it is visible in the generated DLL. -public struct MyImpl : IInterface +export struct MyImpl : IInterface { int val; int run(int input) { return input + val; } -};
\ No newline at end of file +}; diff --git a/tests/compute/dynamic-dispatch-13.slang b/tests/compute/dynamic-dispatch-13.slang index f9ad9683b..20d78e0ad 100644 --- a/tests/compute/dynamic-dispatch-13.slang +++ b/tests/compute/dynamic-dispatch-13.slang @@ -35,7 +35,7 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID) } // Type must be marked `public` to ensure it is visible in the generated DLL. -public struct MyImpl : IInterface +export struct MyImpl : IInterface { int val; int run(int input) @@ -43,7 +43,7 @@ public struct MyImpl : IInterface return input + val; } }; -public struct MyImpl2 : IInterface +export struct MyImpl2 : IInterface { int val; int run(int input) diff --git a/tests/compute/dynamic-dispatch-14.slang b/tests/compute/dynamic-dispatch-14.slang index e605132c6..0dc99b432 100644 --- a/tests/compute/dynamic-dispatch-14.slang +++ b/tests/compute/dynamic-dispatch-14.slang @@ -46,10 +46,10 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID) } // Type must be marked `public` to ensure it is visible in the generated DLL. -public struct MyImpl : IInterface +export struct MyImpl : IInterface { int val; - public struct TAssoc : IAssoc + export struct TAssoc : IAssoc { int val; int eval() { return val; } @@ -62,10 +62,10 @@ public struct MyImpl : IInterface } }; -public struct MyImpl2 : IInterface +export struct MyImpl2 : IInterface { int val; - public struct TAssoc : IAssoc + export struct TAssoc : IAssoc { int val; int eval() { return val; } @@ -76,4 +76,4 @@ public struct MyImpl2 : IInterface rs.val = input - val; return rs; } -};
\ No newline at end of file +}; diff --git a/tests/compute/dynamic-dispatch-15.slang b/tests/compute/dynamic-dispatch-15.slang index 5e2be1a4c..2ab169281 100644 --- a/tests/compute/dynamic-dispatch-15.slang +++ b/tests/compute/dynamic-dispatch-15.slang @@ -46,7 +46,7 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) } // Type must be marked `public` to ensure it is visible in the generated DLL. -public struct FloatVal : IInterface +export struct FloatVal : IInterface { float val; float run() @@ -56,7 +56,7 @@ public struct FloatVal : IInterface }; interface ISomething{void g();} struct Float4Struct : ISomething { float4 val; void g() {} } -public struct Float4Val : IInterface +export struct Float4Val : IInterface { Float4Struct val; float run() @@ -64,7 +64,7 @@ public struct Float4Val : IInterface return val.val.x; } }; -public struct IntVal : IInterface +export struct IntVal : IInterface { int val; float run() @@ -72,11 +72,11 @@ public struct IntVal : IInterface return val; } }; -public struct Int4Val : IInterface +export struct Int4Val : IInterface { int4 val; float run() { return val.x; } -};
\ No newline at end of file +}; diff --git a/tests/compute/dynamic-dispatch-bindless-texture.slang b/tests/compute/dynamic-dispatch-bindless-texture.slang index 04c1f1766..34ef67d1e 100644 --- a/tests/compute/dynamic-dispatch-bindless-texture.slang +++ b/tests/compute/dynamic-dispatch-bindless-texture.slang @@ -28,7 +28,7 @@ void computeMain(int3 dispatchThreadID : SV_DispatchThreadID) //TEST_INPUT: globalExistentialType __Dynamic // Type must be marked `public` to ensure it is visible in the generated DLL. -public struct MyImpl : IInterface +export struct MyImpl : IInterface { Texture2D tex; SamplerState sampler; diff --git a/tests/compute/interface-assoc-type-param.slang b/tests/compute/interface-assoc-type-param.slang index 805f673a2..a234d457f 100644 --- a/tests/compute/interface-assoc-type-param.slang +++ b/tests/compute/interface-assoc-type-param.slang @@ -16,7 +16,7 @@ interface IEval uint eval(); } -public struct Impl : IInterface +export struct Impl : IInterface { uint val; struct TEval : IEval @@ -55,4 +55,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID, { uint tid = dispatchThreadID.x; compute(tid, params); -}
\ No newline at end of file +} diff --git a/tests/compute/interface-func-param-in-struct.slang b/tests/compute/interface-func-param-in-struct.slang index c47b25d70..01e4aa111 100644 --- a/tests/compute/interface-func-param-in-struct.slang +++ b/tests/compute/interface-func-param-in-struct.slang @@ -9,7 +9,7 @@ interface IInterface uint eval(); } -public struct Impl : IInterface +export struct Impl : IInterface { uint val; uint eval() @@ -38,4 +38,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID, { uint tid = dispatchThreadID.x; compute(tid, params); -}
\ No newline at end of file +} diff --git a/tests/compute/interface-param-partial-specialize.slang b/tests/compute/interface-param-partial-specialize.slang index 9be22c6c4..1d09c9f55 100644 --- a/tests/compute/interface-param-partial-specialize.slang +++ b/tests/compute/interface-param-partial-specialize.slang @@ -12,7 +12,7 @@ interface IInterface uint eval(); } -public struct Impl : IInterface +export struct Impl : IInterface { uint val; uint eval() @@ -48,4 +48,4 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID, { uint tid = dispatchThreadID.x; compute(tid, params); -}
\ No newline at end of file +} |
