vk: Merge anv_attachment_view into anv_image_view

This prepares for merging VkAttachmentView into VkImageView.
This commit is contained in:
Chad Versace
2015-10-06 11:42:43 -07:00
parent 6b5ce5daf5
commit d4446a7e58
9 changed files with 71 additions and 95 deletions

View File

@@ -431,11 +431,8 @@ anv_cmd_buffer_emit_binding_table(struct anv_cmd_buffer *cmd_buffer,
* put the color attachments into the binding table.
*/
for (uint32_t a = 0; a < attachments; a++) {
const struct anv_attachment_view *aview =
const struct anv_image_view *iview =
fb->attachments[subpass->color_attachments[a]];
const struct anv_image_view *iview = &aview->image_view;
assert(aview->attachment_type == ANV_ATTACHMENT_VIEW_TYPE_COLOR);
bt_map[a] = iview->surface_state.offset + state_offset;
add_surface_state_reloc(cmd_buffer, iview->surface_state,
@@ -814,7 +811,7 @@ VkResult anv_ResetCommandPool(
/**
* Return NULL if the current subpass has no depthstencil attachment.
*/
const struct anv_attachment_view *
const struct anv_image_view *
anv_cmd_buffer_get_depth_stencil_view(const struct anv_cmd_buffer *cmd_buffer)
{
const struct anv_subpass *subpass = cmd_buffer->state.subpass;
@@ -823,10 +820,10 @@ anv_cmd_buffer_get_depth_stencil_view(const struct anv_cmd_buffer *cmd_buffer)
if (subpass->depth_stencil_attachment == VK_ATTACHMENT_UNUSED)
return NULL;
const struct anv_attachment_view *aview =
const struct anv_image_view *iview =
fb->attachments[subpass->depth_stencil_attachment];
assert(aview->attachment_type == ANV_ATTACHMENT_VIEW_TYPE_DEPTH_STENCIL);
assert(anv_format_is_depth_or_stencil(iview->format));
return aview;
return iview;
}