aboutsummaryrefslogtreecommitdiff
path: root/src/common/thread.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2019-11-26 18:52:15 -0300
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-02-14 17:33:13 -0300
commit339a227a5e05d355f1b337c7fd6f8d0a9217f78a (patch)
tree560202675a073aa8e3863b4e17874fed27db8a6d /src/common/thread.cpp
parent9d7d67501faecd9bb0e35d3d2e8c1ba32906d01a (diff)
gl_query_cache: Implement host queries using a deferred cache
Instead of waiting immediately for executed commands, defer the query until the guest CPU reads it. This way we get closer to what the guest program is doing. To archive this we have to build a dependency queue, because host APIs (like OpenGL and Vulkan) use ranged queries instead of counters like NVN. Waiting for queries implicitly uses fences and this requires a command being queued, otherwise the driver will lock waiting until a timeout. To fix this when there are no commands queued, we explicitly call glFlush.
Diffstat (limited to 'src/common/thread.cpp')
0 files changed, 0 insertions, 0 deletions