diff options
Diffstat (limited to 'tests/bugs')
| -rw-r--r-- | tests/bugs/split-nested-types.hlsl | 30 | ||||
| -rw-r--r-- | tests/bugs/split-nested-types.slang | 14 |
2 files changed, 44 insertions, 0 deletions
diff --git a/tests/bugs/split-nested-types.hlsl b/tests/bugs/split-nested-types.hlsl new file mode 100644 index 000000000..210c119df --- /dev/null +++ b/tests/bugs/split-nested-types.hlsl @@ -0,0 +1,30 @@ +// array-size-static-const.hlsl +//TEST:COMPARE_HLSL: -profile ps_5_0 -target dxbc-assembly + +#ifdef __SLANG__ +import split_nested_types; +#else + +struct A { int x; }; + +struct B { float y; }; + +struct C { Texture2D t; SamplerState s; }; + +struct M +{ + A a; + B b; +}; + +#endif + +cbuffer C +{ + M m; +} + +float4 main() : SV_target +{ + return m.b.y; +} diff --git a/tests/bugs/split-nested-types.slang b/tests/bugs/split-nested-types.slang new file mode 100644 index 000000000..ccf95d906 --- /dev/null +++ b/tests/bugs/split-nested-types.slang @@ -0,0 +1,14 @@ +//TEST_IGNORE_FILE: + +struct A { int x; }; + +struct B { float y; }; + +struct C { Texture2D t; SamplerState s; }; + +struct M +{ + A a; + B b; + C c; +}; |
