yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Tim FoleyRework command-line options handling for entry points and targets (#697)725985528

master
455 B30 linesraw
1//TEST:COMPARE_HLSL: -profile ps_5_0 -entry main
2// Make sure we don't crash when desugaring resources
3// in structs when a `cbuffer` only contains resources.
4
5#ifdef __SLANG__
6
7cbuffer C
8{
9	Texture2D t;
10	SamplerState s;
11};
12
13float4 main(float2 uv: UV) : SV_Target
14{
15	return t.Sample(s, uv);
16}
17
18#else
19
20Texture2D C_t_0 : register(t0);
21SamplerState C_s_0 : register(s0);
22
23float4 main(float2 uv: UV) : SV_TARGET
24{
25	return C_t_0.Sample(C_s_0, uv);
26}
27
28#endif
29
30