Commit Graph

68 Commits

Author SHA1 Message Date
Austin Eng 91851e23a8 Remove several compile-time constants in favor of limits
Bug: dawn:685
Change-Id: Ifac25116c741fdab7b6a8093b4230065beca4773
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65483
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-10-13 18:57:18 +00:00
Ben Clayton bf832f07d6 Remove all use of deprecated tint APIs and WGSL syntax
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>
2021-06-30 11:33:04 +00:00
Corentin Wallez 73b7cd624f Add missing WebGPU limits to Constants.h
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>
2021-06-29 08:12:00 +00:00
Austin Eng 700a5fb869 Add scoped autoreleasepool to tests and examples
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>
2021-06-24 19:21:31 +00:00
Brandon Jones 41c87d973a Removed deprecated CreateRenderPipeline path
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>
2021-05-21 05:01:38 +00:00
James Price 9e0debd91e Update examples for recent WGSL changes
* 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>
2021-04-13 14:52:44 +00:00
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
Corentin Wallez 266bce86b4 Port Animometer's vertex shader to WGSL
Bug: dawn:572
Change-Id: I21093b5bd09cb319cdf92616cd95e64935fcd1ed
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33822
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-23 17:26:20 +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 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
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 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
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 47a3341e07 Deprecate Buffer::SetSubData in favor of Queue::WriteBuffer
Bug: dawn:22
Change-Id: I00b3cd65ac4eb494b05918251f4b3b2bcaf24f71
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22200
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-06-02 09:24:39 +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
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
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 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
Austin Eng 38ee172a22 Fix dynamic bind group size in Animometer example
Change-Id: I2a916059d1f5fe83d2d4d8db60d4b74e553e2889
Bug: dawn:55
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9720
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-08-05 18:30:11 +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
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 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 67ab1ea8c7 dawn.json: Use void* instead of uint8_t* for data pointers
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>
2019-06-06 16:19:15 +00:00
Corentin Wallez 8dfc593eb7 Remove the concept of push constants
BUG=dawn:14

Change-Id: I20587081ec806034ce4f90457c3d475a6fbe834d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/7180
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2019-05-29 13:16:06 +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
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
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
Yunchao He 108bcbd5c9 Split AttachmentStateDescriptor, in order to match web idl
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>
2019-02-15 02:20:57 +00:00
Yunchao He c0f31e73e4 Use const*const* to annotate a sequence of descriptors
BUG=dawn:77

Change-Id: I2a523e54a06173c157730e043c25e9629887fd1f
Reviewed-on: https://dawn-review.googlesource.com/c/3820
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2019-01-21 08:29:01 +00:00
Yan, Shaobo 300eec0f82 Rename SetRenderPipeline and SetComputePipeline to SetPipeline
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>
2018-12-21 10:40:26 +00:00
Yan, Shaobo a49242766a Render Pipeline Descriptorization -- Part I
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>
2018-12-10 19:47:22 +00:00
Jiawei Shao c789b84d8d Rename draw commands to match WebGPU IDL
BUG=dawn:51

Change-Id: I2a78f4e77c54aeae48d3fb78bf4701352ff40529
Reviewed-on: https://dawn-review.googlesource.com/c/3040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2018-12-10 05:20:19 +00:00
Corentin Wallez 82fbccbd78 Introduce [Render|Compute]PassEncoder.
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>
2018-09-21 00:24:37 +00:00
Corentin Wallez 39039fa317 Rename CreateCppNXTDevice to CreateCppDawnDevice 2018-07-18 22:54:06 +02:00
Corentin Wallez f684040e0a Rename NXTHelpers to DawnHelpers 2018-07-18 22:54:06 +02:00
Corentin Wallez 4828d92df3 Rename nxt:: to dawn:: in examples 2018-07-18 22:54:06 +02:00
Corentin Wallez 4a9ef4ee21 Rename the copyright authors from NXT to Dawn 2018-07-18 22:54:06 +02:00
Corentin Wallez d8c068fb4f Remove explicit usage transition from the API and validation
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.
2018-07-16 14:44:20 +02:00
Corentin Wallez b703def640 Add Device::CreateQueue() instead of the builder
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.
2018-06-18 13:33:40 -04:00
Corentin Wallez 8d6b5d2337 Rename RenderPassInfo to RenderPassDescriptor 2018-05-16 11:18:14 -04:00