Skip to content

Commit

Permalink
Fix validation errors in color_write_enable (#928)
Browse files Browse the repository at this point in the history
The attachments were being created with a format that didn't
match the corresponding VkAttachmentDescription in renderPass.
  • Loading branch information
gary-sweet committed Feb 23, 2024
1 parent d432823 commit 91b4494
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions samples/extensions/color_write_enable/color_write_enable.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Copyright (c) 2023, Mobica Limited
/* Copyright (c) 2023-2024, Mobica Limited
*
* SPDX-License-Identifier: Apache-2.0
*
Expand Down Expand Up @@ -231,9 +231,10 @@ void ColorWriteEnable::create_attachment(VkFormat format, FrameBufferAttachment
// Create attachments for each framebuffer used in the first pipeline
void ColorWriteEnable::create_attachments()
{
create_attachment(VK_FORMAT_B8G8R8A8_SRGB, &attachments.red);
create_attachment(VK_FORMAT_B8G8R8A8_SRGB, &attachments.green);
create_attachment(VK_FORMAT_B8G8R8A8_SRGB, &attachments.blue);
VkFormat format = render_context->get_format();
create_attachment(format, &attachments.red);
create_attachment(format, &attachments.green);
create_attachment(format, &attachments.blue);
}

void ColorWriteEnable::request_gpu_features(vkb::PhysicalDevice &gpu)
Expand Down

0 comments on commit 91b4494

Please sign in to comment.