mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 10:30:13 +01:00
svga: skip query flush if we already have the query result
This reduces the number of times we flush in some situations (the arbocclude demo is one trivial example). Tested with Piglit, ETQW, Sauerbraten, arbocclude. Reviewed-by: Charmaine Lee <charmainel@vmware.com>
This commit is contained in:
parent
c71e82b8e9
commit
15dee0fc1d
1 changed files with 5 additions and 5 deletions
|
|
@ -638,11 +638,11 @@ get_query_result_vgpu10(struct svga_context *svga, struct svga_query *sq,
|
|||
|
||||
sws->query_get_result(sws, sq->gb_query, sq->offset, &queryState, result, resultLen);
|
||||
|
||||
if (!sq->fence) {
|
||||
/* The query hasn't been submitted yet. We need to submit it now
|
||||
* since the GL spec says "Querying the state for a given occlusion
|
||||
* query forces that occlusion query to complete within a finite amount
|
||||
* of time."
|
||||
if (queryState != SVGA3D_QUERYSTATE_SUCCEEDED && !sq->fence) {
|
||||
/* We don't have the query result yet, and the query hasn't been
|
||||
* submitted. We need to submit it now since the GL spec says
|
||||
* "Querying the state for a given occlusion query forces that
|
||||
* occlusion query to complete within a finite amount of time."
|
||||
*/
|
||||
svga_context_flush(svga, &sq->fence);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue