Commit Graph

134 Commits

Author SHA1 Message Date
Kai Ninomiya ae1f25fee8 Update naming for vertex state
- VertexInputDescriptor -> VertexStateDescriptor
- VertexBufferDescriptor -> VertexBufferLayoutDescriptor
- VertexBufferDescriptor.stride -> .arrayStride
- VertexAttributeDescriptor.offset no longer optional

gpuweb PR: https://github.com/gpuweb/gpuweb/pull/469

Bug: dawn:22
Change-Id: I5431df4ba22cfbdb1bc81e6709e562cd736892a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13100
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-11-07 22:23:29 +00:00
Austin Eng 314fd3513d Update SetBindGroup dynamic offsets to uint32_t
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>
2019-11-01 15:51:01 +00:00
Jiawei Shao 5c2f5f3961 Implement serialization/deserialization of DawnDeviceProperties
This patch implements the serialization and deserialization of
DawnDeviceProperties in dawn_wire for the use of serializing this type
of object in Chromium.

BUG=chromium:996713
TEST=dawn_unittests

Change-Id: I1678627a017079540689d8529a1a7e1c975aae61
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12240
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-10-20 03:01:56 +00:00
Corentin Wallez d285525d4a Make the offset of SetIndexBuffer default to 0
BUG=dawn:22

Change-Id: Icc4f03c3f49b610ef5f620b4c26a6ae24ed6c774
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12040
Reviewed-by: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-10-10 17:21:48 +00:00
François Beaufort 91b2142ee4 Change setVertexBuffers to setVertexBuffer
Following WebGPU spec change at
https://github.com/gpuweb/gpuweb/pull/468, this CL changes all
occurrences of setVertexBuffers to setVertexBuffer.

Bug: dawn:22
Change-Id: I48b551a89dc0934dfa61e661e9546a2b7eafd2fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12020
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-10-10 07:29:58 +00:00
Corentin Wallez 70c8c10571 Make the dynamicOffsets optional in SetBindGroup.
BUG=dawn:22

Change-Id: I9d032d9be16a483046edc6055b86e61ae08118e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12023
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-10-09 16:08:42 +00:00
Corentin Wallez 5f53d5302f Fix RenderPassDescriptor to be extensible.
BUG=dawn:22

Change-Id: Ib9c2cd3259db0e07fa02134ce6d0d5d75a24546c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11901
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-10-08 07:34:43 +00:00
Jinho Bang 0b82671047 Rename PipelineStageDescriptor to ProgrammableStageDescriptor
This is to match the WebGPU's WebIDL[1].

[1] https://github.com/gpuweb/gpuweb/pull/359

Bug: dawn:22
Change-Id: Id0cf0a7a6605ea7ec474d0f0885685ed21875dce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11883
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-10-07 12:23:09 +00:00
François Beaufort 277d2e15d5 Add missing optional label member to descriptors
This CL adds missing optional label members to all descriptors. It is
not used yet but needed from the WebGPU side.

Bug: dawn:22
Change-Id: I103870f9207eed8168bc2245294888af4e1edd9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11720
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-10-03 14:56:49 +00:00
Austin Eng 867f72058a Add missing "strlen" parameter for Device InjectError command.
This CL adds a StringMessageMatcher to the wire unittests harness
to validate that messages are not degenerate.

Bug: chromium:1004368
Change-Id: I121a259e67938b06ccc5e9829abfa3e25fffc003
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11740
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-10-02 06:35:38 +00:00
Austin Eng e06f01be71 dawn_wire: Forward client-generated errors to the server
This fixes a problem where client-generated errors weren't properly
captured in error scopes.

Bug: chromium:1004368
Change-Id: Ic0f6e5bc5e281c676ea7154dd217cfc8dd51be5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11642
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-09-30 22:50:59 +00:00
François Beaufort 6ac5a9250d Add label to command buffer and compute pass descriptors
This CL adds an optional label to command buffer descriptor and compute
pass descriptor. It is not used yet but needed from the WebGPU side.

Bug: dawn:22
Change-Id: Id4247882a1e3cc63a007adf41c2539764f1be677
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11601
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
2019-09-25 13:56:48 +00:00
Natasha Lee cf0e9d93f1 Add StoreOp::Clear
When storeOp is clear, texture subresource is set as not initialized

Bug: dawn:145
Change-Id: I364d7239a7ebdb9d5a28a4af559f3212be7ef15a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11560
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-25 13:08:28 +00:00
François Beaufort c3b613296d Rename GPUBindGroupLayoutBinding dynamic to hasDynamicOffset
Following WebGPU change at  https://github.com/gpuweb/gpuweb/pull/427,
this CL renames GPUBindGroupLayoutBinding dynamic to hasDynamicOffset.

Bug: dawn:22
Change-Id: Ie1c2bf4b1f6764c83be7cfe04f4f1a1d2205f685
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/11500
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-09-24 11:08:17 +00:00
Corentin Wallez c81a717379 Remove indirection for colorStates
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>
2019-09-20 23:22:27 +00:00
Corentin Wallez a838c7d497 Remove indirection for colorAttachments
This is to match the work in progress webgpu.h header.

BUG=dawn:22

Change-Id: I1371cda1b7666de8eb8283fa7e5da935d17e1d52
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9381
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-20 22:59:47 +00:00
Corentin Wallez 86e74e0dc1 Implement BGLBinding::textureDimension
In WebGPU the BGLBinding needs to know the texture dimension for
compatibility reasons between the texture views passed and the
pipelines.

This adds the member and implements the restriction.

BUG=dawn:22

Change-Id: I95204de1cd621c936994739e840c76351fea9035
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10960
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-10 08:58:28 +00:00
Corentin Wallez dbe74bc4a2 Add TextureViewDescriptor.aspect.
This is to match the WebGPU IDL, but currently that member defaults and
must be set to "all".

BUG=dawn:22

Change-Id: I5f4d160163cb45e0ef043853518fe91b47b00d0f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10961
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-10 08:30:43 +00:00
Corentin Wallez b8ea84cbb8 Implement debug markers and groups for CommandEncoder
BUG=dawn:22

Change-Id: I1fc6ac3dec936268a043753169ed1d4a405881bd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10962
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-09-10 08:20:40 +00:00
Corentin Wallez a900ccebcf Remove indirection for computeStage
This is to match the work in progress webgpu.h header.

BUG=dawn:22

Change-Id: I0904297bb4411b12f9d99e8457d32613058ef9b2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9380
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-09-05 09:41:17 +00:00
Corentin Wallez c6c7a42e6e Remove indirection for vertexStage
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>
2019-09-05 09:35:07 +00:00
Corentin Wallez d55bd7ad94 Make TextureFormat/ViewDimension::None Undefined and value 0.
This matches the conclusion the changes in the webgpu-header pull
request where we discussed these values:
https://github.com/webgpu-native/webgpu-headers/pull/5

BUG=dawn:22
Bug=dawn:214

Change-Id: I7e9168c2b5e09dcb4c1882725a5cc0580a73d853
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10860
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-09-05 09:12:32 +00:00
Austin Eng 45238d775a Add empty implementations of Push/PopErrorScope
This adds Push/PopErrorScope to the API with empty implementations which
just call the error callback. Also adds unittests that the wire callbacks
return as expected.

Bug: dawn:153
Change-Id: I63826360e39fbac4c9855d3d55a05b5ca26db450
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10543
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-09-04 22:54:03 +00:00
François Beaufort 13c472e196 Make vertex input descriptor optional
Following WebGPU spec change at https://github.com/gpuweb/gpuweb/issues/378,
vertexInput descriptor from GPURenderPipelineDescriptor should not be
required anymore.

BUG=dawn:22

Change-Id: I5d2500a758f44b7a7db2d2c23b359f1012221227
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10640
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-08-29 15:56:31 +00:00
Kai Ninomiya f0b17d00b9 Use TextureFormat::None for RenderBundleEncoder and AttachmentState
Bug: dawn:214
Change-Id: Ia9432582b0a5627c00d46ebcfa63ebf1ba246651
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10520
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-08-27 22:19:16 +00:00
Austin Eng 45ea7e66bf Rename SetErrorCallback to SetUncapturedErrorCallback
This is to better match the naming of the uncapturederror event
in WebGPU.

Bug: dawn:153
Change-Id: Ic2bc1f46bf3d1f0d14cbd5cb8ea6e54d1679f987
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10542
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-08-27 21:43:56 +00:00
Austin Eng cb0cb658d4 Rename DeviceErrorCallback to ErrorCallback and add ErrorType arg
This same callback will be used for push/pop error scope.

Bug: dawn:153
Change-Id: I2771539e13f8a4e6a59f13c8082689d25ba44905
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10460
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-08-27 21:41:56 +00:00
Austin Eng 5603dc9044 Rename ContextLost to DeviceLost
DeviceLost is a better name because we don't have a "context" as in
OpenGL.

Bug: dawn:153
Change-Id: Idf7fcb731a0e138f46a81fb31f0d11ff58b4fa96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10541
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-08-27 18:10:03 +00:00
Kai Ninomiya 4078ed8b62 Remove Texture::createDefaultView
https://github.com/gpuweb/gpuweb/pull/389

Bug: dawn:214
Change-Id: I86b8c46c71c3e5b9622ab3656124b312d3e85a7a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10420
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-08-27 17:56:23 +00:00
Corentin Wallez b9b088f57e Rename ShaderStageBit to ShaderStage.
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>
2019-08-27 08:42:29 +00:00
Corentin Wallez 9e9e29f7a6 Remove Bit from TextureUsageBit and BufferUsageBit
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>
2019-08-27 08:21:39 +00:00
Kai Ninomiya 93196db8ef Implement new defaults for Texture::CreateView
https://github.com/gpuweb/gpuweb/pull/389 except for removing createDefaultView
https://github.com/gpuweb/gpuweb/pull/407

This will need to slightly change again when
https://github.com/gpuweb/gpuweb/pull/424 lands.

Bug: dawn:214
Change-Id: Id904b55cea6d77fcf7d971bd743468c7d82a9aa8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10440
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2019-08-26 22:51:19 +00:00
Corentin Wallez f463a20291 Add BGLBinding::textureComponentType
This is a new compatibility constraint that the texture component type
must match between what's declared in the shader and the bind group.

 - Format is updated to include the component type of the format.
 - Validation and state tracking is updated to reflect the new
BGLBinding member.
 - TextureFormat tests are updated to pass with the added validation and
to remove a redundant enum definition.
 - BGLBinding::multisampled validation is added because it was next to
modified code for the BGLBinding::textureComponentType validation.
 - A redundant BGL caching test was removed.

BUG=dawn:128

Change-Id: I9c4ae92062769c3ecf74caf46f27415344dfad77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10281
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-08-21 12:16:33 +00:00
Corentin Wallez 87ded961ee Remove 16 bit normalized texture formats
They were removed from the WebGPU spec because they cannot be supported
everywhere, for example on recent Qualcomm chips.

BUG=dawn:128

Change-Id: I189bd1b34105f215699ddd404341bbee964c8679
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/10280
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2019-08-20 20:58:01 +00:00
Austin Eng 8a488c1574 Implement RenderBundle in the frontend
This CL implements RenderBundle and RenderBundleEncoder in the frontend
and adds unittests for validation.

Bug: dawn:154
Change-Id: Ice5ecd384cd627ad270b73052408f8139d1ea5f4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9221
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-08-13 22:12:54 +00:00
François Beaufort ae7e0026a5 Make fragment stage optional in RenderPipeline
This CL makes fragment stage optional but still raises a validation
error if set to null in a RenderPipeline.

Bug: dawn:136
Change-Id: Ie900d2e768d251db1e0c4a90738f80b2de15dc2f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9641
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
2019-08-02 07:46:57 +00:00
Corentin Wallez 47b107003d dawn.json: Removed unused "face" bitmask
It was replaced by "cull mode" but we forgot to remove it.

BUG=dawn:22

Change-Id: I2195ed64d1df05b01baf37d477a2a7cc6cf1156c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9200
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-07-19 21:28:38 +00:00
François Beaufort 4af9808400 Make rasterization state descriptor optional
Following WebGPU spec change at https://github.com/gpuweb/gpuweb/issues/347,
the rasterizationState from GPURenderPipelineDescriptor should not be
required anymore.

BUG=dawn:22
Change-Id: Ic458396665a7e2fbd942aa7f50138cc96497ff33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
2019-07-16 17:01:59 +00:00
Corentin Wallez f07e85c604 Add missing WebGPU enums and defaulted members.
These additions to dawn.json don't require changes to users of the C++
API so they are done now to prepare for webgpu.h. Validation is added
that forbids using the new enum values and non-default values for
members until they are implemented.

BUG=dawn:22

Change-Id: Ie6f3384243d6874e7aca4b94733409755a066c93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8862
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2019-07-15 20:47:56 +00:00
Corentin Wallez 2a1d8c2b1d Remove ShaderStage that doesn't exist in WebGPU.
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>
2019-07-12 17:52:22 +00:00
Corentin Wallez 4b90c47ce0 Add missing descriptors that are present in WebGPU.
These are the CommandEncoder, ComputePass and CommandBuffer descriptors
that contains nothing but a debug name for now but are important for
later extensibility. Defaults are added so the C++ API doesn't require
the descriptors to be passed as arguments.

Also renames variables named "info" for RenderPassDescriptor to
"descriptor" as is now the standard in the codebase.

BUG=dawn:22

Change-Id: I9de4cfbbce952d01fb79ed1d9f34825a6fa174f9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8686
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2019-07-10 20:43:13 +00:00
Yan, Shaobo f697fe3b7d Add dynamic attribute in bind group layout binding
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>
2019-07-09 07:58:57 +00:00
Corentin Wallez 8f93871dff Add default values to dawn.json for dawncpp.h
This adds almost all default values in descriptors that are present in
WebGPU to the C++ interface for Dawn.

This also fixes the indentation of dawncpp.h both by reindenting the
template, and making the indentation counting in generator_lib.py more
precise.

BUG=dawn:22

Change-Id: I9a852d26f78a3349f3d6eee7237407d1cf8ca426
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8680
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2019-07-08 19:20:22 +00:00
Corentin Wallez 6be313225e Invert component names in RG11B10 and RGB10A2
The CL that introduced this formats reordered their components based on
the name of the Vulkan formats, but it turns out that WebGPU lists
components from low bits to high-bits while Vulkan PACK32 formats are
listed from high to low. So the format component orders match, except
for RGB10A2 which is actually BGR10A2 in Vulkan. Instead the Vulkan
backend is updated to correctly use the RGB10A2 format.

BUG=dawn:128

Change-Id: If7f045f020429c44c84b9aed34a4a80107208d5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8601
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2019-07-08 10:12:16 +00:00
Corentin Wallez ec05355c72 Rename Transfer[Src|Dst] to Copy[Src|Dst]
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>
2019-07-08 10:05:46 +00:00
Corentin Wallez 3c3e2bc4d9 Use mipLevel/arrayLayer for TextureCopyView
These are the names for the level/slice concept in WebGPU and this one
occurence was forgotten in the previous rename.

BUG=dawn:22

Change-Id: I0aef05e21b2291cf02712034c6ddc3ab62ecbc33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8681
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2019-07-08 09:41:51 +00:00
Corentin Wallez a0491c9141 Rename AddressMode::MirroredRepeat to MirrorRepeat.
This is to match the name in the WeBGPU IDL.

BUG=dawn:22

Change-Id: I0a4a7b62afa30cfd699d90efb2dd0c085778883b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8624
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Yunchao He <yunchao.he@intel.com>
2019-07-08 09:36:31 +00:00
Corentin Wallez 7843076b01 Implement WebGPU formats on Metal.
This removes the R5G6B5 format that's only available on iOS on Metal and
leaves A2RGB10 unimplemented because it has inverted R and G channels
compared to Metal's RGB10A2 format.

BUG=dawn:128

Change-Id: I9b960d00f281b4d32318bad3360826b8db5bcb72
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8600
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-07-08 09:28:51 +00:00
Corentin Wallez 5df84cea03 Make TextureAspect match WebGPU
It was changed from a bitmask to an enum. It isn't used in Dawn yet.

BUG=dawn:22

Change-Id: I13b39e0ea137fd24470cf23bb4bd94dfcaf66d19
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8626
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-07-08 08:55:21 +00:00
Corentin Wallez e409acf561 Rename SamplerDescriptor::compareFunction to compare.
This is to match the WebGPU IDL.

BUG=dawn:22

Change-Id: I63e32fe980c1727562055221ea2769a670461e93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8625
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-07-08 08:29:57 +00:00