This reverts commit 0126761de8.
Reason for revert:
Causing Dawn->Chromium roll to fail
BUG=dawn:1346
Original change's description:
> Enable Queue, Device labels to be set.
>
> Queue labels can be set by the defaultQueue.label member of the device
> descriptor or the setQueue method.
>
> Device labels can be set label member of the device
> descriptor or the setQueue method.
>
> D3D12 and VK backend label support included.
>
> Change-Id: Id12dd6e1fc8f1519c55e4efb35e1ead67c085e46
> Bug: dawn:1323
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85540
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Brandon Jones <bajones@chromium.org>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:1323
Change-Id: I62e4b508d2c55fd89f2f4c5cbe5d04d22681aeef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85700
Reviewed-by: Brandon Jones <bajones@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Queue labels can be set by the defaultQueue.label member of the device
descriptor or the setQueue method.
Device labels can be set label member of the device
descriptor or the setQueue method.
D3D12 and VK backend label support included.
Change-Id: Id12dd6e1fc8f1519c55e4efb35e1ead67c085e46
Bug: dawn:1323
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/85540
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
It is valid for depth/stencil attachment if the attachments are
readonly. It is not valid for color attachments. Make the enum valid,
and update validation.
Caught in CTS roll
https://chromium-review.googlesource.com/c/chromium/src/+/3499286
Bug: dawn:1269
Change-Id: Ib849ed757ccca145f85cadea6f92a1f2a5082d49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/82540
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Need to mark them as deprecated to remove from webgpu headers.
Bug: dawn:1269
Change-Id: I332e7e4f6a27efd05f4e97240044efb65644cc77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/82940
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
The timestampWrites in render/compute pass descriptor store the
timestamps at the beginning and end of passes, this requires validating
all timestampWrite members in BeginXxxPass and inserting the
timestampWrite cmd as close as possible to the BeginXxxPass and
EndXxxPass. To do that, we first record only the querySets and
queryIndexes that need to be used in BeginXxxPassCmd and EndXxxPassCmd,
then insert timestampWrite cmd after the native BeginXxxPass and before
the native EndXxxPass in backends.
This CL adds timestampWrites in render/compute pass descriptor
including the validation and tests first.
Implement timestampWrites in backends in following CL.
Bug: dawn:1250
Change-Id: I39b50975aa03cc1afe7a736c3b39df284f54d163
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/82100
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Renames multiple attachment clear values to match their new names in the
spec, deprecating the old ones.
- GPURenderPassColorAttachment.clearColor -> clearValue
- GPURenderPassDepthStencilAttachment.clearDepth -> depthClearValue
- GPURenderPassDepthStencilAttachment.clearStencil -> stencilClearValue
Additionally, the old names are marked as deprecated with appropriate
warnings if they are used during the deprecation period.
Bug: dawn:1269
Change-Id: I6649184d65578118942c1f51a41f350719665272
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/80941
Reviewed-by: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
- Fix power preference undefined value
- Remove 'upstream' tagged content from emscripten-bits generation
explicitly tag 'emscripten' to things still needed
Bug: None
Change-Id: If575823ff1d99237d7c2cb0e784c24a7299b4a31
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79220
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
In https://github.com/gpuweb/gpuweb/pull/2387 the spec was updated to
require that when depthReadOnly or stencilReadOnly is set the associated
load and store ops must be omitted. This change deprecates setting them
to `Load` and `Store` respectively, while adding an `Undefined` value
which the enums default to.
Bug: dawn:1281
Change-Id: I36474ba67bfb080da8c713d5bb88b8522e4630f3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/78980
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
So that Chrome can configure Dawn to load SwiftShader from
the bundled/module directory. The shared libraries and ICD
are packaged in a separate directory while dawn::native is
linked statically into the Chrome executable.
Change the Vulkan backend to use these paths for loading
Vulkan.
Bug: chromium:1266550
Change-Id: I40468b481881f6c249694c1c61137bc0c9b8fe76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/78840
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
As part of the tint -> dawn merge.
Bug: dawn:1275
Change-Id: Ice0c9d2f03f6d7e96471cf8398aecd16273c833f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/78400
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Slightly silly, since it has no effect on API use, but it is nice to
keep the arg names in sync with the spec.
Bug: dawn:1270
Change-Id: I1f8cfabefb3a721691c092815cbb66c959980b5e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/78245
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Changes dawn.json entry for ExternalTexture to take a secondary plane
and adds wgpu::PredefinedColorSpace. Includes validation tests.
Bug: dawn:1082
Change-Id: I76475e4a1bce6f25c728ac0251ff582ef6369cd1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/76282
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon1 Jones <brandon1.jones@intel.com>
This descriptor, when chained on WGPUCommandEncoderDescriptor makes
internal usages visible to validation.
This CL is to help implement WebGPU Swiftshader support in Chrome.
Bug: chromium:1266550
Change-Id: I7253fe45003e9ad5ac4d8ddd2d4782989e9b5c27
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/76440
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL implements RequestDevice and also has changes for
Dawn to internally use wgpu::FeatureName enums, instead of
strings. Some of the string handling is kept for now to
support the deprecated creation path. GetFeatureInfo is added
to the instance to get a name and description of the feature,
for reporting in about://gpu.
Dawn device toggles are now passed in an extension struct off
of the device descriptor. This is only supported in dawn_native,
and not dawn_wire, for now, since dawn_wire doesn't have a way
to serialize lists of null-terminated const char*.
To enable the client to check whether the toggle descriptor is
supported, a `dawn-native` feature is added which is supported
all the time with dawn_native, but not supported with dawn_wire.
Feature `dawn-native` also enables a synchronous version of
CreateDevice for convenience.
Bug: dawn:160
Change-Id: Ifc195e7ea808c6c319021528ef4b36bd65583bff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72020
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
CopyTextureForBrowserOptions deprecated AlphaOp after supporting
color space conversion. AlphaMode for src and dst is the replacement.
Bug: dawn:1140
Change-Id: Id507bd7525d74be8a12d212b92cc22f0c7bc94b7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/73141
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Make ValidationUtils flexible for other generation.
BUG=dawn:1201
Change-Id: I42ccbd3d9c2fe37abec4b8f7eb395583dbe1dc8d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72980
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
Struct member defined in dawn.json could have a 'length' attribute
defines the length of the member if it is an array.
In previous, the 'length' could only be 'strlen' or other variable
which has 'uint32_t' types. It cannot support constant length.
CopyTextureForBrowserOptions transfers conversion parameters and
conversion matrix with a constant length. This CL adds this ability
to meet such requirements.
Bug: dawn:1140
Change-Id: I6eeabbc55cc3853fe15e33bdd44060b16f6096bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72580
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
This is so we can implement the adapter/device APIs fully
on dawn_wire.
Bug: dawn:689
Change-Id: I47f68157d081f359f871e0efe0d974dfe53de7d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71521
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Adds upstream instance/adapter APIs. In dawn_native, the basic APIs
to get limits and properties are implemented, but requestAdapter and
requestDevice are not. In dawn_wire, nothing is implemented, but the
stub definitions are put in place, as well the mechanism to inject
WGPUInstance into the wire.
There is a lifetime concern with WGPUInstance and WGPUAdapter on the
wire in that we need to ensure that the client cannot free the
instance or adapter while they are in use. In the near term, this is
not a problem because Chromium will always hold ownership of the
instance and adapters outside of the wire - i.e. it won't inject and
then release ownership.
Bug: dawn:160, dawn:689
Change-Id: Id904272983f23babc9177bc163d78c4fa1044da0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71520
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL add color space conversion bases for CopyTextureForBrowser.
Theoretically, it could support any color space conversion. But
test cases only cover (Srgb, DisplayP3) to (Srgb).
It could be expanded to more color spaces conversions.
Bug: dawn:1140
Change-Id: I332e6d1f7cf2424fd5f5af83c71fa45c98d2d8ac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70780
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
These argument names were probably renamed as part of a mass rename of
the "callback" category to "function pointer". The name "callback" more
clearly represents what the argument is used for, so revert back to it.
Bug: None
Change-Id: Id7539667f5daa87aec32ce8c90c20275d2fe80fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72485
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Remove wgpu::ErrorFilter::None from Dawn as it is removed from the
specification.
Bug: dawn:1206
Change-Id: If8ec2722cf1b2bad380011f191f296f0e591646d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71607
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Rename webgpu_cpp.h to api_cpp.h and webgpu_cpp_print.h to api_cpp_print.h.
BUG=dawn:1201
Change-Id: Icceee0fd70fb6497a9e2b0891b5c5843787593f9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71720
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
Add a metadata to configure the prefix of proc table and Make proc table
flexiable with the prefix and declared functions.
BUG=dawn:1201
Change-Id: Id28e5521506fa5dc8efca90a7883fbd3dd548e8d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71526
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Rename "callback" to "function pointer" category.
The function does not belongs to any class that has below two keys:
- `"returns"` a string that's the name of the return type
- `"args"` a **record**, so an array of **record members**
BUG=dawn:1201
Change-Id: I546301a19af9472501122e759c495fd761e27ed5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71060
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
This patch adds the missing "strlen" as the "length" of the member
"name" and "driver description" in "adapter properties" so that
the generator can generate correct commands to transfer these two
strings.
BUG=dawn:160
Change-Id: I4ea385bcb3a2363a62ba48e10e85addaa7020f10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
The "constant" category has two keys:
- `"type"`: a string, the name of the base data type
- `"value"`: a string, the value is defined with preprocessor macro
Remove deprecated constant InputStepMode.
BUG=dawn:1201, dawn:1023
Change-Id: If4308bd5b25dddd9453514ce362bebe4fd771a57
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70704
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
The depth240unorm-stencil8 and depth32float-stencil8 are optional
features. Enable them and add validation tests for texture creation
and texture view creation.
They are unimplmented on backends, skip their end2end tests.
TODO: add validtion for copy commands.
BUG=dawn:690
Change-Id: I980631d2f3fa6397a6125221a76980a15c8cb2f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/68220
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This Dawn-internal struct is used to send Adapter information from
the GPU to Renderer process. We need adapterType to determine the
isFallbackAdapter property of GPUAdapter in Chromium.
Bug: chromium:1266550
Change-Id: Ia0457119f45a165e7bdb5b85c43c120391c7001b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70580
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
- Adds "_memtadata" that contains various metadata, the key
"api" represents the target of generating Web Standard API.
Rename webgpu.h to api.h and replace relative content with
metadata.
BUG=dawn:1201
Change-Id: I8b422ce4bd3f33d95e78d6c4b80f1310f7ac6726
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70220
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Junwei Fu <junwei.fu@intel.com>
Adds label tracking for:
- CommandBuffer
- CommandEncoder
- ComputePassEncoder
- RenderBundleEncoder
- RenderPassEncoder
It's not clear to me if these structures have labelable equivalents in
D3D12 or Vulkan, so no changes were made to the individual backends.
Bug: dawn:840
Change-Id: Ib1786ab45466a3d13fbd4c772f8e8af4cc1786af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70400
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Adds label tracking for:
- BindGroup
- BindGroupLayout
- PipelineLayout
- TextureView
- ExternalTexture
- Sampler
- QuerySet
Labels are passed to Vulkan and D3D12 where applicable, though many of
the related structures don't appear to be labelable objects in D3D12.
Bug: dawn:840
Change-Id: Ic7073dc9c02c9fb05bb46f2f8a84e575d5ba5c16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70180
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This adds overloads for WireCmd [De]serialization that don't take the
object id provider/resolvers and produce a fatal error as soon as an
object is encountered.
Bug: dawn:1186
Change-Id: I13e796a5d8f59c26279b9079d4496390506c739a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/68941
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
This change adds two arguments depthReadOnly and stencilReadOnly
into RenderBundleEncoderDescriptor in order to follow WebGPU spec.
It also adds one more validation rule: depthReadOnly must be equal
to stencilReadOnly if depthStencilFormat has both depth and stencil
aspects in RenderBundleEncoderDescriptor. We have already had a
similar validation rule in RenderPassDepthStencilAttachment in
RenderPassDescriptor.
Bug: dawn:485
Change-Id: I32c45b2bd90c7041aa881d8589720a9146d6ac7e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/66501
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This CL renames "extension" to "feature" to follow WebGPU. It still
supports both. A future Chromium CL will pick this change, then all
"extension" occurrences will be removed.
Change-Id: I070e32d7ae042f9b846df01f200b39f6741a0a14
Bug: dawn:1149
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65664
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
Also adds a label to ExternalTextureDescriptor to match the pattern of
all other descriptors.
Also adds missing validation that the planes must not be multisampled
(with a test) and fixes the validation unittests to not leak state from
one test to another (so they test exactly what they need to).
Bug: dawn:563
Change-Id: I88a4d7a859e67e5af85efd5ba16572c9014df6ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65562
Reviewed-by: Brandon Jones <bajones@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Add vulkan backend implementations and tests.
Disabled some tests that fail due to tint missing
features and issues.
Bug: dawn:1041, tint:1155
Change-Id: Iac161317450cff59627e08b1228bffde4cef71da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64981
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Breaking change, but it should only require small changes in any project
that relies on it, so just doing this instead of a two-stage deprecation.
Will require a manual roll into (at least) Chromium.
Bug: dawn:1080, chromium:1253721
Change-Id: I6699e0629c3b2fe63e7f9d5ba0a928f00316a588
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64520
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
For size parameter in setIndexBuffer and setVertexBuffer, use
wgpu::kWholeSize rather than 0 to indicate using the default
size, i.e. remaining buffer size after offset. Using size=0 is still
avaliable but will cause a deprecation warning.
Bug: dawn:1058
Change-Id: I4c4f6ca6fc7346c225815bdcd607fed110ce2b9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65020
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This command copies data from host memory into a GPU buffer. It's
analogous to Queue::WriteBuffer, but executed in the context of a
command buffer, sequenced with other encoded commands. This is useful
for supporting a notion of a shared scratch buffer, with a single
allocation whose contents may need to be overwritten with new data
before each pass that uses it.
Bug: dawn:809
Change-Id: If58d49c52a41127e2980dd626fd687eb1c91fe28
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64001
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ken Rockot <rockot@google.com>
Fixes the library_webgpu_enum_tables.js generation for the BC formats.
ETC2 and ASTC are not in the spec yet, so I took a guess at how those
would be formatted.
Bug: dawn:501
Change-Id: Icee5f1db039c1b401082676dab3020dda21da8bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64525
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Generates the exact upstream headers, except for a few Dawn and upstream
changes that have landed since I started this CL, and the "_TODO"s about
extensibility of compilation info/message.
Bug: dawn:1080
Change-Id: I2a6128a3e78cfef7b9f8feae84b7c7c207eb2826
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/62861
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Adds a "tag" system so that entries of dawn.json can be conditionally
emitted in different configurations. With a few more dawn.json changes,
this will enable generating the exact upstream header.
Bug: dawn:1080
Change-Id: I3506dadd485e31786578a3a64c3603c964c5354f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/62580
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Allows us to match the upstream header's format list more closely.
Bug: dawn:570
Change-Id: Iee5c6c0e45ab81fa335c3d8e63d8b2c5c455d26c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64522
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
The follow up CL will remove 0.
Bug: dawn:1026
Change-Id: Ida62f8d8b0dd8f9722e40f3f95366d3db0c7ab52
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64164
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
This CL adds device ID and vendor ID to device properties so that WebGPU
can access it to help populate GPUAdapter.name.
Bug: chromium:1231163
Change-Id: I460e5a72ffba350f88d2649789a61eaea9670135
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
This seperates the undefined 'arrayLayerCount' from 0 to
WGPU_ARRAY_LAYER_COUNT_UNDEFINED. So 0 arrayLayerCount is treated
as a validation error.
Bug: dawn:1026
Change-Id: I7b4ae024b02ac0d2aa260b2a8c64b09bd967db87
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63660
Reviewed-by: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Adds a way to store the limits on the Adapter and the
Device. For now, adapter limits are always the default
limits, and device limits are stored but not used.
This CL also adds usage of an ErrorObjectIdResolver and
Provider in the WGPUDeviceProperties serialization and
deserialization helpers. Serializing/deserializing this
struct should never have objects.
Bug: dawn:685
Change-Id: I1479b4407b0f9ec9f9b2bff62cad7caa693c99d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63983
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Adds a basic RequestDevice method to the adapter, only in
dawn_native. We will revisit this when we implement adapters
in dawn_wire.
RequestDevice allows us to have tests of the limit bounds
because it receives a callback which can return status codes
and error messages.
Bug: dawn:685
Change-Id: I7a68922b078c6a436f49a16346cb41fb9df9cfee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63982
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The end to end texture tests with the binary information for the textures are generated using the open source astc-encoder tool.
Also: Refactors end2end compressed texture tests to allow for non-4x4 texel compression formats (ASTC formats are not all 4x4).
Bug: dawn:955
Change-Id: I5311a5aa7bd017de72300bf7c87fba6c869b1db5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63121
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Adds labels for Pipelines and ShaderModule. Includes tests. Backend
functionality is implemented for Pipelines, and completed to best effort
for ShaderModule.
Bug: dawn:840
Change-Id: I55024a83f66d9fc2fc0e8b79e4b9a7ebc6f3cf1c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/62860
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones (Intel) <brandon1.jones@intel.com>
The end to end texture tests with the binary information for the textures are generated with a combination of the open source etc2comp tool and manual crafting of the data based on the specification in the Kronos Data Format Specifications (https://www.khronos.org/registry/DataFormat/specs/1.1/dataformat.1.1.pdf) for the compressed formats.
Also: Refactors end2end compressed texture tests and some utilities so that we can use parameterized tests for easier new format additions.
Bug: dawn:955
Change-Id: I91686f26a693a85cb076ef0eca3029111a64c50f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/62740
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Compatible Vulkan backends should now enable ETC2/ASTC but no functional
changes because no TextureFormat in ETC2 or ASTC have been added yet.
Bug: dawn:955
Change-Id: I56e8ff73f931a12253fe6d21f3f4b91e3459ef13
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/62701
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Adds a generic SetDebugName utility for D3D12 and Vulkan. Passes down
debug label set by user for buffers and textures to be labeled by the
appropriate backend method.
Bug: dawn:840
Change-Id: I7158b537a6e37fdf733645e6830dc33833ee683e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61588
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones (Intel) <brandon1.jones@intel.com>
Older names are kept around as an alias for a while. Unfortunately we
have no mechanism for producing deprecation error messages when they
are used.
Bug: dawn:1035
Change-Id: Ic6716fd526ecbedaa8e7925ab93e3ff32f642d97
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61382
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This CL adds an internal method to copy textures, that will disregard
the need of having CopySrc usage.
This CL adds an intermediate helped method to be used by both
APIContextTextureToTexture and APIContextTextureToTextureInternal.
Fixed: dawn:1052
Change-Id: Icd28e0ef58ecfaa412eefe8c95e41cd2298a9acc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58440
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Juanmi Huertas <juanmihd@chromium.org>
This chained struct can be used for internally adding usages to
Dawn textures. It will affect how the texture is allocated, but
not affect frontend validation.
One use case for this is so that Chromium can use an internal
copyTextureToTexture command to implement copies from a WebGPU
texture-backed canvas to other Web platform primitives when the
swapchain texture was not explicitly created with CopySrc usage
in Javascript.
Usage:
wgpu::DawnTextureInternalUsageDescriptor internalDesc = {};
internalDesc.internalUsage = wgpu::TextureUsage::CopySrc;
wgpu::TextureDescriptor desc = {};
// set properties of desc.
desc.nextInChain = &internalDesc;
device.createTexture(&desc);
Fixed: dawn:1027
Change-Id: Id4d08b5588d4960d150d559aa11502c69f40a674
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58140
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
See https://github.com/gpuweb/gpuweb/pull/1927
Adds a typedef to make a gradual deprecation.
Bug: dawn:1023
Change-Id: Ic81a933a95556fbf5726056530788dde017a1449
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59442
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL adds the support ofwgpu::CopyTextureForBrowserOptions::alphaOps
for CopyTextureForBrowser(), which allows the user to specify the alpha
operations (DontChange, Premultiply, Unpremultiply) when calling
CopyTextureForBrowser().
BUG=chromium:1217153
Change-Id: Idb5dd4482b33f2ada9aafc24380afeb48f2e26bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
This didn't make sense since these members can be specified to have no
data by setting the length to 0.
- Prevent uses of this patten by adding an assert in WireCmd.cpp's
generator.
- Fix SetBindGroup dynamicOffset to not be optional but default to
nullptr instead.
This issues would cause a read of uninitialized pointers becaus the
generator code looked like this:
SetBindGroupCmd cmd;
cmd.dynamicOffsetCount = record.dynamicOffsetCount; // 1
bool has_dynamicOffset = record.has_dynamicOffsetl // false
if (has_dynamicOffset) {
cmd.dynamicOffsets = ...;
}
// Oh no! dynamicOffsets contains garbage even if dynamicOffsetCount
// is set to 1. dawn_native will happily read it.
Bug: chromium:1220036
Change-Id: I5c468b639f671cef3be2fa64667a0bf114fc902b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54643
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This extension is just added for testing unsupported feature at device
creation. We don't need to update Extensions info because the
invalidExtension is not a valid extension and must be treated as
InvalidEnum.
BUG: chromium:1175091
Change-Id: I11462a053fb5db8e11a54173e13f338c1c4f7b6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53891
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Deprecates the computeStage member of the descriptor in favor of compute
as described by the spec. In order to support both variants without
breaking backwards compatibility some code had to be manually added to
the wire client to copy from the deprecated member to the new one and
visa versa.
Change-Id: I9d5c2fc9c446c927c5792c9af9ed56c90060b65b
Bug: dawn:800
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53884
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Details:
- Add the logging level type WGPULoggingType, including levels verbose,
info, warning, and error,
- Add the API SetLoggingCallback, which bind the callback to deal with
logging string,
- Add the return command DeviceLoggingCallback and related code,
- Add DeviceBase::EmitLog(WGPULoggingType, const char*) , and
DeviceBase::EmitLog(const char*) use WGPULoggingType_info as default,
to post logging from native or server device to bound callback
via CallbackTaskManager.
BUG: dawn:792
Change-Id: I107b9134ff8567a46fa452509799e10b6862b8d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52200
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
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>
Fences are no longer part of the WebGPU spec, and have been removed from
Blink.
Bug: dawn:22
Change-Id: I240c4c4107acfaf9facec88a43a38b5ff327c7a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50702
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>