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
#2371
Description
astc_hdr
field to PhysicalDeviceFeatures to holdPhysicalDeviceTextureCompressionASTCHDRFeaturesEXT
when this feature is supported;astc_hdr
is not none, then use this feature to enable extension;ExtSwapchainColorspaceFn
during createInstance
to provide wide color gamut support;EXTENDED_SRGB_LINEAR_EXT
color space when creating the swapchain;DISPLAY_P3_NONLINEAR_EXT
andEXTENDED_SRGB_LINEAR_EXT
get_physical_device_surface_formats
detect color space to choose, but needPhysicalDevice
as a parameter thatfn create_swapchain
cannot provide, that needs to change a lot of code.Testing
Running on maOS 12.2.1 (M1 Max MacBook Pro, vulkan-portability) can perfectly display HDR ASTC texture via wgpu-on-app demo, but on Ubundu 20.04, currently vulkan driver cannot support WCG color space:
The vk backend on Android has weak support for HDR ASTC formats, I'm tested a lot of Android devices(real devices + cloud devices), all cannot find
VK_EXT_texture_compression_astc_hdr
extension, screenshots below are of tested cloud Android devices with GL Extensions Viewer installed to detect the vulkan extensions: