Commit Graph

76 Commits

Author SHA1 Message Date
Corentin Wallez 21bd02becf Remove deprecated WGSL "-> void"
Bug: dawn:755
Change-Id: I10f2fb3afd26560df10b21d149a65b625bdb2b4b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47600
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-04-13 09:48:24 +00:00
Corentin Wallez 7aec4ae7c5 Remove utility to create shader modules from GLSL
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>
2021-03-24 15:55:32 +00:00
shrekshao b00de7f8e8 API evolution GPUExtent3D.depth -> depthOrArrayLayers (Step 2)
Still leave deprecated `depth` functional as there are some references in
other clients. Using `depth` and `depthOrArrayLayers` at the same time is
invalid. Add DeprecatedAPITests.

Bug: chromium:1176969
Change-Id: Ia06645e4f3c17588323dd36b11f9f3988b2e3aba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44640
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-22 21:12:36 +00:00
Corentin Wallez 9895c273d6 Update samples to the new RenderPipelineDescriptor
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>
2021-03-18 16:46:58 +00:00
Corentin Wallez 80915849ce Rename Buffer/TextureCopyView to ImageCopyBuffer/Texture.
This is to follow the renames in the upstream WebGPU specification.
Typedef are left in places to make a smooth deprecation period.

Bug: dawn:22

Change-Id: I5134b897930c1fa883c49dd80d2665d6684ec022
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43882
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-03-04 18:13:45 +00:00
James Price 7e80cce1a9 Remove explicit storage class from samplers/textures
Tint automatically infers a storage class of `handle` for these types
of variable, as per the WGSL spec. Explicitly specifying a storage
class for them will soon become an error.

Bug: tint:332
Change-Id: Ib67e44a5afcdd364470488fd4b456a2b42304daa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41402
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-02-10 20:17:14 +00:00
Corentin Wallez fb2e77106a Remove utils::GetDefaultSamplerDescriptor
This helper is no longer needed now that the descriptor has full
defaults and is even optional in CreateSampler.

Bug: dawn:599
Change-Id: I0d25233ebb1e817ad27f3ddaca988e01e2a5298c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40520
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-02-05 20:26:54 +00:00
Corentin Wallez 6d315daa5d Device: Deprecated GetDefaultQueue in favor of ::GetQueue()
Bug: dawn:22

Change-Id: I103ea933ca5b93f20d8bf11c6671bd9f603d8ff3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40061
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-02-04 15:33:42 +00:00
dan sinclair 0f9c2d7b78 Update Dawn tests to use group instead of set.
This Cl updates the WGSL used by Dawn to use the new `group` decoration
instead of the deprecated `set` decoration.

Change-Id: I145aaff7721dfafff986ddc429c9cdc9389c2110
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38141
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-01-19 14:18:51 +00:00
Ben Clayton cd9dc36d2e [wgsl]: s/texture_sampled_/texture_
These texture types were renamed in October 2020:
https://github.com/gpuweb/gpuweb/pull/1180

Tint has supported both forms since November 2020:
https://dawn-review.googlesource.com/c/tint/+/31380

Finally migrate to the new form so we can drop support for the old.

Bug: tint:286
Change-Id: Id19b79be28152b3de163f9cce75eefff1ae31d76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37702
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2021-01-13 20:29:08 +00:00
Corentin Wallez 4814bdbdea Port most of the samples to WGSL
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>
2020-11-26 16:39:46 +00:00
Corentin Wallez 5fad85bbd9 Remove deprecated SetIndexBuffer (without format).
This also simplifies a bunch of code in backends that was used to handle
getting the indexFormat from the pipeline "late".

Bug: dawn:502

Change-Id: Ibae50c8df21323fd391515f6036552e9fb868d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32023
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-25 08:54:14 +00:00
Kai Ninomiya 16036cf206 Add WGPU_STRIDE_UNDEFINED and update bytesPerRow/rowsPerImage validation
This makes a nearly one-to-one mapping between the JS and C APIs, which
benefits projects like Blink and Emscripten.

- JavaScript's `undefined` is equivalent to C `WGPU_STRIDE_UNDEFINED`.
- JavaScript's `0` is equivalent to C `0`.
- To implement the API correctly, Blink must special-case an actual
  value coming in from JS that is equal to WGPU_STRIDE_UNDEFINED
  (0xFFFF'FFFF), and inject an error.

Keeps but deprecates a reasonable approximation of the old behavior.

Bug: dawn:520
Change-Id: Ie9c992ffab82830090d0dfc3120731e89cd9691c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31140
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-06 13:41:50 +00:00
Corentin Wallez 6b087819dd s/OutputAttachment/RenderAttachment/g
But also keep OutputAttachment so it can be gradually changed in all
dependants.

See https://github.com/gpuweb/gpuweb/pull/1168 and
https://github.com/gpuweb/gpuweb/pull/1168

Bug: dawn:22
Change-Id: I6a1ec1de6c22ca4deac88b7fffde4b98d9d54a84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31040
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-10-27 15:35:56 +00:00
Brandon Jones 8575cb3ec7 Add setIndexBufferWithFormat method
First step of a multi-part change to bring the setIndexBuffer
method up-to-date with the current WebGPU spec. This change
preserves the previous setIndexBuffer semantics for backwards
compatibility until developers have been notified and given
a grace period to transition to the new signature.

BUG=dawn:502
Change-Id: Ia8c665639494d244f52296ceadaedb320fa6c985
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27182
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-08-27 01:13:35 +00:00
Kai Ninomiya 2afea0c671 Autoformat all tests and examples
Bug: none
Change-Id: I69904944db1d4c2fbcca74bb8b66b5a7524e76bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24642
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2020-07-10 20:33:08 +00:00
Corentin Wallez 984493d0ac Deprecate TextureCopyView::arrayLayer -> origin.z
All existing tests and samples are updated and deprecation tests added.

CommandEncoder still encodes using arrayLayers so the backends are
unchanged. They will be handled in a follow-up CL.

Bug: dawn:22

Change-Id: Ib5346b46eb04d97349cab8f32ef8da5034726ca8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23104
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-06-16 03:05:17 +00:00
Corentin Wallez 4234d78201 Deprecate TextureDescriptor::arrayLayerCount -> size.depth
This updates CL:

 - Adds a deprecation warning to use size.depth instead of
arrayLayerCount.
 - Changes all tests and samples to use size.depth.
 - Adds deprecation tests for the change.

In particular the state tracking in TextureBase isn't changed yet
because it requires non-trivial changes in the backends. It will be done
in a follow-up CL.

Bug:dawn:22

Change-Id: Ic02dfb5baaba8d5b06cd339ce988e9b1d16cb5e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23101
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-06-15 09:46:01 +00:00
Corentin Wallez f5657af110 Fix use of bytesPerRows=0 in CppHelloTriangle
The defaulting when bytesPerRow is 0 has been removed so there was a
validation error.

Bug: dawn:432
Bug: dawn:455
Change-Id: I8e38eb7aeb315d93cc8a9528beb77b9285b368d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22800
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-06-08 16:13:41 +00:00
Corentin Wallez 8a437947a8 Introduce Device::GetDefaultQueue and deprecate CreateQueue
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>
2020-04-17 16:45:17 +00:00
Corentin Wallez 67b1ad7a97 Add the defaults for Draw and DrawIndexed
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>
2020-03-31 16:21:35 +00:00
Corentin Wallez 604072bc2e Make the SwapChain interface match webgpu.h
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>
2019-11-12 18:30:11 +00:00
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
Corentin Wallez 04863c42be Make examples and utils use webgpu.h
BUG=dawn:22

Change-Id: I602d6a3422b493d199f3fded61ff1666bc2d9d7d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/12702
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-10-25 11:36:47 +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 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 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
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
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 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 77fa31c5c6 Make Texture format names match WebGPU
BUG=dawn:128

Change-Id: I73cc77082d02941d91fab8ee578e529db979fed1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8164
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2019-06-19 09:26:07 +00:00
Yunchao He 2d4b529443 Update VertexInput (InputState) to match the spec - Part 3
Rename num{Attribute|Buffer}s to {Attribute|Buffer}Count for VertexInput

BUG=dawn:80, dawn:107

Change-Id: I7ad62f28449e6283d5c5788dfbd5df1d1e9c813e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7861
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-06-06 17:54:30 +00:00
Yunchao He 97c0885a4a Update VertexInput (InputState) to match the spec - Part 2
This patch changed the front end code and tests and examples.

BUG=dawn:80, dawn:107

Change-Id: Ia6c60232c04a1bfb862263766eb28e9afc3bc8db
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7620
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-06-06 01:56:57 +00:00
Yunchao He eea2091068 Update VertexInput (InputState) to match spec - Part 1
This is only a renaming: change VertexInput to VertexBuffer, and
change InputState to VertexInput.

The next two patches will do as follows:
1) change the structure of vertex input descriptor related stuff.
2) change num to count.

BUG=dawn:80, dawn:107

Change-Id: Ie76aa653a527759a9c3b4a4792e3254689f053b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2019-05-22 22:46:32 +00:00
Austin Eng b4b3ea05eb Reland "Rename texture.createTextureView to createView to match WebGPU"
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>
2019-04-09 16:57:00 +00:00
Yuly Novikov 2d4c66d2b8 Revert "Rename texture.createTextureView to createView to match WebGPU"
This reverts commit 6f0b021dbf.

Reason for revert: breaks compilation on https://ci.chromium.org/p/chromium/builders/ci/GPU%20FYI%20Linux%20Builder%20%28dbg%29/62003

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>

TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org

Change-Id: I2d337881fc05cf8128ae7ab268514ea7ef462123
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: chromium:877147
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Yuly Novikov <ynovikov@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yuly Novikov <ynovikov@google.com>
2019-04-09 15:28:01 +00:00
Austin Eng 6f0b021dbf 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>
2019-04-09 15:13:10 +00:00
Austin Eng cf52d711fb Change buffer-related sizes/offsets to be uint64_t
Bug: dawn:121
Change-Id: I9d88e2b2b8eff4eda98d25ae0922bc07199a69c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5720
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-04-05 20:51:29 +00:00
Yunchao He 1ba2cb8589 Construct ComboInputStateDescriptor to simplify tests and examples
Bug=dawn:107

Change-Id: I900de454cacf9f62ae97213161a98ce6d4254eab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6020
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-03-28 05:09:01 +00:00
Yunchao He 889d743baa Input State Descriptorization
This change also removes InputState object.

BUG=dawn:107

Change-Id: Ia3fd2d348658f5719de0279bfe7bb10a4f183523
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5660
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-03-27 18:08:50 +00:00
Yan, Shaobo e105f962cf Match vertex format in dawn with webgpu
BUG=dawn:41

Change-Id: If16e615ccf6b9c7e85d41adcdb6d66baa07179da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5280
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-03-21 11:18:31 +00:00
Yan, Shaobo 991ab98f11 Make dawn idl support dynamic buffer offset
This patch simply added dynamic buffer offset in dawn idl and
modify the shape of SetBindGroup.

BUG=dawn:55

Change-Id: I516e08f3ee558ba375a87d98eaea6d60e93d4514
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/5600
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-03-18 06:01:37 +00:00
Jiawei Shao b2c5023c9c Remove RenderPassDescriptorBuilder
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>
2019-02-27 09:21:56 +00:00
Jiawei Shao 2030166137 Rename several parameters to match WebGPU IDL
This patch renames the following parameters to match the latest WebGPU
IDL:
- BindGroupDescriptor.numBindings -> bindingCount
- BindGroupLayoutDescriptor.numBindings -> bindingCount
- BindGroupDescriptor.numBindings -> bindingCount
- queue.submit(numCommands, ..) -> commandCount
- RenderPipelineDescriptor.numColorStates -> colorStateCount
- TextureDescriptor:
  arraySize -> arrayLayerCount
  levelCount -> mipLevelCount
- TextureViewDescriptor:
  levelCount -> mipLevelCount
  layerCount -> arrayLayerCount

BUG=dawn:80

Change-Id: I615842dd5754d1ae1ddff31e25403bb3161f0201
Reviewed-on: https://dawn-review.googlesource.com/c/4881
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-02-21 00:45:19 +00:00
Yunchao He 938811eef9 Use const*const* to annotate color state descriptors
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>
2019-02-20 13:00:36 +00:00
Corentin Wallez e1f0d4e639 WebGPU error handling 2: CommandEncoder for samples and end2end tests
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>
2019-02-15 12:54:08 +00:00