lavapipe: handle view mask layer count properly for begin rendering.

If the view mask is set the layer count should be taken from it,
not from the layerCount.

Fixes: 8a6160a354 ("lavapipe: VK_KHR_dynamic_rendering")
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18811>
(cherry picked from commit fe5636af6e)
This commit is contained in:
Dave Airlie
2022-09-26 09:14:46 +10:00
committed by Dylan Baker
parent 8f9fc8e186
commit 6635957f5d
2 changed files with 2 additions and 2 deletions

View File

@@ -508,7 +508,7 @@
"description": "lavapipe: handle view mask layer count properly for begin rendering.",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "8a6160a35428264fa3b4722d8c72b9c8aa4b8256"
},

View File

@@ -1976,7 +1976,7 @@ static void handle_begin_rendering(struct vk_cmd_queue_entry *cmd,
info->renderArea.extent.width;
state->framebuffer.height = info->renderArea.offset.y +
info->renderArea.extent.height;
state->framebuffer.layers = info->layerCount;
state->framebuffer.layers = info->viewMask ? util_last_bit(info->viewMask) : info->layerCount;
state->framebuffer.nr_cbufs = info->colorAttachmentCount;
state->color_att_count = info->colorAttachmentCount;