gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.35k stars 549 forks source link

Add Usage flags to the ImageView creation #3659

Closed kvark closed 3 years ago

kvark commented 3 years ago

Vulkan's maintenance2 has this structure - https://www.khronos.org/registry/vulkan/specs/1.2-extensions/man/html/VkImageViewUsageCreateInfo.html I think it would work well for the backends: DX12 for example would know if RTV/DSV/UAV/SRV need to be associated with a view without guessing. From the user perspective, it's a little more verbose, but it's the information they already have. In the worst case, they'll pass the same flags they provided to create_image.