From 6ff95bba8abd50b47117f733d3e46fb90333210f Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Mon, 17 Aug 2015 14:03:52 -0700 Subject: 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(). --- src/vulkan/anv_device.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/vulkan/anv_device.c') diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 0f06f3e5a91..145d16f485e 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -2229,7 +2229,8 @@ VkResult anv_CreateRenderPass( pass->attachments = anv_device_alloc(device, size, 8, VK_SYSTEM_ALLOC_TYPE_API_OBJECT); for (uint32_t i = 0; i < pCreateInfo->attachmentCount; i++) { - pass->attachments[i].format = pCreateInfo->pAttachments[i].format; + pass->attachments[i].format = + anv_format_for_vk_format(pCreateInfo->pAttachments[i].format); pass->attachments[i].samples = pCreateInfo->pAttachments[i].samples; pass->attachments[i].load_op = pCreateInfo->pAttachments[i].loadOp; pass->attachments[i].stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp; -- cgit v1.2.3