Created attachment 130759 [details] Test case which clears a depth-stencil attachment Attached: test application to reproduce bug (see https://github.com/rikusalminen/querystall for build scripts, etc. needs c99 compiler and CFLAGS). Clearing a depth-stencil buffer when occlusion query (GL_SAMPLES_PASSED) is enabled causes the following GL debug message (via glDebugMessageCallback): GL_DEBUG_SOURCE_API GL_DEBUG_TYPE_PERFORMANCE GL_DEBUG_SEVERITY_MEDIUM id: 0xb CPU mapping a busy query object BO stalled and took 2.003 ms. Clearing GL_DEPTH_COMPONENT24 target (instead of GL_DEPTH24_STENCIL8) does not cause this behavior. GL_TIME_ELAPSED or GL_PRIMITIVES_GENERATED queries do not give this error. Here are some helpful notes from #intel-gfx IRC log: 21:12 < Kayden> ugh. the query code is fine. 21:13 < Kayden> you're hitting lunacy in meta 21:13 < Kayden> https://cgit.freedesktop.org/mesa/mesa/commit/?h=bb77745681e179b53ea64da7bc1987b57643b7b0 21:14 < Kayden> the clear isn't hitting our best-case scenario, and is falling back to a meta use-GL-to-implement-GL path, that wants to disable occlusion queries so our internal usage doesn't contribute fragments 21:14 < Kayden> and the way it does that stalls 21:14 < Kayden> we've been killing off this awful code for a while now, but some bits are still left 21:21 < Kayden> wow, that's in a sorrier state than I thought :/ 21:21 < Kayden> jekstrand: it looks like we always fall through to meta for stencil clears 21:21 < Kayden> blorp only does color... 21:21 < Kayden> fast depth only does depth... 21:22 < Kayden> I don't know why we wouldn't be using blorp for stencil 21:23 < Kayden> erm 21:23 < Kayden> jekstrand: it looks like the GL driver is never using blorp_clear_depth_stencil
Is not reproducible with latest mesa. Seems to be fixed by commit 862493f7 - https://gitlab.freedesktop.org/mesa/mesa/commit/862493f7cb2d7d065eae52e45abbd226898af37c "i965: Use blorp for depth/stencil clears on gen6+"
Yep, that would fix it. Thanks!
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.