• Jan Sikorski's avatar
    wined3d: Poll Vulkan queries directly on the application thread. · 1a7a50a1
    Jan Sikorski authored
    We want to avoid using the poll list, for occlusion queries especially,
    as in some games the number of occlusion queries can reach the hundreds.
    OpenGL backend already does this by using ARB_QUERY_BUFFER_OBJECT.
    We could mimic this in Vulkan too using compute shaders to accumulate
    pending queries, however, unlike with OpenGL, we can also just directly
    call vkGetQueryPoolResults() from the application's thread.
    A downside of the approach taken here is that Vulkan queries allocated
    to a wined3d_query are only released after the query is reused or
    destroyed. In principle, if this ever becomes a problem, it could be
    avoided by protecting the query pool with a mutex and releasing queries
    after reading the results.
    Signed-off-by: 's avatarJan Sikorski <jsikorski@codeweavers.com>
    Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com>
    Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
    1a7a50a1
query.c 68.7 KB