Invalid enumerant error on conditional render with AMD catalyst (linux)

So one of my examples has stopped working with newer Linux catalyst drivers. I think 12.8 was the last one where it worked and on 12.9 and 13.1 it didn’t.
The code of the full example can be found here: OpenGL-Examples/10queries_conditional_render.cpp at master · progschj/OpenGL-Examples · GitHub
The error appears on line 660 and it gives GL_INVALID_ENUM.

glBeginConditionalRender(chunks[j].query, GL_QUERY_BY_REGION_WAIT);

The reference page for BeginConditionalRender tells me that invalid enum is generated when mode is invalid. But GL_QUERY_BY_REGION_WAIT is clearly listed as as valid value? Using GL_QUERY_WAIT also produces invalid enum and both NO_WAIT versions don’t produce an error but just result in nothing being rendered at all. The code works as expected on my nvidia box though and I’m fairly sure it did work at some point on this amd one with an earlier version.

Now I’m not sure if this is a bug in my code that only shows up with the new driver (wouldn’t be the first time) or if I’m looking at a driver bug? I’m at least fairly sure that producing invalid enum is a bug.

Something tells me that this issue and other conditional rendering related issues will be fixed in an upcoming release :wink:

So this is a known bug? (I couldn’t find anything)