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

Vulkan's CommandList::copyTexture copies the entire region instead of slice. #41

Closed
01Pollux opened this issue Dec 18, 2023 · 1 comment

Comments

@01Pollux
Copy link

copyTexture(ITexture* _dst, const TextureSlice& dstSlice, IStagingTexture* _src, const TextureSlice& srcSlice) and copyTexture(IStagingTexture* _dst, const TextureSlice& dstSlice, ITexture* _src, const TextureSlice& srcSlice) uses vk::Extent3D srcMipSize/dstMipSize of the whole image instead of the slice that was resolved.

vk::Extent3D srcMipSize = src->imageInfo.extent;
srcMipSize.width = std::max(srcMipSize.width >> resolvedDstSlice.mipLevel, 1u);
srcMipSize.height = std::max(srcMipSize.height >> resolvedDstSlice.mipLevel, 1u);

vk::Extent3D dstMipSize = dst->imageInfo.extent;
dstMipSize.width = std::max(dstMipSize.width >> resolvedDstSlice.mipLevel, 1u);
dstMipSize.height = std::max(dstMipSize.height >> resolvedDstSlice.mipLevel, 1u);

was this the intended behaviour?

apanteleev added a commit that referenced this issue Dec 19, 2023
@apanteleev
Copy link
Contributor

This was a bug, now fixed. Thank you for reporting it!

GaelCathelin pushed a commit to GaelCathelin/nvrhi that referenced this issue Jan 11, 2024
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

No branches or pull requests

2 participants