lavapipe: fix dynamic patchControlPoints

the dynamic state value is independent of whether tesselation is used

cc: mesa-stable

Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16824>
(cherry picked from commit fc5a3e1e37)
This commit is contained in:
Mike Blumenkrantz 2022-06-01 16:25:58 -04:00 committed by Dylan Baker
parent c9d10441f0
commit 9b77caa70f
2 changed files with 6 additions and 5 deletions

View file

@ -121,7 +121,7 @@
"description": "lavapipe: fix dynamic patchControlPoints",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

@ -898,13 +898,14 @@ static void handle_graphics_pipeline(struct vk_cmd_queue_entry *cmd,
state->info.primitive_restart = ia->primitiveRestartEnable;
}
if (pipeline->graphics_create_info.pTessellationState) {
if (!dynamic_states[conv_dynamic_state_idx(VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT)]) {
if (!dynamic_states[conv_dynamic_state_idx(VK_DYNAMIC_STATE_PATCH_CONTROL_POINTS_EXT)]) {
if (pipeline->graphics_create_info.pTessellationState) {
const VkPipelineTessellationStateCreateInfo *ts = pipeline->graphics_create_info.pTessellationState;
state->patch_vertices = ts->patchControlPoints;
} else {
state->patch_vertices = 0;
}
} else
state->patch_vertices = 0;
}
bool halfz_changed = false;
if (!pipeline->negative_one_to_one != clip_halfz) {