v3dv: fix incorrect attachment reference
We were using the subpass render target index to index into the framebuffer, which is not correct, since the framebuffer is defined for the render pass. We should use the attachment index instead. Fixes: dEQP-VK.renderpass.suballocation.attachment_allocation.roll.{40,48} Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>
This commit is contained in:
parent
03a150c8ab
commit
360adff215
|
@ -504,7 +504,7 @@ emit_color_clear_rect(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
* format.
|
||||
*/
|
||||
struct v3dv_image_view attachment_layer_view;
|
||||
memcpy(&attachment_layer_view, subpass_fb->attachments[rt_idx],
|
||||
memcpy(&attachment_layer_view, subpass_fb->attachments[attachment_idx],
|
||||
sizeof(struct v3dv_image_view));
|
||||
if (vk_format_is_depth_or_stencil(attachment_layer_view.vk_format)) {
|
||||
attachment_layer_view.aspects = VK_IMAGE_ASPECT_COLOR_BIT;
|
||||
|
@ -527,7 +527,8 @@ emit_color_clear_rect(struct v3dv_cmd_buffer *cmd_buffer,
|
|||
uint32_t dirty_dynamic_state = 0;
|
||||
for (uint32_t i = 0; i < rect->layerCount; i++) {
|
||||
attachment_layer_view.first_layer =
|
||||
subpass_fb->attachments[rt_idx]->first_layer + rect->baseArrayLayer + i;
|
||||
subpass_fb->attachments[attachment_idx]->first_layer +
|
||||
rect->baseArrayLayer + i;
|
||||
attachment_layer_view.last_layer = attachment_layer_view.first_layer;
|
||||
|
||||
VkImageView fb_attachment =
|
||||
|
|
Loading…
Reference in New Issue