panvk/csf: fix provoking vertex mode in partial secondary cmdbufs
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run

For partial secondary cmdbufs, we emit FBDs/TDs in the primary cmdbuf
before calling the secondary. In order to set the provoking vertex mode
correctly here, we need to look at the mode set by pipelines bound in
the secondary cmdbuf.

This leaves one edge case: reemitting FBDs/TDs in a secondary cmdbuf
after a flush. If the secondary cmdbuf only contains vk_meta draws,
without ever binding a pipeline, we won't know which provoking vertex
mode to use here. This is actually okay, because in that case the
provoking vertex mode doesn't matter for any of the draws in the
secondary, and the FBDs/TDs will be reemitted on the primary with the
correct mode.

Fixes: 7a9f14d3c2 ("panvk: advertise VK_EXT_provoking_vertex")
Signed-off-by: Olivia Lee <olivia.lee@collabora.com>
Tested-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Reviewed-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34974>
This commit is contained in:
Olivia Lee 2025-05-13 17:55:01 -07:00 committed by Marge Bot
parent 885805560f
commit 65406cf500

View file

@ -2356,6 +2356,9 @@ panvk_per_arch(cmd_prepare_exec_cmd_for_draws)(
return VK_SUCCESS;
if (!inherits_render_ctx(primary)) {
enum u_tristate first_provoking_vertex =
secondary->state.gfx.render.first_provoking_vertex;
set_provoking_vertex_mode(primary, first_provoking_vertex);
VkResult result = get_render_ctx(primary);
if (result != VK_SUCCESS)
return result;