SPV: Continue to fix the issue of bool -> uint32

For short-circuit operator (&& and ||), the conversion is missing.
This commit is contained in:
Rex Xu
2016-03-03 14:38:51 +08:00
parent 2725323bba
commit b4fd8d10f0
3 changed files with 54 additions and 4 deletions

View File

@@ -16,6 +16,8 @@ void foo(bvec4 paramb4, out bvec2 paramb2)
paramb2 = bvec2(b1);
}
layout(location = 0) out vec4 fragColor;
void main()
{
b2 = bvec2(0.0);
@@ -23,4 +25,7 @@ void main()
b2 = bvec2(b4.x);
if (b2.x)
foo(b4, b2);
fragColor = vec4(b4.x && b4.y);
fragColor -= vec4(b4.x || b4.y);
}