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

Added Vulkan support for copying depth textures #462

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

aquilinum0
Copy link
Contributor

The Vulkan backend currently does not support copying depth textures.

layerCount = layerCount,
mipLevel = srcMipLevel,
baseArrayLayer = srcBaseArrayLayer
};

var dstAspect = (dstVkTexture.Usage & TextureUsage.DepthStencil) != 0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only question whether VkImageAspectFlags.Stencil is permitted to be passed here if the texture has a depth-only format. There is at least one other place in the code that treats it separately: https://github.com/mellinoe/veldrid/blob/eef8375169d1960a322f47f95e9b6ee8126e7b43/src/Veldrid/Vk/VkFramebuffer.cs#L202. I suspect a validation error might be emitted if you use the Stencil flag but the texture is depth-only.

This would be confirmed one way or the other by adding a test that exercises this.

Copy link
Collaborator

@mellinoe mellinoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct overall, but there should be a test case that exercises this. Presumably this precise codepath isn't covered as the tests are all passing currently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants