Tint:
* Use the new transform::VertexFormat enum names
WGSL:
* The [[set(n)]] decoration is now [[group(n)]]
* [[builtin(vertex_idx)]] is now [[builtin(vertex_index)]]
Change-Id: I9cbf1368074488c4bb7fa81430bb12ec7581c1fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56540
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This will help check that the Vulkan devices are enough for WebGPU in
a following CL.
In addition to additional limits this CL:
- Change maxColorAttachments 4 -> 8 to match WebGPU
- Renames kMinDynamicBufferOffsetAlignment to
kMinUniformBufferOffsetAlignment.
- Renames kMaxVertexBufferStride to kMaxVertexBufferArrayStride.
- Changes validation of buffer offsets to use the separate uniform and
storage limits (but no test is added because they are the same).
- Adds validation and a test for kMaxStorageBufferBindingSize.
- Augment the null::Device memory limit for that new test (it allocates
a buffer of 512MB).
- Fix the maxColorAttachment test to not use hardcoded values.
Bug: dawn:796
Change-Id: Ibe4219130a44355ae91c02aaa0a41cf5d9f9e234
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56081
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This ensures ObjC objects do not leak. On non-Apple
platforms, the scope does nothing.
Fixed: dawn:546
Change-Id: Id43702e6536bf9cb37825a5449511e10cf0734f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55841
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Renames all the RenderPipeline*2 stuff to simple RenderPipeline* but
keeps *2 definitionas around as typedefs and wrappers so that users can
migrate away from it.
Bug: dawn:22
Change-Id: If301d81a829bba0646c3a61068f2279932b191e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51764
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
* Use new entry point IO syntax
* Use `let` instead of `const`
* Remove `-> void` from function headers
Bug: dawn:755
Change-Id: I39b5687a342ea2298c3d2e85517c9b8d9017727e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47500
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
And rename CreateShaderModuleFromWGSL to CreateShaderModule.
Bug: dawn:572
Change-Id: I80dab401078b2001d738b87d6e24437f93b690d1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45764
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Also does some updates for the new BindGroupLayoutEntry and
VertexFormats that were missed previously.
Bug: chromium:1177501
Change-Id: Icb336590673158538a1586a1f8d5ace398fb381e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45282
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Animometer's fragment shaders remains unported because it isn't clear
how to use modf in WGSL.
Bug: dawn:572
Change-Id: I29aa0ee657b813e7308f0300addd1d5795bfc16d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33821
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This makes all backends register the default queue at device
initialization time, so that the same queue is returned by
each call to GetDefaultQueue.
All usages of CreateQueue are replaced by GetDefaultQueue
except a couple ones that could use the queue initialized by
DawnTest::SetUp.
A deprecation warning mechanism is added so that users of Dawn
can now that they should upgrade their usage of the API. It also
comes with a backdoor so we can test that they are emitted.
New DeprecatedAPITests are added that will contain tests for
deprecated APIs, and will also check that deprecation warnings
are produced.
The special casing of GetDefaultQueue in the wire will be done
in a follow-up CL to ease the review. It happens to work through
the regular wire mechanisms at the moment but returns a different
object on each GetDefaultQueue call.
Bug: dawn:22
Change-Id: I78dc1fa474769674278d30040e8d05c658b88360
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19724
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
And updates all places in tests and examples where they could have been
used.
Bug: dawn:22
Change-Id: Ic36e3f1810037b5addeb9e971b1da28fdd1da183
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18380
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This changes the methods of Dawn's SwapChain to match webgpu.h, namely
Present() now doesn't take arguments, and GetNextTexture() is replaced
with GetCurrentTextureView().
BUG=dawn:269
Change-Id: Ia0debefb170caf799c3310b1dad5535c4c5f59ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13441
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
In WebGPU these are uint32_t because Vulkan accepts at most a 32-bit
unsigned integer.
Bug: dawn:22
Change-Id: Ia61cd710f80c19135ac215a9a93ef9a8f683bac2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12942
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This is to match the work in progress webgpu.h header.
BUG=dawn:22
Change-Id: Ia1077fef95e6bda541cddbd2f6ce40b79138e960
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9383
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is to match the work in progress webgpu.h header.
Also contains a fix for the wire where it wouldn't GetExtraRequiredSize
for structures that are by-value members of other structures.
BUG=dawn:22
Change-Id: I3c706bf9cd7a550d40fd667877f032c860d0a032
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9382
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This is to follow changes to WebGPU's IDL and header file where the Bit
suffix disappeared. This caused a conflict with
utils/dawn_native::ShaderStage that were both renamed to
SingleShaderStage.
BUG-dawn: 22
Change-Id: I7b085686775fa19e4b4a3b54979903d72f3ef660
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10462
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This is to match the naming convention of WebGPU's WebIDL and webgpu.h
BUG=dawn:22
Change-Id: Ia91c5a018403e6a72eb0311b5f1a072d102282a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10461
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Instead it is replaced by one enum in dawn_native and another in utils.
BUG=dawn:22
Change-Id: I094a40c8d4e22b704e59aea60cbefd1f05c5352a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8800
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
WebGPU remove dynamic-uniform-buffer and dynamic-storage-buffer but add a new attribute in
BindgroupLayoutBinding to record whether a buffer resource is dynamic.
Dawn need to align with this change.
BUG=dawn:180
Change-Id: I873ad2ec75575e72d184f89a6e3698dff6df50d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8520
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is to match the equivalent rename in WebGPU's IDL.
BUG=dawn:22
Change-Id: Ibdf75869e58835d984df559878b884c55310a403
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8623
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Yunchao He <yunchao.he@intel.com>
This requires some changes in the wire because WireCmd doesn't know the
size of void. This also adds a handwritten implementation of the Wire
commands for SetSubData that internally converts to uint8_t so that
WireCmd can generate the de/serialization.
BUG=dawn:160
Change-Id: Icbf0fd7dd841639ee6f67333844e027b27a8afcc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7780
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is a reland of 6f0b021dbf.
It also renames CreateDefaultTextureView to CreateDefaultView in a test
that landed after the tryjobs for the reverted patch passed.
Original change's description:
> Rename texture.createTextureView to createView to match WebGPU
>
> Bug: chromium:877147
> Change-Id: I186fc26054cc6729c859a4161c755a1133dc0bca
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6360
> Commit-Queue: Austin Eng <enga@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Bug: chromium:877147
Change-Id: I8e1a1adc07ad2c78081ae3cb0fa2bdb648b39c50
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6361
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This patch removes RenderPassDescriptorBuilder completely from Dawn.
With this patch, RenderPassDescriptor is a structure instead of a Dawn
object, and all the checks in RenderPassDescriptorBuilder are moved into
CommandEncoder.cpp.
This patch also updates the helper functions and structures related to
RenderPassDescriptor because RenderPassDescriptor is no longer an
object but a structure with members in pointers.
BUG=dawn:6
Change-Id: Ic6d015582031891f35ffef912f0e460a9c010f81
Reviewed-on: https://dawn-review.googlesource.com/c/4902
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Color state descriptors are a sequence of descriptors embedded
in RenderPipeline descriptor. We should use const*const* to
annotate them for supporting potential extended features added
in color state descriptors in future.
BUG=dawn:77
Change-Id: Id755569fa5076668c3db7b219b699845bc2a1d69
Reviewed-on: https://dawn-review.googlesource.com/c/4880
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
CommandEncoder is the replacement for CommandBufferBuilder. This commit
adds the dawn.json definition for it and an initial implementation that
wraps CommandBufferBuilder. This is done so that the code can be ported
to CommandEncoder gradually, otherwise the commit would be too big and
would risk many merge conflicts.
This converts all samples and end2end tests to use CommandEncoder.
BUG=dawn:8
Change-Id: If4ce86e6fb39ba4e0c2af6328d40e63be17d18c1
Reviewed-on: https://dawn-review.googlesource.com/c/4741
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
AttachmentStateDescriptor was removed in web idl. Its format info
for color attachment and depth/stencil attachment were split and
added into BlendStateDescriptor (renamed to ColorStateDescriptor)
and DepthStencilStateDescriptor (became optional) respectively.
This change makes dawn project match the revision in web idl.
BUG=dawn:106, dawn:102
Change-Id: If57b060db7b4b5d1124b4a79a3b92a3880047722
Reviewed-on: https://dawn-review.googlesource.com/c/4561
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
To match the WebGPU idl, SetRenderPipeline and SetComputePipeline need to change
the name to SetPipeline.
This patch just rename these two APIs
BUG=dawn:52
Change-Id: I2545c94158ebd051027a018650bf760a25845d73
Reviewed-on: https://dawn-review.googlesource.com/c/3480
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
This patch remove render pipeline builder and use descriptor to create render pipeline.
Sub-objects in descriptor will be removed in future.
Bug: dawn:4
Change-Id: I58dd569c7be42c2648311847b939c681189c2854
Reviewed-on: https://dawn-review.googlesource.com/c/2180
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This splits off part of CommandBufferBuilder in separate
RenderPassEncoder and ComputePassEncoder objects. To match the WebGPU
IDL and factor some code, both these encoders inherit from
ProgrammablePassEncoder.
These encoders are pure frontend objects and record into the
CommandBufferBuilder command allocator objects, so no changes to the
backends were needed.
Error handling is still ew, because the "builder" mechanism we had
doesn't allow for "split builders". Nicer error handling will have to
wait on Dawn matching WebGPU.
All the tests and samples were updated to the new structure.
BUG=dawn:5
Change-Id: I5f5d4ad866e2c07fedd1ba7a122258c6610941f1
Reviewed-on: https://dawn-review.googlesource.com/1543
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This removes the following for both Buffer and Texture:
- The builder's SetInitialUsage
- The object's FreezeUsage and TransitionUsage methods
- The CommandBuffer Transition<Object>Usage methods
All samples and tests are simplified as a result. This also obsoletes
the UsageValidationTest which is removed.
Some validation was dependent on "current usage" and hasn't been
reintroduced for implicit transitions yet:
- Buffers can be used while mapped
- Swapchain textures can be used after they have been presented.
Validation for these will involve collecting all the resources used by a
command buffer and will be done in a follow-up patch.
We are changing all object creation to use descriptors but there is no
creation argument to pass for queue, so instead Device::CreateQueue
takes no argument.