Commit Graph

58 Commits

Author SHA1 Message Date
Loko Kung 44f039d3c2 Adds new chained struct for device creation to specify cache options.
- Adds isolation key option, DawnNative support, and relevant unit tests.

Bug: dawn:549
Change-Id: I16344581c7956ce8576c0a4c14655fbdb4e15a54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/81920
Reviewed-by: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
2022-03-01 22:59:40 +00:00
Stephen White a52abab38c Nuke SPIRV-Cross.
Change-Id: I1fc58d50ba3999e3a9b6f4e30a0799be301893de
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79481
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2022-02-11 00:45:51 +00:00
Austin Eng 189b0cec37 tint->dawn: Move src/dawn_tests -> src/dawn/tests
Bug: dawn:1275
Change-Id: I79f2aeb0c54a74dd5becd90c46792705a28e87da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79100
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2022-02-09 14:54:31 +00:00
Ben Clayton c6ccd539e8 tint->dawn: Move src/fuzzers/dawn -> src/dawn/fuzzers
This has already been moved once, but with more consideration, there's far less fuzzer-related stuff to put in the same root directory here.

Bug: dawn:1275
Change-Id: Ic4bb556d9a9f104293cca3316cae84b66a6362b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79104
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-02-04 18:48:05 +00:00
Ben Clayton 818001d32e tint->dawn: Move src/dawn_native -> src/dawn/native
Bug: dawn:1275
Change-Id: Ic60a00107a015bc677ff929c492f1085ffc38482
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79083
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
2022-02-04 17:07:46 +00:00
Ben Clayton b2c4d7a244 tint->dawn: Move src/dawn_platform -> src/dawn/platform
Bug: dawn:1275
Change-Id: I043c5e6d84e199fe2e753ac43181b125882439bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79082
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-02-04 12:51:25 +00:00
Ben Clayton 20cbe6d9e8 tint->dawn: Move src/dawn_wire -> src/dawn/wire
Bug: dawn:1275
Change-Id: I56535bf4d387c4bd423140705ea70812be073eac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79081
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-02-04 12:51:25 +00:00
Ben Clayton 1e657a6328 tint->dawn: Move src/utils -> src/dawn/utils
Also remove stuttering from the target names by dropping the 'dawn_' prefix.

Bug: dawn:1275
Change-Id: I3263f1236f71bf23795b4b12670ad3535822a537
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79062
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-02-04 12:51:25 +00:00
Ben Clayton d9ab69a9c1 tint->dawn: Move src/common -> src/dawn/common
Also remove stuttering from the target names by dropping the 'dawn_' prefix.

Bug: dawn:1275
Change-Id: Iac79f9927010b8e5edeb7e0949092b34431d54dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/79061
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2022-02-04 12:51:25 +00:00
Ben Clayton 1a4185b742 Move src/fuzzers to src/fuzzers/dawn
As part of the tint -> dawn merge.

Bug: tint:1275
Change-Id: I0ebb8afe9971c21ca90f90f246edcfde01d5f4bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/78800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-02-01 16:45:12 +00:00
Ben Clayton 26c31f6b2c Shuffle 'docs' directories
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>
2022-01-27 18:33:47 +00:00
Austin Eng aa9475e973 Add WGPUDawnEncoderInternalUsageDescriptor
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>
2022-01-18 21:54:25 +00:00
Corentin Wallez a4357a7619 Add Window at the end of SurfaceDescriptorFromXlib.
Bug: dawn:1246
Change-Id: I1917056e9bb2bde0997c072ab76963e9dd079bb3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75420
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2022-01-06 09:10:00 +00:00
Austin Eng 2f218e2b21 Implement upstream RequestDevice, add native-only CreateDevice
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>
2021-12-22 19:02:23 +00:00
fujunwei a2241d402e Configure the namespace of native implementation in api.json
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>
2021-12-16 04:54:38 +00:00
Jiawei Shao 1f25ea94bb dawn_wire: Directly use the data in deserialized buffer when possible
This patch tries to use the data directly in deserialized buffer
when the data is "data-only" and doesn't affect the control flow instead
of allocating and copying into a temporary buffer. Due to the protection
of TOCTOU attacks, currently we only set "wire_is_data_only" on the
parameter "data" in Queue.WriteBuffer() and Queue.WriteTexture().

With this patch, the performance of dawn_perf_tests
BufferUploadPerf.Run/*_WriteBuffer_BufferSize_* with "-w" will
be greatly improved (~20%) when the upload buffer size is greater than
1MB.

BUG=chromium:1266727

Change-Id: I7a9d54c9b505975235ee37aa72ee97f082ad3aa3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72063
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-12-10 02:05:28 +00:00
Jiawei Shao 264f239259 dawn_wire: Remove unused support of "const*const*"
This patch removes the support of annotation "const*const*" in
the template WireCmd.cpp as it is not used in current Dawn wire
implementation.

BUG=chromium:1266727

Change-Id: I4c4d68ccc050edb5f855094910440e90aef2bc4a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-12-09 02:43:28 +00:00
fujunwei 3a464767a5 Make the prefix of proc table configurable in api.json
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>
2021-12-05 05:29:44 +00:00
fujunwei 23f71624b3 Add a category named function in dawn.json
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>
2021-12-02 07:41:21 +00:00
fujunwei 4e8769087a Add ability to generate constants from dawn.json
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>
2021-11-25 08:44:01 +00:00
fujunwei 76bda371ef dawn.json changes for the flexible templates
- 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>
2021-11-23 08:47:35 +00:00
Brandon Jones 2514566d82 Make validation error formatting more consistent
- Updates error message formatting to ensure they end with a newline to
   prevent errors from running together.
 - Updated all encoder/device context messages to normalize their format
   and include more information.
 - Update Abseil formatter to make objects indicate if they are an error
   object in the formatted string. (ie: [Invalid BindGroup])
 - Added fallback code in case a context message doesn't format
   correctly to aid in debugging.

Bug: dawn:1154
Change-Id: Id27b11305cf8efcca343597f90489dde5552c775
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/68200
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-11-03 01:31:19 +00:00
Corentin Wallez 983d13235d Add more / finer-grained OWNERS
This will help with review load and finding an owner once mandatory
owner review is enabled.

Change-Id: I1a90b83fed68f062c1406552aec218bf9c2092ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67821
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2021-11-02 09:30:52 +00:00
Loko Kung fc5a7d414f Adds remaining setup logic to implement destroy in Device and ObjectBase.
- Renames some of the Device functions to be consistent with documentation
- Reverts change in https://dawn-review.googlesource.com/c/dawn/+/64820 for overloading mDevice == nullptr to determine if objects are alive because device is needed for error propagation. Instead, use list existence to determine if objects are alive
- Updates destroy api to return bool upwards in case we need to further process the extending objects
- Adds tracking functions in ObjectBase
- Adds final tag to all backend Device implementations
- Adds MoveInto LinkedList support to move list elements in O(1)

Bug: dawn:628
Change-Id: Iff70f4f7d55f46ee52d1bd0e02e3671819f2eed4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65861
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-10-12 17:46:26 +00:00
François Beaufort 3f689a4c5a Rename "extension" to "feature"
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>
2021-10-04 11:30:02 +00:00
Brandon Jones ea5d768f94 Improve validation errors, Part 2
Updated validation messages in:
 - CommandBufferStateTracker
 - RenderBundleEncoder
 - RenderEncoderBase
 - RenderPassEncoder

Bug: dawn:563
Change-Id: I0e8f133333bf759921e5db1b1908ee2dc882c504
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64982
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-28 21:35:43 +00:00
Brandon Jones ba66295033 Improve validation errors, Part 1
Begin's using Abseil's string formatting and new error context tracking
to dramatically improve the usefulness of validation messages. In
addition to putting in place several utilities to enable better messages
this change also updates the BindGroup buffers bindings validation
messages as a test for the new mechanisms.

Bug: dawn:563
Change-Id: Ie5bf5ffb24a9013cebd67745dc4172dfbc901e9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64201
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-23 21:26:33 +00:00
Kai Ninomiya 930e9186a6 Generate multiple variants of webgpu.h header
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>
2021-09-17 19:44:43 +00:00
Shrek Shao 110cac1d09 Add buffer_mapping.md in docs
Make a md doc placeholder for buffer mapping.
Linking the google doc now.

Change-Id: I085e10474148fdb2a710655cc5115f8fc2b4b5b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64523
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2021-09-17 01:50:00 +00:00
Corentin Wallez 749e14490e Add Dawn's logo and use it in README.md
Change-Id: Ia504f2025c8a7ea139b41d72140a36510ad7db0b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63380
Reviewed-by: François Beaufort <beaufort.francois@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-09-02 09:51:40 +00:00
Li Hao 41e3931b04 Fix build failures of new APIs on old macOS SDK
New APIs supported from macOS 11.0 cannot build successfully on macOS
10.15, even use @available to control whether a declaration is
available on target platform, but does not work in conditionally
compiling.

Update building.md to require the macOS 11.0 SDK.

Bug: dawn:1054
Change-Id: If22ada959c0c1ef41826f78bd337b912772000b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61021
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-08-18 16:16:57 +00:00
shrekshao f43822a3fd Add docs/external_resources.md to put links to google docs etc.
Bug: dawn:773
Change-Id: I52f405a8edf6c15067bbf51a547a9eedbf72f9e8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/60162
Reviewed-by: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Shrek Shao <shrekshao@google.com>
2021-07-29 20:26:27 +00:00
Austin Eng 0eff5987f0 Add chained DawnTextureInternalUsageDescriptor
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>
2021-07-27 19:59:58 +00:00
Corentin Wallez ac61042f8b docs/contributing.md: Explain how to start a review.
Also mention that the Bug: tag should be at the bottom of the commit
message.

Bug: dawn:23
Change-Id: Ib4e6b3c3db2f97af94c7e8240af90f85add5547f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52780
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-06-01 16:08:22 +00:00
Brian Ho 5346e770c9 Add helper functions to iterate over ChainedStructs
This CL adds two helpers for more ergonomic processing of
ChainedStructs.

1. FindInChain(): Iterates through the chain and automatically
   casts the ChainedStruct into the appropriate child type before
   returning.
2. ValidateSTypes(): Verifies that the chain only contains structs
   with sTypes from a pre-defined set. This also allows the caller
   to specify one-of constraints.
3. ValidateSingleSType(): Verifies that the chain contains a
   single struct with a specific sType or is an empty chain. This
   is a common case of |ValidateSTypes()| and is separated out as
   a fast-path.

Change-Id: I938df0bf2a9b1800b1105fb7f80fbde20bef8ec8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47680
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-22 17:49:42 +00:00
Corentin Wallez b395605ab3 Add docs/contributing.md
Bug: dawn:23
Change-Id: I2cbf40c4079ea9d35c3d0c299c30e39b22eff80a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48420
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-21 18:05:01 +00:00
Corentin Wallez 6d0438c21e Add documentation for the codegen.
Also does small cleanups in dawn.json

Bug: None
Change-Id: Icbe8c9370496fa63fdd32b43d4f7a0666acf71c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45920
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-03-24 20:29:42 +00:00
Austin Eng be621bd0e6 Update the wire-based fuzzers to always assume an injected error
This also removes the ability for the fuzzer to perform error
injection to generate testcases. The preferred method is to
use one of the Dawn test binaries to produce the trace directly.

Bug: dawn:629
Change-Id: If7295f9e6da5618be8f44e9301aa12dc56fcdfef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40301
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-03-23 16:47:50 +00:00
Corentin Wallez f83df90fae Vulkan: use VK_EXT_debug_utils instead of deprecated extensions.
The previous VK_EXT_debug_report and VK_EXT_debug_marker extensions were
both deprecated in favor of VK_EXT_debug_utils. This commit makes Dawn
follow the ecosystem and also adds more detailed reporting of why
vkCreateInstance fails that's now supported in VK_EXT_debug_utils.

Bug: dawn:635

Change-Id: I61c89da1fd55f26d7ccf91723feedfb354efbc16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38020
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-01-20 19:19:08 +00:00
Corentin Wallez 429a12542f docs: Mention to add `use_system_xcode=true`
Also fix the name of the docs/building.md file.

Bug:

Change-Id: I342adcbc1427c533d2248d23d53f169d4a4a54cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34466
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-02 15:59:49 +00:00
Ryan Harrison c35e2ba379 Remove usages of SPVC
Remove all usages of SPVC from the code and update the fuzzers. Some
of the include paths and deps came transitively from spvc, so needed
to update build rules.

This patch does NOT remove the flags related to spvc usage, they are
just no-ops as the moment. After this patch lands I will remove the
usage of those flags from the bots, then remove the flags.

BUG=dawn:521

Change-Id: I0d7c3e28f79354c78f00c48b6a383b823094a069
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/27900
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2020-09-02 22:09:08 +00:00
Corentin Wallez f7123d7463 Remove MapRead/WriteAsync and CreateBufferMapped
Bug: dawn:445

Change-Id: I0b0755b6bb754d1fff99aa59b08362f89950e300
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26301
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-08-20 14:22:29 +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 94efed23e7 Start adding docs about device facilities.
Bug: dawn:373
Change-Id: I837b0fe15ff98d58caf6b69ea6d8d92bee33e52e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18762
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-05-05 08:46:15 +00:00
Corentin Wallez 2d10e954ce BUILD.gn: rename libdawn_native/wire to dawn_native/wire
This helps take advantage of the GN feature where when a directory is
used as a target name, like //foo/bar/baz, the //foo/bar/baz:baz target
is used automatically.

Bug: chromium:1064305
Change-Id: I2e2d9f308fda1b811482026962ab0770ac45e988
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18862
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-04-07 07:44:00 +00:00
Austin Eng 0a239045e3 [docs] Add documentation for Dawn's testing infrastructure
Bug: dawn:23
TBR: cwallez@chromium.org
Change-Id: I67a1794bfc959f76fd16f5b249364a02274e73e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15601
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-01-31 03:28:56 +00:00
Austin Eng 470921fe46 Reland "fuzzing: Add supportsErrorInjection option to DawnWireServerFuzzer"
This is a reland of f58f69f66b

The whitebox dawn_end2end_tests are updated to link statically against
libdawn_native. This is required because the test link against and use
libdawn_native as sources. It is an error with MSVC to both import and
export symbols from libdawn_native.

Original change's description:
> fuzzing: Add supportsErrorInjection option to DawnWireServerFuzzer
>
> This option will be used by backends that support error injection so
> that errors can be injected into a "clean" corpus to generate a seed
> corpus with good examples of injected error conditions.
>
> Bug: dawn:295
> Change-Id: I837acdde6dd4274adb56edf8e4307427f8d6333b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14681
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

Bug: dawn:295
Change-Id: Ifa092d28aa7ac57cfb197aa4daeb8408f8036d4a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14820
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-01-06 19:56:17 +00:00
Austin Eng 87d3138158 Revert "fuzzing: Add supportsErrorInjection option to DawnWireServerFuzzer"
This reverts commit f58f69f66b.

Reason for revert: This breaks the MSVC build because the whitebox end2end tests try to both import and export the error injector symbols from libdawn_native

Original change's description:
> fuzzing: Add supportsErrorInjection option to DawnWireServerFuzzer
> 
> This option will be used by backends that support error injection so
> that errors can be injected into a "clean" corpus to generate a seed
> corpus with good examples of injected error conditions.
> 
> Bug: dawn:295
> Change-Id: I837acdde6dd4274adb56edf8e4307427f8d6333b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14681
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

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

Change-Id: I14a15fcd094d431cbb8a29d5642a4a7fe6a11f4c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:295
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14741
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-12-20 23:07:40 +00:00
Austin Eng f58f69f66b fuzzing: Add supportsErrorInjection option to DawnWireServerFuzzer
This option will be used by backends that support error injection so
that errors can be injected into a "clean" corpus to generate a seed
corpus with good examples of injected error conditions.

Bug: dawn:295
Change-Id: I837acdde6dd4274adb56edf8e4307427f8d6333b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14681
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-12-20 15:52:20 +00:00
Austin Eng 5e98e38744 fuzzing: Remove download of existing testcases in seed corpus script
ClusterFuzz already has facilities to minimize testcases daily. It is
not necessary to do so in our update script.

Bug: dawn:295
Change-Id: I9869d25f657b40f1af1aac90c27200a59f46b9c1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14621
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2019-12-18 00:35:06 +00:00