Fix multiview renderpass queries
The spec states that "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."
This wasn't working properly for occlusion queries, but we missed it
because dEQP doesn't provide coverage for this case if timestamp queries
are not supported. This change fixes it for both query types.
Note that for occlusion queries we write the total result to the first
query, and set the remaining query results to 0, as explicitly allowed
by the spec.
For timestamp queries each query result is a valid timestamp (note that
the spec also allows for only the first query to be a timestamp, while
the remaining ones are zero).
Bug: b/142643809
Change-Id: I531248c2822c5f68d8636d4a3d153082c48cac1d
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53668
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Tested-by:
Nicolas Capens <nicolascapens@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Showing
Please
register
or
sign in
to comment