mirror of
https://github.com/libretro/RetroArch
synced 2025-02-01 09:32:58 +00:00
5af5222249
- https://github.com/KhronosGroup/SPIRV-Cross/commit/ 66a407285e36a0f772e3209cb86ded6e3d900f6a
55 lines
813 B
Plaintext
55 lines
813 B
Plaintext
#version 310 es
|
|
|
|
// We write in all paths (and no reads), so should just be out.
|
|
void out_test_0(int cond, inout int i)
|
|
{
|
|
if (cond == 0)
|
|
i = 40;
|
|
else
|
|
i = 60;
|
|
}
|
|
|
|
// We write in all paths (and no reads), so should just be out.
|
|
void out_test_1(int cond, inout int i)
|
|
{
|
|
switch (cond)
|
|
{
|
|
case 40:
|
|
i = 40;
|
|
break;
|
|
|
|
default:
|
|
i = 70;
|
|
break;
|
|
}
|
|
}
|
|
|
|
// We don't write in all paths, so should be inout.
|
|
void inout_test_0(int cond, inout int i)
|
|
{
|
|
if (cond == 0)
|
|
i = 40;
|
|
}
|
|
|
|
void inout_test_1(int cond, inout int i)
|
|
{
|
|
switch (cond)
|
|
{
|
|
case 40:
|
|
i = 40;
|
|
break;
|
|
}
|
|
}
|
|
|
|
|
|
void main()
|
|
{
|
|
int cond = 40;
|
|
int i = 50;
|
|
|
|
out_test_0(cond, i);
|
|
out_test_1(cond, i);
|
|
inout_test_0(cond, i);
|
|
inout_test_1(cond, i);
|
|
}
|