Skip to content

Conversation

@LaylBongers
Copy link
Contributor

Connections
Closes #8565

Description
This adds a new MULTISAMPLE_ARRAY entry to TextureFormatFeatureFlags. When TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES is 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_subset is used, which is the case for apple platform. In this case support should be detected from multisampleArrayImage.
https://docs.vulkan.org/refpages/latest/refpages/source/VkPhysicalDevicePortabilitySubsetFeaturesKHR.html

Draft To-Dos

  • Feedback from someone more experienced with Vulkan. Am I missing something obvious here? Did I interpret the spec right?
  • Explicit checking for support in VK_KHR_portability_subset is not yet implemented.
  • Currently MULTISAMPLE_ARRAY is marked true on all formats. In theory all formats that support multisample should also support this. Should this be more conservative?
  • Given that this bypasses some validation, are there any previous assumptions this breaks? Any things that now need to be explicitly checked?
  • If there's low hanging fruit where it could be supported immediately on other platforms too without a lot of changes, that would be a nice-to-have.

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

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

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.

Texture with multisample imposes too strict limits on depth_or_array_layers

1 participant