This is another step to implement webgpu.h swapchains, Surface is
essentially a union type of all the types of windows that can be used to
create swapchains.
Changes to allow implementing wgpu::Surface and test its creation are:
- Add GLFWUtils.cpp/.h/_metal.mm that contains helpers used to use
WebGPU with GLFW. This deprecates BackendBinding.h that will be removed
when the NXT swapchain is removed.
- Add a `dawn_use_x11` GN variable to factor all the places in BUILD.gn
where we checked whether we should use X11.
- Add a `supports_glfw_for_windowing` GN variable in the main BUILD.gn
file to control which configuration tests and samples using GLFW can be
built.
- Add a ObjCUtils.h to contain some ObjC functionality that we'd need
in files that otherwise would be C++ (so that they can be compiled on
all platforms).
Bug: dawn:269
Change-Id: I25548142a1d1d1f05b0f4d71aa3bdc4698d19622
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15081
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
struct WGPUChainedStruct {
WGPUChainedStruct const * nextInChain;
WGPUSType sType;
};
And changes all the nextInChain to point to such structures. This adds
more type safety to extension structs and requires less casting to check
sTypes and friends.
Bug: dawn:269
Change-Id: I443f363cdb55dbec7c7f6e897245d4a7ea0ebe70
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15080
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch adds validations to the texture usage "Storage" when
creating a texture.
1. "Storage" usage cannot be used when SampleCount > 1
2. "Storage" usage can only be used with some texture formats. The
list of the formats can be found through the following link:
https://github.com/gpuweb/gpuweb/issues/513
BUG=dawn:267
TEST=dawn_unittests
Change-Id: Ifc7296d966ac0c600433948a63c3dd6a436c8d8b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15040
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This reverts commit 2b3975f808.
Reason for revert: causes the failure in crbug.com/1041358
Original change's description:
> Metal: Add CommandRecordingContext
>
> Introduces the idea of a CommandRecordingContext to the Metal backend,
> similar to other backends. This is a class to track which Metal encoder
> is open on the device-global pending MTLCommandBuffer.
> It will be needed to open/close encoders for lazy clearing.
>
> Bug: dawn:145
> Change-Id: Ief6b71a079d73943677d2b61382d1c36b88a4f87
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14780
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:145
Bug: chromium:1041358
Change-Id: I05c76cd96f723230d05cff65127dc8513d5e03c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15060
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Now ComputeCopyStorageBufferTests.SizedArrayOfStruct can pass on all
backends with the fix in the latest SPIRV-Cross.
BUG=chromium:1037829
TEST=dawn_end2end_tests
Change-Id: I20103c3b0848da394e82912f59548a71a3273ac1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/15020
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The way in which the Result class is used in Dawn can be fragile
with respect to memory management because the caller of AcquireError
must know they need to delete the returned pointer or a memory leak
will occur. We've had a couple of instances where developers have
accidentally left out the delete call and managed to get past code
review.
This CL changes the Result class so that it assumes the error is
allocated on the heap and forces the caller to use unique_ptr when
calling AcquireError.
Bug:dawn:320
Change-Id: I13ec953b0c37eaafbd6ce93c2f719b4743676acb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14960
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
The padded matrix issue in MSL has been fixed in SPIRV-Cross, and
it's updated in https://dawn-review.googlesource.com/c/dawn/+/13421,
so we can add BindGroupTests.MultipleBindLayouts back.
Bug: dawn:33
Change-Id: I8847ab536ebfd779219a1c6d0e1a9a128adf7e85
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/13560
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The dawn_native::Adapter::GetPCIInfo/GetBackendType/GetDeviceType
methods are now deprecated in favor of a method returning a webgpu.h
AdapterProperties structure. Deprecated function are still available to
avoid breaking Chromium or Skia compilation.
This reduces the difference between dawn.json and webgpu.h
BUG=dawn:160
Change-Id: Ib68fe1c4d1d87676c01c212c91f80fdd26056c56
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14541
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is the first step in making the API before WGPUDevice creation
match webgpu.h and is necessary to implement WGPUSwapChain.
BUG=dawn:269
Change-Id: If92ced42d7683d79e67c02738949ff8b483d22c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14061
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch makes GetProcs() a static member function of WireClient so
that we can call it without creating a WireClient object.
BUG=chromium:996713
Change-Id: I499be0cd2c5a5f29c796d3be88ce33c1b70711d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14942
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Roll third_party/SPIRV-Tools/ 96354f504..fb2e81981 (17 commits)
96354f5047..fb2e819819
$ git log 96354f504..fb2e81981 --date=short --no-merges --format='%ad %ae %s'
2020-01-08 dneto Fix GN build for OpenCL.DebugInfo.100 update (#3134)
2020-01-08 bclayton Fix bad parameter names in error message (#3129)
2020-01-07 alanbaker Revert PR #3093 (#3131)
2020-01-07 alanbaker Disallow forward references in arrays (#3093)
2020-01-07 afdx spirv-fuzz: Add fuzzer pass to perform module donation (#3117)
2020-01-06 dneto GetOperandConstants operand can be const (#3126)
2019-12-27 dneto Avoid pessimizing std::move (#3124)
2019-12-27 kburjack Fix typo in validation message (#3122)
2019-12-27 greg Change default version for CreatInstBindlessCheckPass to 2 (#3119)
2019-12-20 greg Fix convert-relax-to-half invalid code (#3099) (#3106)
2019-12-19 dneto Support OpenCL.DebugInfo.100 extended instruction set (#3080)
2019-12-19 afdx spirv-fuzz: Always add new globals to entry point interfaces (#3113)
2019-12-19 afdx spirv-fuzz: Transformation to add a new function to a module (#3114)
2019-12-19 afdx spirv-fuzz: Avoid passing access chains as parameters (#3112)
2019-12-18 dneto Add support for SPV_KHR_non_semantic_info (#3110)
2019-12-16 afdx spirv-fuzz: Transformations to add types, constants and variables (#3101)
2019-12-16 greg Make Instrumentation format version 2 the default (Step 1) (#3096)
Roll third_party/glslang/ ebf634bca..518136706 (13 commits)
ebf634bcaa..5181367062
$ git log ebf634bca..518136706 --date=short --no-merges --format='%ad %ae %s'
2020-01-07 cepheus Fix#1829: Add "--" command-line options for macro def/undef.
2020-01-08 laddoc Move symbol builtin check to grammar stage
2020-01-06 lryer Add missing extension defination
2020-01-06 cepheus Bump revision
2020-01-06 laddoc Add builtin constants
2019-11-26 laddoc Add support for ARB_gpu_shader_fp64
2019-12-26 cepheus HLSL: Fix#2037: Integer dot used incorrect input for adds.
2019-12-25 laddoc atomic counter offset should align to 4
2019-12-25 laddoc Modify atomic_uint binding check
2019-11-26 laddoc Add support for ARB_uniform_buffer_object
2019-11-26 laddoc Add support for ARB_texture_multisample
2019-11-26 laddoc Add support for ARB_sample_shading
2019-12-20 cepheus Command-line: Give better error messages. From #1829.
Roll third_party/shaderc/ 6d3e0ee67..0b9a2992c (3 commits)
6d3e0ee67f..0b9a2992c7
$ git log 6d3e0ee67..0b9a2992c --date=short --no-merges --format='%ad %ae %s'
2020-01-07 rharrison Rolling 5 dependencies and updating expectations (#946)
2019-12-18 rharrison Adding in missing APIs for MSL support in Dawn (#943)
2019-12-16 rharrison Rolling 4 dependencies (#942)
Roll third_party/spirv-cross/ f912c3289..172e39f03 (20 commits)
f912c32898..172e39f039
$ git log f912c3289..172e39f03 --date=short --no-merges --format='%ad %ae %s'
2020-01-09 post HLSL: Add a resource remapping API similar to MSL.
2020-01-09 post MSL: Deal with sign on wave min/max.
2020-01-09 post HLSL: Deal with casting for WaveActiveMin/Max.
2020-01-09 post GLSL: Deal with sign in subgroup Min/Max operations.
2020-01-08 post Run format_all.sh.
2020-01-08 post HLSL: Fix bug when reading and writing structs from SSBO.
2020-01-08 post HLSL: Implement stores for complex composites in ByteAddressBuffers.
2020-01-08 post HLSL: Support loading complex composites from ByteAddressBuffer.
2020-01-08 post Run format_all.sh.
2020-01-07 post MSL: Deal with padded fragment output + Component decoration.
2020-01-07 post MSL: Explicitly don't support component packing for tessellation.
2020-01-07 post MSL: Don't set OrigID when emitting component packed vectors.
2020-01-07 post MSL: Deal with packing vectors for vertex input/fragment output.
2020-01-07 post MSL: Add trivial tests for Component decoration.
2020-01-06 post Fix Clang warnings.
2020-01-06 post Roll custom versions of isalpha/isalnum.
2020-01-06 post Add test shader for OpCopyLogical with packing/unpacking.
2020-01-06 post Go through access chain path for OpCopyLogical.
2020-01-06 post Basic implementation of OpCopyLogical.
2019-12-21 dm86.jang Add debug prefix on Windows
Created with:
roll-dep third_party/SPIRV-Tools third_party/glslang third_party/shaderc third_party/spirv-cross third_party/spirv-headers
BUG=1037829
Change-Id: I0dc87160c607e615be6e6f2f6dd4a892b010de51
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14943
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This is a reland of d08a14b709
It gates dawn_use_swiftshader on dawn_enable_vulkan because the
Vulkan backend isn't supported on Mac. We may support Swiftshader
Vulkan on Mac in the future, but that will first require changes
to how we initialize the Vulkan backend.
Original change's description:
> Use Swiftshader by default when fuzzing
>
> Note: This still requires Chromium to have set dawn_swiftshader_dir
> to take effect.
>
> Bug: dawn:295
> Change-Id: I0c953196630dd2694f68d290e6f3f1e427c20a2f
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14821
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
Bug: dawn:295
Change-Id: Ia125005b35951021702104a99a78712bcd47dd1e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14941
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This reverts commit d08a14b709.
Reason for revert: This breaks the Mac fuzzer builds because it tries
to build with Swiftshader without Vulkan enabled. Reverting this now
to unblock the roll while I work on a fix.
Original change's description:
> Use Swiftshader by default when fuzzing
>
> Note: This still requires Chromium to have set dawn_swiftshader_dir
> to take effect.
>
> Bug: dawn:295
> Change-Id: I0c953196630dd2694f68d290e6f3f1e427c20a2f
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14821
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:295
Change-Id: I7b73d5edc844e090d5d2c8efe9efacc60040463e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14940
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Introduces the idea of a CommandRecordingContext to the Metal backend,
similar to other backends. This is a class to track which Metal encoder
is open on the device-global pending MTLCommandBuffer.
It will be needed to open/close encoders for lazy clearing.
Bug: dawn:145
Change-Id: Ief6b71a079d73943677d2b61382d1c36b88a4f87
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14780
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Due to significant performance regressions on Intel Gen11 Graphics,
temporarily disable use of the D3D12 Render Pass API until a workaround
infrastructure can be implemented.
Bug: dawn:310
Change-Id: I994a2c2a0f6a3b61c48b083c73d6e0d3f8910dfa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14663
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
This patch moves Instance initialization and adapter discovery so that
it is done once globally, and not for every fuzz input. This is to work
around a bug where destructing the instance at the end of a run breaks
when fuzzing with Swiftshader.
Bug: dawn:295, chromium:1038952
Change-Id: Iabfe178f40b9df85d47a6353f16cd2ef26f39966
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14822
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
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>
Note: This still requires Chromium to have set dawn_swiftshader_dir
to take effect.
Bug: dawn:295
Change-Id: I0c953196630dd2694f68d290e6f3f1e427c20a2f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14821
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
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>
jsoncpp causes some flaky failures because of inconsistencies in nested
DEPS. We barely use it for JSON serialization so the simplest solution
is to just manually write the serialization for perf test tracing data.
Bug: dawn:208
Change-Id: Ie5e4b5436e2c9e32e6817d64c6e95c774cb8751f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14720
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Results should be printed METRIC: STORY, not the other way around.
Also, story names shouldn't have slashes as it will parse as separate
chart segments and won't be allowed when we switch to using histograms.
Bug: dawn:208, dawn:311
Change-Id: Ifc893e5aa94eddcb3a08c0d4aff66b7a0f41620b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14740
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Enables use of 64KB texture alignments where permitted.
This saves heap memory (64KB vs 4MB per allocation) and
improves re-use.
BUG=dawn:27
Change-Id: Ief4c531446788284e69ec1646cfe2ea7a25c7bb2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14683
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
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>
Writable storage buffer in vertex shader is an optional feature.
It is not supported in many devices/OSes. WebGPU doesn't support
writable storage buffer in vertex shader. This change generates an
error for storage buffer binding for vertex shader stage, in order
to disallow writable storage buffer in vertex shader.
This change also adds a validation test and revises existing
end2end tests and validation tests accordingly.
BUG=dawn:180
Change-Id: I9def918d19f65aab45a31acb985c1a0a09c97ca8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14521
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Currently, when we hit an assertion failure, the fuzzer stops
immediately without producing a crash. This patch makes it so that we do
a hard abort instead which will be caught.
Bug: dawn:295, dawn:293
Fixes: dawn:293
Change-Id: Ie00074e84b51c9aa364aba96c11a35659bbba740
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14682
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This will make it easier to bring up other Dawn backend fuzzers
that don't use the Null backend.
Bug: dawn:295
Change-Id: I176b937722a63509cab620ac2a90098d87a6049c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14623
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This is a cleanup patch which changes the WireServer interface to
a CommandHandler interface in the DawnTest tracing layer. It also fixes
the opening mode flags on the output stream which was missing an output
usage.
Bug: dawn:295
Change-Id: I5b154e5201f8215b4dafc6389ebf1ec977a09c05
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14620
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
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>
BUG=dawn:291
Change-Id: I3e76749bcff8d7635d9dc02de0a9a66b686cd9d8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14622
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Allocating buffers with sizes close to UINT64_MAX caused issues in all
Vulkan drivers. See https://gitlab.khronos.org/vulkan/vulkan/issues/1904
for more context. Do early validation to prevent such cases from
reaching the driver.
Bug: dawn:241
Fixed: dawn:241
Change-Id: I7edbb25999b4c11767047518b69edc1fa624cd3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14641
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This will enable fuzzing the Vulkan backend with randomly injected
errors to help ensure the backend properly handles all errors. It also
redefines VkResult in the dawn_native::vulkan namespace such that a
VkResult cannot be used unless it is explicitly wrapped.
Bug: dawn:295
Change-Id: I3ab2f98702a67a61afe06315658a9ab76ed4ccc3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14520
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
To help with Device Loss, this splits Device backend destructors
to WaitForIdleForDestruction and Destroy.
WaitForIdleForDestruction waits for GPU to finish, checks errors and gets
ready for destruction.
Destroy is used to clean up and release resources used by device,
does not wait for GPU or check errors.
Bug: dawn:68
Change-Id: I054fd735e8d5b289365604209f38e616c723a4e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14560
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Natasha Lee <natlee@microsoft.com>
As part of moving to webgpu.h's version of the Instance, the setters
will be replaced with a descriptor, and getters don't usually exists for
things set with descriptors (except getBindGroupLayout).
BUG=dawn:22
Change-Id: I05be8ebf241b33d019d521e40bfef8e49cdab07d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14540
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This adds a script which runs the end2end_tests, captures a wire trace,
and then minimizes the corpus with the fuzzer. Minimizing the corpus
requires libfuzzer, so this only works in a Chromium checkout.
Unseeded, the fuzzer starts with coverage of about 600 features.
Using a seed corpus captured from the tests, the fuzzer quickly
increases coverage to about 10,000 features.
Change-Id: I8d0db5121745bd5ee4a350cf46fb37cfa434e3dc
Bug: dawn:295
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14242
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
BUG=dawn:303
Change-Id: Iff1903aecae4c043b222208b3eab5efdf9774b52
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14501
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Also changes the sampler validation to allow INFINITY and only check for
NaN.
BUG=dawn:296
Change-Id: I2a61df807d37dcaf280b12a1ffe56dc670d0f455
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14480
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This improves the DrawCallPerfRun/Vulkan_NoReuseBindGroups benchmark by
2% on an Intel processor but should be a bigger improvement on ARM.
The change was inspired by the Boost documentation at
https://www.boost.org/doc/libs/1_55_0/doc/html/atomic/usage_examples.html
Chromium's base::AtomicRefCount implementation and Rust's core::Arc
implementation.
BUG=dawn:304
Change-Id: I7ca71f34af20fd267cf2efc63871ff330b1dcc7c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/14482
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: David Turner <digit@google.com>