Quantcast
Channel: Input attachments and multisampling - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Input attachments and multisampling

$
0
0

I know how to use input attachments and multisampling separately. But I don't understand how these 2 features can be used together.

I have render pass with 2 subpasses and 4 attachments:

  1. an image, which is presented;
  2. a multisampled image with samples=N, which is rendered and resolved (into image #1) in the second subpass;
  3. a multisampled depth image with samples=N, which is rendered in the both subpasses;
  4. a multisampled image with samples=N, which is used as color attachment in the first subpass and input attachment in the second subpass.

If N equals to VK_SAMPLE_COUNT_1_BIT, everything works fine. But if N equals to VK_SAMPLE_COUNT_4_BIT, I have a lot of errors:

  • vkCreateRenderPass returns error code on Mi A1;
  • vkCreateRenderPass returns success on Mi A2 lite, but I get a lot of warnings from validation layers:

    Descriptor set 0x28107 encountered the following validation error at vkCmdDraw() time: Descriptor in binding #0 at global descriptor index 0 requires bound image to have VK_SAMPLE_COUNT_1_BIT but got VK_SAMPLE_COUNT_4_BIT.

Questions:

  • Is it prohibited to use multisampled input attachments? I can't find anything about this in spec.
  • I can resolve my image #4 in the first subpass into some other image (#5) which will be used as input attachment in the second subpass. Is it the only way to fix this problem?

Viewing all articles
Browse latest Browse all 2

Latest Images

Trending Articles





Latest Images