In old drivers there was a bug in getting the current GPU time on Vega GPUs, as described also here:
This was fixed in later drivers, but the behavior is still not correct. Using the following code fragment:
//create a query object
//get current GPU time on the CPU, synchronous call
//push a timestamp query
//fetch the timestamp value immediately
//normally this would be done only later after a fence, but the bug shows this way too
glGetQueryObjectui64v(qry, GL_QUERY_RESULT, &v);
//this fails on Vega, (19.10.1 checked)
assert(v >= vcpu);
Note this technique is used to measure pipeline latency and is described also in OpenGL Superbible by Graham Sellers.
The time returned by the glGetInteger64v(GL_TIMESTAMP, ...) call should be lower than the time when the later query has been executed.