diff options
author | Chad Versace <[email protected]> | 2015-08-17 14:03:52 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-08-17 14:08:55 -0700 |
commit | 6ff95bba8abd50b47117f733d3e46fb90333210f (patch) | |
tree | cfe146ab77cf559097c5beb767aa6fee9fae6e9e /src/vulkan/anv_image.c | |
parent | 5a6b2e6df0ac63e20856dfcd1fc9f0ff73ae67e2 (diff) |
vk: Add anv_format reference to anv_render_pass_attachment
Change type of anv_render_pass_attachment::format from VkFormat to const
struct anv_format*. This elimiates the repetitive lookups into the
VkFormat -> anv_format table when looping over attachments during
anv_cmd_buffer_clear_attachments().
Diffstat (limited to 'src/vulkan/anv_image.c')
-rw-r--r-- | src/vulkan/anv_image.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vulkan/anv_image.c b/src/vulkan/anv_image.c index 3b706c68443..0152fef9ffb 100644 --- a/src/vulkan/anv_image.c +++ b/src/vulkan/anv_image.c @@ -689,7 +689,10 @@ anv_CreateAttachmentView(VkDevice _device, assert(pCreateInfo->sType == VK_STRUCTURE_TYPE_ATTACHMENT_VIEW_CREATE_INFO); - if (anv_is_vk_format_depth_or_stencil(pCreateInfo->format)) { + const struct anv_format *format = + anv_format_for_vk_format(pCreateInfo->format); + + if (anv_format_is_depth_or_stencil(format)) { struct anv_depth_stencil_view *view = anv_device_alloc(device, sizeof(*view), 8, VK_SYSTEM_ALLOC_TYPE_API_OBJECT); |