KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.7k stars 452 forks source link

VK_NV_memory_decompression valid api usage #2341

Open BeastLe9enD opened 3 months ago

BeastLe9enD commented 3 months ago

I'm using the VK_NV_memory_decompression extension and for me its unclear if the the buffers used by srcAddress and dstAddress inside VkDecompressMemoryRegionNV must have any VkBufferUsageFlags except VK_BUFFER_USAGE_SHADER_DEVICE_ADDRESS_BIT?

Although, let's say I'm copying my data from a staging buffer inside a gpu buffer to use this buffer as the srcAddress inside VkDecompressMemoryRegionNV after that, what dstStageMask / dstAccessMask do I need for the buffer memory barrier in between?

Am I missing something inside the docs or is this unclear?

vkushwaha-nv commented 3 months ago

The NV extension should treat the decompression as a compute operation and so must use appropriate stage/access masks.

This extension is being promoted to EXT, where new decompression related pipeline stage/access masks are being added, see https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6237

BeastLe9enD commented 3 months ago

@vkushwaha-nv ext extension with appropriate pipeline stages/access masks sounds nice! is there an estimated time when it will be released so I dont need to mess around with the nv ext anymore?:D

vkushwaha-nv commented 3 months ago

Don't know the exact time yet, but I will ask for review again on the MR so we can get it published soon.

BeastLe9enD commented 3 months ago

@vkushwaha-nv thanks a lot!

spnda commented 3 months ago

This extension is being promoted to EXT, where new decompression related pipeline stage/access masks are being added, see https://gitlab.khronos.org/vulkan/vulkan/-/merge_requests/6237

May I ask if there's any consideration made to support more compression models besides GDeflate? For example, normal Deflate, or other algorithms such as LZMA or LZ, when perhaps there is an enhanced GPU version available?

oddhack commented 2 months ago

Assign to @dgkoch to help us remember to close this once the NV extension is published.

dgkoch commented 2 months ago

Assign to @dgkoch to help us remember to close this once the NV extension is published.

The NV extension is published. I'm pretty sure you meant EXT.

BeastLe9enD commented 1 month ago

any progress on this? Just curious if there will be lz4 support

dgkoch commented 1 month ago

any progress on this? Just curious if there will be lz4 support

I wouldn't expect anything other than GDeflate support in the first version. Other algorithms could be added via layered extensions in the future.