diff options
Diffstat (limited to 'tests/reflection/global-type-params.slang')
| -rw-r--r-- | tests/reflection/global-type-params.slang | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tests/reflection/global-type-params.slang b/tests/reflection/global-type-params.slang new file mode 100644 index 000000000..bfeb7fb2e --- /dev/null +++ b/tests/reflection/global-type-params.slang @@ -0,0 +1,35 @@ +//TEST:REFLECTION:-profile ps_4_0 -target hlsl -no-codegen + +// Confirm that we handle global generic parameters + + +float4 u; + +interface IBase +{}; + +__generic_param TParam : IBase; +__generic_param TParam2 : IBase; + +struct S +{ + TParam2 p; +}; + +ParameterBlock<S> arg; +ParameterBlock<TParam> arg1; + +Texture2D t; +SamplerState s; + +cbuffer CB +{ + float4 v; +} + +float4 w; + +float4 main() : SV_Target +{ + return u + v + w + t.Sample(s, u.xy); +}
\ No newline at end of file |
