[native][vulkan] Support samplers in ResourceTable To store both samplers and images together in the same descriptor set array, we use VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, and when adding a texture view to the table, we set an "unused sampler", and similarly when adding a sampler to the table, we set an "unused image". Although this method wastes descriptor memory space, since each descriptor stores both a sampler and an image, this keeps shader emission simpler (one set of arrays per resource type at the same binding, with simple indexing), and allows us to store all descriptors in one descriptor set with VK_DESCRIPTOR_BINDING_VARIABLE_DESCRIPTOR_COUNT_BIT enabled. Also: - Added two more e2e ResourceTableTests, one that adds a simple sampler to the resource table, and another that adds multiple samplers, making sure they sample a texture that's also added to the resource table correctly. Bug: 473354063 Change-Id: I7fa8e89497fc12722c84f9136046ec6bc5dabba3 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/294735 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@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.