diff options
author | Iago Toral Quiroga <[email protected]> | 2018-01-04 03:45:56 +0100 |
---|---|---|
committer | Iago Toral Quiroga <[email protected]> | 2018-01-18 16:37:06 +0100 |
commit | 7ec6e4e68980c575b0818304920a8a8829ebd240 (patch) | |
tree | 842e29aa93b24353d31b16006c9fd740c68dfbe0 /src/gallium | |
parent | c9b2cb78972dd874edd5c612e6a221fb1f4d6e50 (diff) |
anv/query: implement multiview interactions
From the Vulkan spec with KHX extensions:
"If queries are used while executing a render pass instance that has
multiview enabled, the query uses N consecutive query indices
in the query pool (starting at query) where N is the number of bits
set in the view mask in the subpass the query is used in.
How the numerical results of the query are distributed among the
queries is implementation-dependent. For example, some implementations
may write each view's results to a distinct query, while other
implementations may write the total result to the first query and write
zero to the other queries. However, the sum of the results in all the
queries must accurately reflect the total result of the query summed
over all views. Applications can sum the results from all the queries to
compute the total result."
In our case we only really emit a single query (in the first query index)
that stores the aggregated result for all views, but we still need to manage
availability for all the other query indices involved, even if we don't
actually use them.
This is relevant when clients call vkGetQueryPoolResults and pass all N
queries to retrieve the results. In that scenario, without this patch,
we will never see queries other than the first being available since we
never emit them.
v2: we need the same treatment for timestamp queries.
v3 (Jason):
- Better an if instead of an early return.
- We can't write to this memory in the CPU, we should use
MI_STORE_DATA_IMM and emit_query_availability (Jason).
v4 (Jason):
- No need to take the value to write as parameter, just hard code it to 0.
Fixes test failures in some work-in-progress CTS multiview+query tests.
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/gallium')
0 files changed, 0 insertions, 0 deletions