mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-04 11:58:10 +02:00
panvk/csf: fix provoking vertex mode in partial secondary cmdbufs
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> (cherry picked from commit65406cf500) Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35194>
This commit is contained in:
parent
fa98cf6af0
commit
d0dd9ab2a8
2 changed files with 4 additions and 1 deletions
|
|
@ -4394,7 +4394,7 @@
|
|||
"description": "panvk/csf: fix provoking vertex mode in partial secondary cmdbufs",
|
||||
"nominated": true,
|
||||
"nomination_type": 2,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "7a9f14d3c2b1470703fb68216c40fc0572f94815",
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -2322,6 +2322,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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue