Vulkan: Fix VVL layout mismatch and YCbCr sampler filter errors Fixes Vulkan validation layer errors during draw operations caused by image layout and sampler creation mismatches (VUID-00344, VUID-01645): 1. TextureView::VulkanImageLayout used the view's usage instead of the underlying texture's usage, writing SHADER_READ_ONLY_OPTIMAL to descriptor sets while command buffer barriers transitioned the image to VK_IMAGE_LAYOUT_GENERAL (for textures with StorageBinding). 2. Sampler creation and static sampler specialization for YCbCr external formats allowed user-specified minFilter/magFilter, violating the requirement that they must match chromaFilter. Resolved by querying the underlying texture usage in TextureView's VulkanImageLayout and clamping minFilter and magFilter to chromaFilter when external formats or VK_FORMAT_UNDEFINED are used. Adds regression tests: - TextureViewTest.SampledTextureWithStorageBinding: verifies sampling a TextureBinding view when the parent texture has StorageBinding usage. - SharedTextureMemoryYCbCrAndroidTests.SampleExternalTextureWithLinearSampler: verifies sampling an external YCbCr AHB using a linear sampler. Bug: b/546851865 Change-Id: I9d1cf8a654800b112374cd27ce01e6a9d14d6f3b Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/340235 Reviewed-by: Brandon Jones <bajones@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Sanjeevi Suresh <sanjeevisuresh@google.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.