tu: Remove tu_attachment_info

This is an old leftover from the skeleton stage of the driver, and we
have never needed anything other than the image view. Having this in
the way made it impossible to write generic code that reads the
attachments in the !image_framebuffer and dynamic rendering cases.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37919>
This commit is contained in:
Connor Abbott
2025-10-16 09:13:17 -04:00
committed by Marge Bot
parent 8a12a0ec24
commit efde8bf599
3 changed files with 4 additions and 9 deletions
+1 -1
View File
@@ -5807,7 +5807,7 @@ tu_CmdBeginRenderPass2(VkCommandBuffer commandBuffer,
for (unsigned i = 0; i < pass->attachment_count; i++) {
cmd->state.attachments[i] = pAttachmentInfo ?
tu_image_view_from_handle(pAttachmentInfo->pAttachments[i]) :
cmd->state.framebuffer->attachments[i].attachment;
cmd->state.framebuffer->attachments[i];
}
if (pass->attachment_count) {
for (unsigned i = 0; i < pRenderPassBegin->clearValueCount; i++)
+2 -2
View File
@@ -3608,7 +3608,7 @@ tu_CreateFramebuffer(VkDevice _device,
size_t size = sizeof(*framebuffer);
if (!imageless)
size += sizeof(struct tu_attachment_info) * pCreateInfo->attachmentCount;
size += sizeof(struct tu_image_view *) * pCreateInfo->attachmentCount;
framebuffer = (struct tu_framebuffer *) vk_object_alloc(
&device->vk, pAllocator, size, VK_OBJECT_TYPE_FRAMEBUFFER);
if (framebuffer == NULL)
@@ -3623,7 +3623,7 @@ tu_CreateFramebuffer(VkDevice _device,
for (uint32_t i = 0; i < pCreateInfo->attachmentCount; i++) {
VkImageView _iview = pCreateInfo->pAttachments[i];
struct tu_image_view *iview = tu_image_view_from_handle(_iview);
framebuffer->attachments[i].attachment = iview;
framebuffer->attachments[i] = iview;
}
}
+1 -6
View File
@@ -501,11 +501,6 @@ VkResult
tu_allocate_lazy_memory(struct tu_device *dev,
struct tu_device_memory *mem);
struct tu_attachment_info
{
struct tu_image_view *attachment;
};
struct tu_vsc_config {
/* number of tiles */
VkExtent2D tile_count;
@@ -546,7 +541,7 @@ struct tu_framebuffer
struct tu_tiling_config tiling[TU_GMEM_LAYOUT_COUNT];
uint32_t attachment_count;
struct tu_attachment_info attachments[0];
const struct tu_image_view *attachments[0];
};
VK_DEFINE_NONDISP_HANDLE_CASTS(tu_framebuffer, base, VkFramebuffer,
VK_OBJECT_TYPE_FRAMEBUFFER)