[dawn][tint] ArgBufs: match shader layout to argbuf encoder layout It turns out the MSL struct is a literal struct that views the argbuf memory. It needs to have exactly the same layout as the argbuf encoder. To do this, pass the entire layout in from Dawn to Tint, and have Tint replicate that struct. Tint uses the types provided by the shader if any, and otherwise generates placeholder types. dawn_end2end_tests --enable-backend-validation --enable-toggles=metal_use_argument_buffers: - BindGroupTests.ReusedUBO - BindGroupTests.UBOSamplerAndTexture - BindGroupTests.MultipleBindLayouts Notes on internal-only binding enum values: - The only ones that matter are the storage buffer binding types, the others are just for completeness. - Currently "unknown" filtering/filterability is unhandled, unsure if it will need to be. - Tests: - MetalBufferRobustnessTest.* - BufferZeroInitTest.IndirectBuffer* - InternalStorageBufferBindingTests.QueryResolveBufferBoundAsInternalStorageBuffer - ... and random others I didn't keep track of Bug: 363031535 Change-Id: I2dc2903098a7e21d44e03503167b9b6d4a332be2 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/294535 Auto-Submit: Kai Ninomiya <kainino@chromium.org> Commit-Queue: dan sinclair <dsinclair@chromium.org> Reviewed-by: dan sinclair <dsinclair@chromium.org>
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.