Files
filament/third_party/glslang/Test/spv.boolInBlock.frag
Romain Guy 9f2592ed9d Update SPIRV libraries (#99)
* Update SPIRV libraries

- Update `spirv-cross`
- Update `spirv-tools`
- Update `glslang`

`spirv-tools` contains a fix for an issue we reported (unnecessary promotions to highp in certain expressions).

* Add SPIRV-Tools dependency to matinfo
2018-08-15 12:59:17 -07:00

31 lines
496 B
GLSL

#version 450
layout(binding = 0, std140) uniform Uniform
{
bvec4 b4;
};
layout(binding = 1, std430) buffer Buffer
{
bvec2 b2;
};
void foo(bvec4 paramb4, out bvec2 paramb2)
{
bool b1 = paramb4.z;
paramb2 = bvec2(b1);
}
layout(location = 0) out vec4 fragColor;
void main()
{
b2 = bvec2(0.0);
if (b4.z)
b2 = bvec2(b4.x);
if (b2.x)
foo(b4, b2);
fragColor = vec4(b4.x && b4.y);
fragColor -= vec4(b4.x || b4.y);
}