Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for tracking Vulkan layout transition and image aspect #1573

Merged
merged 1 commit into from
Jan 25, 2018
Merged
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
9 changes: 8 additions & 1 deletion gapis/api/vulkan/vulkan.api
Original file line number Diff line number Diff line change
Expand Up @@ -4402,17 +4402,21 @@ cmd VkResult vkCreateImage(

imageAspect := as!VkImageAspectFlags(
switch info.format {
// Depth only
case VK_FORMAT_D16_UNORM,
VK_FORMAT_X8_D24_UNORM_PACK32,
VK_FORMAT_D32_SFLOAT:
VK_IMAGE_ASPECT_DEPTH_BIT
// Stencil only
case VK_FORMAT_S8_UINT:
VK_IMAGE_ASPECT_STENCIL_BIT
// Depth and Stencil
case VK_FORMAT_D16_UNORM_S8_UINT,
VK_FORMAT_D24_UNORM_S8_UINT,
VK_FORMAT_D32_SFLOAT_S8_UINT:
VK_IMAGE_ASPECT_DEPTH_BIT |
VK_IMAGE_ASPECT_COLOR_BIT
VK_IMAGE_ASPECT_STENCIL_BIT
// Others
default:
VK_IMAGE_ASPECT_COLOR_BIT
})
Expand Down Expand Up @@ -8146,6 +8150,9 @@ vkCmdEndRenderPassArgs {
}

sub void dovkCmdEndRenderPass(ref!vkCmdEndRenderPassArgs unused) {
for _, i, a in lastDrawInfo().RenderPass.AttachmentDescriptions {
lastDrawInfo().Framebuffer.ImageAttachments[i].Image.Info.Layout = a.finalLayout
}
lastDrawInfo().InRenderPass = false
popRenderPassMarker()
switch len(lastDrawInfo().RenderPass.SubpassDescriptions) > 1 {
Expand Down