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>
FXC sometimes miscompiles code when optimizing (/O2), and there is no
discernable workaround. This change sets the optimization level to /O0
when compiling shaders with FXC.
Also, no longer default to enabling EmitHLSLDebugSymbols in Debug
builds, which disabled optimizations (/Od). This confused me a few
times, and is not necessary since we can set this toggle via command
line.
Bug: dawn:1203
Bug: tint:1175
Bug: tint:1112
Change-Id: Ide9e6ecd45adeca951b8836dee91a8367eca3769
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70700
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.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>
- Turns internal cache into a pointer so that we can deallocate it earlier for the destroy.
Bug: dawn:628
Change-Id: I69fd1e4be5ed5d8b7a28efebd9c2852bab3224b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70182
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Previously we would only discover 1.0 or 1.1, meaning that extensions
promoted to core in 1.2 wouldn't be properly discovered.
Bug: chromium:1269882
Change-Id: I38bc211a3358158ba5eccd6b361e4b1173e047fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70640
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>