diff options
author | Neil Roberts <[email protected]> | 2014-11-25 17:52:27 +0000 |
---|---|---|
committer | Neil Roberts <[email protected]> | 2015-02-16 12:09:17 +0000 |
commit | bb77745681e179b53ea64da7bc1987b57643b7b0 (patch) | |
tree | 9d79b892d3bf2065727f9f74d2ba8ba5413093fc /doxygen | |
parent | 946e29847bb6bca18244192bad8058922ae0a948 (diff) |
meta: Fix saving the results of the current occlusion query
When restoring the current state in _mesa_meta_end it was previously trying to
copy the on-going sample count of the current occlusion query into the new
query after restarting it so that the driver will continue adding to the
previous value. This wouldn't work for two reasons. Firstly, the query might
not be ready yet so the Result member will usually be zero. Secondly the saved
query is stored as a pointer to the query object, not a copy of the struct, so
it is actually restarting the exact same object. Copying the result value is
just copying between identical addresses with no effect. The call to
_mesa_BeginQuery will have always reset it back to zero.
This patch fixes it by making it actually wait for the query object to be
ready before grabbing the previous result. The downside of doing this is that
it could introduce a stall but I think this situation is unlikely so it might
not matter too much. A better solution might be to introduce a real
suspend/resume mechanism to the driver interface. This could be implemented in
the i965 driver by saving the depth count multiple times like it does in the
i945 driver.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88248
Reviewed-by: Carl Worth <[email protected]>
Cc: "10.5" <[email protected]>
Diffstat (limited to 'doxygen')
0 files changed, 0 insertions, 0 deletions