venus: track viewMask

Per spec 1.3.255: "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."

track viewMask so query feedback can copy the correct amount of queries
when multiview is enabled.

viewMask is passed in for vkCmdBeginRendering but for legacy
vkCmdBeginRenderPass/2 they are set by vkCreateRenderPass for each
subpass.

Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23348>
This commit is contained in:
Juston Li
2023-06-30 08:37:12 -07:00
committed by Marge Bot
parent de4593faa1
commit fb537262c2
4 changed files with 87 additions and 6 deletions
+10
View File
@@ -67,6 +67,16 @@ struct vn_command_buffer {
struct vn_cs_encoder cs;
uint32_t draw_cmd_batched;
/* For batching query feedback in render passes */
/* viewMask is stored per subpass for legacy render pass */
const struct vn_render_pass *render_pass;
uint32_t subpass_index;
/* view_mask is set when passed in by dynamic rendering/secondary cmd
* buffers or on each subpass iteration for legacy render pass with
* the above variables.
*/
uint32_t view_mask;
};
VK_DEFINE_HANDLE_CASTS(vn_command_buffer,
base.base,