From 9914ca800c92e9b3fe768dec4e913a302f3d678d Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 31 Jul 2018 11:03:53 -0400 Subject: Feature/attributed binding (#621) * Typo fix, and added dxc to command line documentation. * Fix small typos. Added support for Scope to lexer. Fix bug in Token ctor. * Add support for attribute names that are scoped. * Added GLSLBindingAttribute. Make binding work through core.met.slang. * Allow [[gl::binding(binding, set)]] [[vk::binding(binding,set)]] --- tests/reflection/binding-gl.hlsl | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/reflection/binding-gl.hlsl (limited to 'tests/reflection/binding-gl.hlsl') diff --git a/tests/reflection/binding-gl.hlsl b/tests/reflection/binding-gl.hlsl new file mode 100644 index 000000000..cd2ab666a --- /dev/null +++ b/tests/reflection/binding-gl.hlsl @@ -0,0 +1,27 @@ +//TEST:REFLECTION:-profile ps_4_0 -target spirv + +// Confirm that we can generate reflection info for arrays +// +// Note: just working with fixed-size arrays for now. +// Unbounded arrays may require more work. + +layout(binding=0, set = 1) cbuffer MyConstantBuffer +{ + float x; + + float a[10]; + + float y; +} + +[[vk::binding(1,2)]] Texture2D tx; +[gl::binding(2,3)] Texture2D ta; +Texture2D ty; +SamplerState sx; +SamplerState sa[4]; +SamplerState sy; + +float4 main() : SV_Target +{ + return 0.0; +} \ No newline at end of file -- cgit v1.2.3