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 <samuel.pitoiset@gmail.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18513>
This commit is contained in:
Samuel Pitoiset 2022-09-09 09:55:49 +02:00 committed by Marge Bot
parent 767c401dea
commit 28af93ace7

View File

@ -4085,8 +4085,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;
}