[Mesa-dev] [PATCH 10/22] anv/cmd_buffer: Disable fast clears in the GENERAL layout
Nanley Chery
nanleychery at gmail.com
Tue May 2 23:49:05 UTC 2017
On Tue, May 02, 2017 at 04:44:49PM -0700, Jason Ekstrand wrote:
> On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery <nanleychery at gmail.com>
> wrote:
>
> > Signed-off-by: Nanley Chery <nanley.g.chery at intel.com>
> > ---
> > src/intel/vulkan/anv_pass.c | 22 ++++++++++++++++++++++
> > src/intel/vulkan/anv_private.h | 1 +
> > src/intel/vulkan/genX_cmd_buffer.c | 20 ++++++++++++++------
> > 3 files changed, 37 insertions(+), 6 deletions(-)
> >
> > diff --git a/src/intel/vulkan/anv_pass.c b/src/intel/vulkan/anv_pass.c
> > index dcd9aafc64..02b8f03fa5 100644
> > --- a/src/intel/vulkan/anv_pass.c
> > +++ b/src/intel/vulkan/anv_pass.c
> > @@ -32,6 +32,16 @@ num_subpass_attachments(const VkSubpassDescription
> > *desc)
> > (desc->pDepthStencilAttachment != NULL);
> > }
> >
> > +static void
> > +init_first_subpass_layout(struct anv_render_pass_attachment * const att,
> > + const VkAttachmentReference att_ref)
> > +{
> > + if (att->first_subpass_layout == VK_IMAGE_LAYOUT_UNDEFINED) {
> > + att->first_subpass_layout = att_ref.layout;
> > + assert(att->first_subpass_layout != VK_IMAGE_LAYOUT_UNDEFINED);
> > + }
> > +}
> > +
> > VkResult anv_CreateRenderPass(
> > VkDevice _device,
> > const VkRenderPassCreateInfo* pCreateInfo,
> > @@ -90,6 +100,7 @@ VkResult anv_CreateRenderPass(
> > att->initial_layout = pCreateInfo->pAttachments[i].initialLayout;
> > att->final_layout = pCreateInfo->pAttachments[i].finalLayout;
> > att->subpass_usage = subpass_usages;
> > + assert(att->first_subpass_layout == VK_IMAGE_LAYOUT_UNDEFINED);
> >
>
> Would you mind just setting it rather than asserting? Yes, it's zero and
> we memset to 0 but it's much clearer to just initialize it.
>
>
I don't mind.
More information about the mesa-dev
mailing list