SPV: Handle type punning in createCompositeCompare().

This commit is contained in:
John Kessenich
2016-01-04 23:49:03 -07:00
parent f8842e55c0
commit e23c9849c2
3 changed files with 91 additions and 21 deletions

View File

@@ -1,9 +1,10 @@
#version 130
#version 450
uniform sampler2D samp2D;
varying mediump vec2 coord;
in mediump vec2 coord;
varying vec4 u, w;
in vec4 u, w;
out vec4 color;
struct s1 {
int i;
@@ -20,6 +21,10 @@ uniform s1 foo1;
uniform s2 foo2a;
uniform s2 foo2b;
layout(std140) uniform bn {
s2 foo2a;
} bi;
void main()
{
vec4 v;
@@ -47,5 +52,8 @@ void main()
if (a != b)
v *= 7.0;
gl_FragColor = v;
if (bi.foo2a != foo2a)
v *= 8.0;
color = v;
}