turnip: save attachment samples in renderpass state

This is needed to be able to know the number of samples during
CmdClearAttachments which can be used while the framebuffer is unknown.

Signed-off-by: Jonathan Marek <jonathan@marek.ca>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3783>
This commit is contained in:
Jonathan Marek
2020-04-07 22:23:27 -04:00
committed by Marge Bot
parent 0637eab678
commit ed83281f0c
2 changed files with 5 additions and 4 deletions
+4 -4
View File
@@ -115,8 +115,8 @@ tu_CreateRenderPass(VkDevice _device,
struct tu_render_pass_attachment *att = &pass->attachments[i];
att->format = pCreateInfo->pAttachments[i].format;
att->cpp = vk_format_get_blocksize(att->format) *
pCreateInfo->pAttachments[i].samples;
att->samples = pCreateInfo->pAttachments[i].samples;
att->cpp = vk_format_get_blocksize(att->format) * att->samples;
att->load_op = pCreateInfo->pAttachments[i].loadOp;
att->stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp;
att->store_op = pCreateInfo->pAttachments[i].storeOp;
@@ -243,8 +243,8 @@ tu_CreateRenderPass2(VkDevice _device,
struct tu_render_pass_attachment *att = &pass->attachments[i];
att->format = pCreateInfo->pAttachments[i].format;
att->cpp = vk_format_get_blocksize(att->format) *
pCreateInfo->pAttachments[i].samples;
att->samples = pCreateInfo->pAttachments[i].samples;
att->cpp = vk_format_get_blocksize(att->format) * att->samples;
att->load_op = pCreateInfo->pAttachments[i].loadOp;
att->stencil_load_op = pCreateInfo->pAttachments[i].stencilLoadOp;
att->store_op = pCreateInfo->pAttachments[i].storeOp;
+1
View File
@@ -1577,6 +1577,7 @@ struct tu_subpass
struct tu_render_pass_attachment
{
VkFormat format;
uint32_t samples;
uint32_t cpp;
VkAttachmentLoadOp load_op;
VkAttachmentLoadOp stencil_load_op;