Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ bool RasterizationOrderAttachmentAccess::prepare(const vkb::ApplicationOptions &
}

// Add INPUT_ATTACHMENT_BIT so fragment shaders can read the color attachment with subpassLoad()
update_swapchain_image_usage_flags({VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT});
update_swapchain_image_usage_flags({VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_INPUT_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT});

camera.type = vkb::CameraType::LookAt;
camera.set_position({0.0f, 0.0f, -4.0f});
Expand Down
2 changes: 1 addition & 1 deletion samples/extensions/ray_tracing_basic/ray_tracing_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ bool RaytracingBasic::prepare(const vkb::ApplicationOptions &options)
}

// This sample copies the ray traced output to the swap chain image, so we need to enable the required image usage flags
const std::set<VkImageUsageFlagBits> image_usage_flags = {VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT};
const std::set<VkImageUsageFlagBits> image_usage_flags = {VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT};
update_swapchain_image_usage_flags(image_usage_flags);

// This sample renders the UI overlay on top of the ray tracing output, so we need to disable color attachment clears
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ bool RayTracingPositionFetch::prepare(const vkb::ApplicationOptions &options)
}

// This sample copies the ray traced output to the swap chain image, so we need to enable the required image usage flags
const std::set<VkImageUsageFlagBits> image_usage_flags = {VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT};
const std::set<VkImageUsageFlagBits> image_usage_flags = {VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT};
update_swapchain_image_usage_flags(image_usage_flags);

// This sample renders the UI overlay on top of the ray tracing output, so we need to disable color attachment clears
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ bool RaytracingReflection::prepare(const vkb::ApplicationOptions &options)
}

// This sample copies the ray traced output to the swap chain image, so we need to enable the required image usage flags
const std::set<VkImageUsageFlagBits> image_usage_flags = {VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT};
const std::set<VkImageUsageFlagBits> image_usage_flags = {VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT};
update_swapchain_image_usage_flags(image_usage_flags);

// This sample renders the UI overlay on top of the ray tracing output, so we need to disable color attachment clears
Expand Down
4 changes: 2 additions & 2 deletions samples/extensions/shader_object/shader_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ bool ShaderObject::resize(const uint32_t _width, const uint32_t _height)
update_uniform_buffers();

// Update swapchain to allow transfer dst to blit to it
update_swapchain_image_usage_flags({VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT});
update_swapchain_image_usage_flags({VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT});

return true;
}
Expand Down Expand Up @@ -176,7 +176,7 @@ bool ShaderObject::prepare(const vkb::ApplicationOptions &options)
initialize_descriptor_sets();

// Update swapchain to allow transfer dst to blit to it
update_swapchain_image_usage_flags({VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT});
update_swapchain_image_usage_flags({VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT, VK_IMAGE_USAGE_TRANSFER_DST_BIT, VK_IMAGE_USAGE_TRANSFER_SRC_BIT});
generate_terrain();
build_command_buffers();

Expand Down
Loading