diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-01-25 16:25:39 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-01-29 15:43:13 +0000 |
commit | 2b94bfe47ccb6c08047959d1c26e392919550e86 (patch) | |
tree | 4a9cb6fb333ac7e0e5bfbdd3a8faa219880e193d /chromium/third_party/glslang/src/Test/spv.structDeref.frag | |
parent | 51f6c2793adab2d864b3d2b360000ef8db1d3e92 (diff) |
BASELINE: Update Chromium to 71.0.3578.140
Change-Id: Ia85516cc06e245e449ca8a6652242b8a1bcace74
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'chromium/third_party/glslang/src/Test/spv.structDeref.frag')
-rw-r--r-- | chromium/third_party/glslang/src/Test/spv.structDeref.frag | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/chromium/third_party/glslang/src/Test/spv.structDeref.frag b/chromium/third_party/glslang/src/Test/spv.structDeref.frag new file mode 100644 index 00000000000..94232ad203e --- /dev/null +++ b/chromium/third_party/glslang/src/Test/spv.structDeref.frag @@ -0,0 +1,71 @@ +#version 140 + +uniform sampler2D samp2D; +in vec2 coord; + +struct s0 { + int i; +}; + +struct s00 { + s0 s0_0; +}; + +struct s1 { + int i; + float f; + s0 s0_1; +}; + +struct s2 { + int i; + float f; + s1 s1_1; +}; + +struct s3 { + s2[12] s2_1; + int i; + float f; + s1 s1_1; +}; + + +s0 foo0; +s1 foo1; +s2 foo2; +s3 foo3; + +s00 foo00; + +void main() +{ + s0 locals0; + s2 locals2; + s00 locals00; + + float[6] fArray; + + s1[10] locals1Array; + + if (foo3.s2_1[9].i > 0) { + locals2.f = 1.0; + locals2.s1_1 = s1(0, 1.0, s0(0)); + fArray = float[6]( 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); + locals1Array[6] = foo1; + locals0 = s0(0); + locals00 = s00(s0(0)); + } else { + locals2.f = coord.x; + locals2.s1_1 = s1(1, coord.y, foo0); + fArray = float[6]( 0.0, 1.0, 2.0, 3.0, 4.0, 5.0); + locals1Array[6] = locals2.s1_1; + locals0 = foo1.s0_1; + locals00 = foo00; + } + + if (locals0.i > 5) + locals0 = locals00.s0_0; + + gl_FragColor = (float(locals0.i) + locals1Array[6].f + fArray[3] + locals2.s1_1.f) * texture(samp2D, coord); +} |