anv/query: Use snooping on !LLC platforms
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 6 Apr 2017 20:34:38 +0000 (13:34 -0700)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 7 Apr 2017 19:17:20 +0000 (12:17 -0700)
commit4e17b59f6cea79df078f553376b0392fbbf1ae0a
tree260d9bdfc9a3c58ea95d2c4684d78c92c0d21471
parent5318d1ff94b474103a69e16af25bf641dad20a7b
anv/query: Use snooping on !LLC platforms

Commit b2c97bc789198427043cd902bc76e194e7e81c7d which made us start
using a busy-wait for individual query results also messed up cache
flushing on !LLC platforms.  For one thing, I forgot the mfence after
the clflush so memory access wasn't properly getting fenced.  More
importantly, however, was that we were clflushing the whole query range
and then waiting for individual queries and then trying to read the
results without clflushing again.  Getting the clflushing both correct
and efficient is very subtle and painful.  Instead, let's side-step the
problem by just snooping.

Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
src/intel/vulkan/genX_query.c