Zebediah Figura (@zfigura) commented about dlls/wined3d/cs.c:
static void wined3d_cs_wait_event(struct wined3d_cs *cs) {
- static const LARGE_INTEGER query_timeout = {.QuadPart = WINED3D_CS_WAIT_TIMEOUT * -10};
It may be worth being aware that this won't actually work on Windows, or, well, it'll give you a wait at least as long as one interrupt timer tick, which is no shorter than 1 ms. I... *think* Linux can do shorter waits, although it's not particularly easy to find this out from research, and I don't know how much of a concern it is if this is only a problem on Windows.
I'm also not sure how much of a concern it is to poll for queries only every 1 ms. I guess cases where there are active queries but the CS is sleeping for more than 100 µs are going to be rare anyway (or symptomatic of some client-side overhead that should be fixed)?