This brings more type safety to the code and is marginally more
readable.
Bug: None
Change-Id: I0330a8a8e95cd9b8b531af266acd8fdc50c50460
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71606
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Also delete vulkan.hpp that we don't use, and vulkan_fuchsia_extras that
have since then been upstreamed.
Also updates the fuchsia external import code to use the non-temp
extension.
Bug: dawn:221
Change-Id: I23e1bfedc5a18731be1e58d0bae1bddf6b0f45fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71601
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Changes several DAWN_TEST_UNSUPPORTED_IF macros that were erroneously
used to DAWN_SUPPRESS_TEST_IF.
Bug: dawn:1216, dawn:1217
Change-Id: Iaa0d7eb1b3aad8c0b11ff395cebaff0f15631beb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71524
Commit-Queue: Brian Sheedy <bsheedy@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Change backend connection in Instance.cpp to store a bitset of
backends that have been connected. This lets us only connect to a
single backend if AdapterDiscoveryOptions are passed explicitly,
and track which connections have/have not been made. Later, we can
connect to the rest of the backends if more are requested.
This is part of some improvements to the existing code so we can
selectively discover adapters and control discovery of the
high-performance, low-power, and fallback WebGPU adapters.
Bug: chromium:1266550
Change-Id: Iceb0d3f71751f5aac6218996ace3cf89deda8a29
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/69521
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@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 uses memcpy to copy the arrays in basic types instead
of iterating every elements in a for-loop.
In the next step we will copy specific structures with memcpy.
With this patch, the performance of dawn_perf_tests
BufferUploadPerf.Run/*_WriteBuffer_BufferSize_* with "-w" will
be greatly improved (~30%).
BUG=chromium:1266727
Change-Id: I7c6fb0fafa63bd6b602eeef8cf2c0ae0cfc7b0be
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Validate the storage texture views have a miplevel of 1 when creating
bind group. This validation is added in
https://github.com/gpuweb/gpuweb/pull/2285.
Also fix a bug in unittest BindGroupValidationTest.TextureBindingType.
Bug: dawn:1212
Change-Id: If32400ed1e4f3049b8b8979e6e6133bada36b45c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71380
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
- Update block size of depth/stencil formats in TextureUtils.h
- Allow to copy depth aspect for Depth32FloatStencil8 and disallow it
for Depth24UnormStencil8 in copyTextureToBuffer()
- Add Depth24UnormStencil8, Depth32FloatStencil8 and other depth/stencil
formats in CopyCommandsValidationTests.
Bug=dawn:690
Change-Id: I3f645b838b8a8cdafe0880bbd1e4e8d17d994510
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71400
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Suppresses several failures in Dawn's C++ tests that were found on
Windows machines with GTX 1660s.
Bug: dawn:1216, dawn:1217
Change-Id: I1b9feddd742837d0f91118803103eecbaa9effc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71560
Commit-Queue: Brian Sheedy <bsheedy@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
The default dawn_vulkan_loader_dir path is only guaranteed to exist in
standalone builds.
Should fix roll into Skia, which doesn't override dawn_vulkan_loader_dir
in its BUILD.gn files. Build fix confirmed locally. Sample roll failure:
https://skia-review.googlesource.com/c/skia/+/477896/
Bug: dawn:1191
Change-Id: Iea56475504afbe8926557371be9af5d345010b38
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71443
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
- Fixes all class and implementations to call upwards when necessary.
- Makes DestroyImpl full virtual at ApiObjectBase.
- Fixes mock classes to call default DestroyImpl upwards on mock calls.
- Adds back D3D12 optimization for buffer destruction.
Bug: dawn:628, dawn:1189
Change-Id: Id2c2c6483dc7ed93daf8e4648af26ac1307e3d90
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71243
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
When setting a buffer to zero now uses copies from a previously
allocated, zeroed out buffer to perform the clear rather than making new
allocations every time.
Bug: dawn:1160
Change-Id: I0c8e7e56b2afcb5961723e352d8bbdf276f4557c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70760
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
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>
Dynamic storage buffer sizes are loaded from a uniform buffer
which is bound to a set of root constants in the D3D12 root
signature.
Bug: dawn:429
Change-Id: I3bf0d9bbdb7a5b0a8c0f624f18081c6bf8d45fca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/68960
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
- Only suppressing for Linux/Vulkan/Nvidia platforms for now as those are the reproducable ones. The issue could be larger though.
Bug: dawn:1214
Change-Id: I56f29fdef912b0857b33bb81d391a82702750b47
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71360
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
VulkanImageWrappingTestsOpaqueFD already has the same fixes, but
sadly didn't get applied to VulkanImageWrappingTestsDmaBuf.
DawnTest::Setup() and TearDown() are missing so the device isn't
initialized.
The expected values in CopyTextureToBufferSrcSync are wrong.
Bug: dawn:1210
Change-Id: I3810a626d840573ab7c1fa75ba7ca239e7288c3e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71245
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
To help debug a suspect crash in these functions.
Also, change some of the counter checks to use more
Objective-C style checks instead of std::find.
Bug: dawn:1102
Change-Id: I693d1f2489116200b2c0608ca60bc3eb8ddb8571
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71242
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Hao Li <hao.x.li@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
The Depth16Unorm format has been implemented at
https://dawn-review.googlesource.com/c/dawn/+/62420, we can add it to
kAllTextureFormats and kDepthFormats in utils/TextureUtils.h.
Bug=dawn:570
Change-Id: I5abf845341debc1d6881c639bc400c40b14fc3bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70900
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This reverts commit 610f184fd9.
Reason for revert: Crashes still happen even with this guard.
Testing shows that counterSets being null does not cause crashes.
Original change's description:
> Add a guard for MTLDevice.counterSets being null.
>
> This is a tentative fix for a segfault that's happening on
> metal::Adapter initialization on some systems.
>
> Bug: dawn:1102
> Change-Id: Iff31e46420e60cd76ecbbfa92bd5b5906ca89cf4
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/69340
> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:1102
Change-Id: Ia7d7428acee552a107425c774ba15e97bf170e38
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71241
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
All of these root constants are set when a bind group holding
dynamic storage buffers is applied. This could be improved by
using reflection data to only set constants that are needed
in the shader. This will require adding a way to store the
reflection information in the blob cache.
Bug: dawn:429
Change-Id: I3afce6b781ec5a82d5d0bafb6720d368b82c1b00
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/68600
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Add undef Bool for xlib_with_undefs.h
Also fix a link in perf_tests/README.md
Change-Id: I83718b2014b6fe2bdfbd82b248d358abbd463abb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/65223
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
- Adds system utility to get the module directory for dawn native.
- Updates Vulkan backend to use the module directory to find loader.
- Test ran on NVIDIA GTX 1660 here: https://chromium-swarm.appspot.com/task?id=576d77991add7c10.
Bug: dawn:1191
Change-Id: I7c577008b5252ac94f38c8cdb56f7e8d8a0aa956
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70860
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Changing Mac version from 10.15 to 10.15|11
Also removes realms experiment, since it is no longer active and
lucicfg was emitting a warning about it.
BUG=chromium:1273555
Change-Id: I5004b6cfe27584f43f10325bf43464e758802f2f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71221
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>