Module: Mesa Branch: staging/22.2 Commit: d30ddb040623fc001d59ed57032df42f254f73e1 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d30ddb040623fc001d59ed57032df42f254f73e1
Author: Samuel Pitoiset <[email protected]> Date: Fri Sep 9 09:55:49 2022 +0200 radv: fix pipelineStageCreationFeedbackCount when it's 0 >From the Vulkan spec 1.3.227: "If pipelineStageCreationFeedbackCount is not 0, pPipelineStageCreationFeedbacks must be a valid pointer to an array of pipelineStageCreationFeedbackCount VkPipelineCreationFeedback structures." Cc: mesa-stable Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-By: Mike Blumenkrantz <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18513> (cherry picked from commit 28af93ace7b4a5d7dfd1cbfa6ab14ffcb86ad6ba) --- .pick_status.json | 2 +- src/amd/vulkan/radv_pipeline.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 1104393b325..4e36e819aab 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1507,7 +1507,7 @@ "description": "radv: fix pipelineStageCreationFeedbackCount when it's 0", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 1d358a8a04d..5444d80ed30 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -4999,8 +4999,9 @@ done: if (creation_feedback) { *creation_feedback->pPipelineCreationFeedback = pipeline_feedback; - assert(stageCount == creation_feedback->pipelineStageCreationFeedbackCount); - for (uint32_t i = 0; i < stageCount; i++) { + uint32_t stage_count = creation_feedback->pipelineStageCreationFeedbackCount; + assert(stage_count == 0 || stageCount == stage_count); + for (uint32_t i = 0; i < stage_count; i++) { gl_shader_stage s = vk_to_mesa_shader_stage(pStages[i].stage); creation_feedback->pPipelineStageCreationFeedbacks[i] = stages[s].feedback; }
