i965: Allow old begin/end queryobj for gen4/5 with HW contexts
authorChris Wilson <chris@chris-wilson.co.uk>
Thu, 23 Nov 2017 09:57:08 +0000 (09:57 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 15 Dec 2017 13:41:18 +0000 (13:41 +0000)
commita68873f668acf70fc8c5158d3aafc63838efa697
tree29445d5aa9a88dad948dfec6550f34d953805b52
parentd1465b3aeee318a3a76a652325aa13d4a1946f37
i965: Allow old begin/end queryobj for gen4/5 with HW contexts

Since we have HW contexts on gen4/5, we could take advantage of them, as
done for gen6+ in commit e32cd5ffbb72 ("i965: Rely on hardware contexts
for query objects on Gen6+."), to only emit a pair of counters at
begin/end queryobj, rather than around every primitive. However, to keep
queryobj working in the meantime as we bringup support for HW ctx on
gen4/5, we can keep using the existing code.

References: e32cd5ffbb72 ("i965: Rely on hardware contexts for query objects on Gen6+.")
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/drivers/dri/i965/brw_queryobj.c