From 11111e5733b189127dc2c4934d67693b9bc6e764 Mon Sep 17 00:00:00 2001 From: Yong He Date: Wed, 6 Dec 2023 12:05:07 -0800 Subject: 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 --- tests/reflection/multi-file-shared.slang | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'tests/reflection/multi-file-shared.slang') diff --git a/tests/reflection/multi-file-shared.slang b/tests/reflection/multi-file-shared.slang index af91d5251..91a74cd35 100644 --- a/tests/reflection/multi-file-shared.slang +++ b/tests/reflection/multi-file-shared.slang @@ -3,23 +3,23 @@ #include "multi-file-defines.h" -float4 use(float val) { return val; }; -float4 use(float2 val) { return float4(val,0.0,0.0); }; -float4 use(float3 val) { return float4(val,0.0); }; -float4 use(float4 val) { return val; }; -float4 use(Texture2D t, SamplerState s) { return t.SampleLevel(s, 0.0, 0.0); } +PUBLIC float4 use(float val) { return val; }; +PUBLIC float4 use(float2 val) { return float4(val,0.0,0.0); }; +PUBLIC float4 use(float3 val) { return float4(val,0.0); }; +PUBLIC float4 use(float4 val) { return val; }; +PUBLIC float4 use(Texture2D t, SamplerState s) { return t.SampleLevel(s, 0.0, 0.0); } -Texture2D sharedT R(: register(t2)); -SamplerState sharedS R(: register(s2)); +PUBLIC Texture2D sharedT R(: register(t2)); +PUBLIC SamplerState sharedS R(: register(s2)); -BEGIN_CBUFFER(sharedC) +PUBLIC BEGIN_CBUFFER(sharedC) { - float3 sharedCA; - float sharedCB; - float3 sharedCC; - float2 sharedCD; + PUBLIC float3 sharedCA; + PUBLIC float sharedCB; + PUBLIC float3 sharedCC; + PUBLIC float2 sharedCD; } END_CBUFFER(sharedC, register(b2)) -Texture2D sharedTV R(: register(t3)); -Texture2D sharedTF R(: register(t4)); +PUBLIC Texture2D sharedTV R(: register(t3)); +PUBLIC Texture2D sharedTF R(: register(t4)); -- cgit v1.2.3