diff options
Diffstat (limited to '3rdparty/bgfx/3rdparty/glslang/Test/hlsl.flattenSubset2.frag')
-rw-r--r-- | 3rdparty/bgfx/3rdparty/glslang/Test/hlsl.flattenSubset2.frag | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.flattenSubset2.frag b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.flattenSubset2.frag new file mode 100644 index 00000000000..753475dc1f0 --- /dev/null +++ b/3rdparty/bgfx/3rdparty/glslang/Test/hlsl.flattenSubset2.frag @@ -0,0 +1,24 @@ +struct Nested { float y; Texture2D texNested; };
+struct A { Nested n; float x; };
+struct B { Nested n; Texture2D tex; };
+
+Texture2D someTex;
+
+float4 main(float4 vpos : VPOS) : COLOR0
+{
+ A a1, a2;
+ B b;
+
+ // Assignment of nested structs to nested structs
+ a1.n = a2.n;
+ b .n = a1.n;
+
+ // Assignment of nested struct to standalone
+ Nested n = b.n;
+
+ // Assignment to nestested struct members
+ a2.n.texNested = someTex;
+ a1.n.y = 1.0;
+
+ return float4(0,0,0,0);
+}
|