I am using fglrx on Debian stable. fglrxinfo:
display: :0 screen: 0
OpenGL vendor string: Advanced Micro Devices, Inc.
OpenGL renderer string: AMD Radeon R7 200 Series
OpenGL version string: 4.5.13399 Compatibility Profile Context 15.201.1151
Yesterday I spent a lot of time debugging a seemingly correct switch-case statement similar to this:
switch (a) {
case 1,2,3: i++; break;
case 4,5,6: i–;
}
It turned out that for some values of a between 1 and 6 no case inside the switch is triggered.
If written like this:
switch (a) {
case 1:
case 2:
case 3: i++; break;
case 4:
case 5:
case 6: i–;
}
the expected results are produced. So I turned to the spec and it seems that case statements with
multiple case labels are generally not allowed in GLSL.
So there are one and a half bugs:
- Multiple case labels should lead to compile-time errors but don’t. (not nice)
1.5 The technically illegal case statement behaves in unexpected ways. (really bad)
Besides getting this documented somewhere, the purpose of this post is to ask where to report this.
There is always ati.cchtml.com, but that is fairly unofficial and I can’t make an account (I don’t
receive the confirmation message).
Also, can anyone reproduce this? I’m pretty sure it is buggy on my machine and it looks like a
compiler problem so I would expect that it affects at least all GCN families, but it never hurts to try…