Add MULTISAMPLE_ARRAY format feature flag.
#8571
Draft
+32
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Connections
Closes #8565
Description
This adds a new
MULTISAMPLE_ARRAYentry toTextureFormatFeatureFlags. WhenTEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURESis enabled and the feature is supported, applications can use this to create 2D Array textures and views with multi-sampling enabled.Additionally, this is implemented in the Vulkan backend. Following the Vulkan specificiation, this should be allowed:
https://docs.vulkan.org/refpages/latest/refpages/source/VkImageCreateInfo.html
https://docs.vulkan.org/refpages/latest/refpages/source/VkImageViewCreateInfo.html#VUID-VkImageViewCreateInfo-image-04972
However this is not necessarily supported if
VK_KHR_portability_subsetis used, which is the case for apple platform. In this case support should be detected frommultisampleArrayImage.https://docs.vulkan.org/refpages/latest/refpages/source/VkPhysicalDevicePortabilitySubsetFeaturesKHR.html
Draft To-Dos
VK_KHR_portability_subsetis not yet implemented.MULTISAMPLE_ARRAYis marked true on all formats. In theory all formats that support multisample should also support this. Should this be more conservative?Testing
I am actively testing this branch at https://github.com/celphase/indite. Developers with an OpenXR compatible headset should be able to test multiview there.
Squash or Rebase?
Squash
Checklist
cargo fmt.taplo format.cargo clippy --tests. If applicable, add:--target wasm32-unknown-unknowncargo xtask testto run tests.CHANGELOG.mdentry.