Explictly turned off for Skia, since it does not yet have Tint in its DEPS.
Roll third_party/tint/ e8c12f32f..c5cd8f5bd (3 commits)
https://dawn.googlesource.com/tint/+log/e8c12f32f9a9..c5cd8f5bd382
$ git log e8c12f32f..c5cd8f5bd --date=short --no-merges --format='%ad %ae %s'
2020-07-28 rharrison Remove binutils from DEPS and pull in changes to build.gni from Dawn
2020-07-28 rharrison Get 'gn gen --check' passing
2020-07-28 idanr Fix Tint ninja build
Created with:
roll-dep third_party/tint
BUG=tint:123
Change-Id: Icd26c2d1b7329c94afa6f23c5c057de8efaee3e8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25523
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Hopefully works around an issue where some Metal drivers treat warnings
as errors.
Bug: dawn:493
Change-Id: Ia535502a14fd4215ff74eee2662dfbde7e01bc4b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25841
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This inverts the shimming to have the old mapping at creation method
be implemented on top of the new method..
Also updates Wire tests to use mappedAtCreation instead of
CreateBufferMapped.
Bug: dawn:445
Change-Id: I77dcfe72040e5bf187c41fe99c8dd785d5156a07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25701
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This inverts the shimming to have the old mapping entrypoints be
implemented on top of the new mapping entrypoint.
Bug: dawn:445
Change-Id: I98c81b2873d506790b1b19048c5289c62d1b83ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25700
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This is a temporary change to unblock Tensorflow.js until we
expose querying and setting GPULimits.
Bug: none
Change-Id: Iad851b2be260e9fade7c326bc7fcde39b46cf7fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25840
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
E2E tests fail to pass with backend validation. Disable these tests
until there is resolution from the investigation.
BUG=dawn:462
Change-Id: I0325bafb31cc706be122a601ecfe154bf8880b5b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25680
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Some tests are not enabled in D3D12 yet because SPIRV-Cross lacks
support for gl_SampleMask.
Bug: dawn:491
Change-Id: I6cce56b5d0ab883f39b8d58987246c08a23b6410
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25580
Reviewed-by: Tomek Ponitka <tommek@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Added the sampleMask functionality in Vulkan with some
end2end tests including tests for the shader-output
mask.
Bug: dawn:491
Change-Id: Ib39682d8857729adb4776bc2f2d8e759bf75677b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25340
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This reverts commit e1d976ed91.
Reason for revert: crbug.com/tint/123
Original change's description:
> Turn on WGSL support by default in Dawn
>
> Tint is available in Chromium now, so we can turn this on. For situations were
> WGSL support is not needed it can still be turned off via args.gn.
>
> Roll third_party/tint/ 16890b9ce..13904a612 (15 commits)
>
> https://dawn.googlesource.com/tint/+log/16890b9ce8b7..5f43fedcd
>
> $ git log 16890b9ce..5f43fedcd --date=short --no-merges --format='%ad %ae %s'
> 2020-07-16 rharrison Clean up how deps are defined in BUILD.gn
> 2020-07-16 dsinclair Remove refs.cfg.
> 2020-07-16 dsinclair Fixup group list name
> 2020-07-16 dsinclair [msl-writer] Emitting of program constants.
> 2020-07-16 dsinclair [msl-writer] Fixup matrix and array constructors.
> 2020-07-16 dsinclair Differentiate size and stride in array type name.
> 2020-07-16 dneto [spirv-reader] Support duplicate type definitions
> 2020-07-15 dsinclair [msl-writer] Add struct offset support.
> 2020-07-15 dsinclair [msl-writer] Add builtin support
> 2020-07-15 dsinclair Add helpers for referenced variables.
> 2020-07-15 dsinclair [msl-writer] Refactor some entry point variable code.
> 2020-07-15 dsinclair [msl-writer] Generate entry point functions.
> 2020-07-14 dsinclair [msl-writer] Handle emitting user function calls.
> 2020-07-14 dsinclair Inherit refererenced globals up the call stack.
> 2020-07-14 dsinclair [msl-writer] Generate input/output structs
>
> Created with:
> roll-dep third_party/tint
>
> Change-Id: Ia437e8dc309b06a64ddd4d91ec3af1499af13553
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24920
> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
> Reviewed-by: dan sinclair <dsinclair@chromium.org>
> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org,dneto@google.com,rharrison@chromium.org,dsinclair@chromium.org
Change-Id: I21513d5b5d461eccd42aa650fa4b46e85daf642f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25480
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Tint is available in Chromium now, so we can turn this on. For situations were
WGSL support is not needed it can still be turned off via args.gn.
Roll third_party/tint/ 16890b9ce..13904a612 (15 commits)
https://dawn.googlesource.com/tint/+log/16890b9ce8b7..5f43fedcd
$ git log 16890b9ce..5f43fedcd --date=short --no-merges --format='%ad %ae %s'
2020-07-16 rharrison Clean up how deps are defined in BUILD.gn
2020-07-16 dsinclair Remove refs.cfg.
2020-07-16 dsinclair Fixup group list name
2020-07-16 dsinclair [msl-writer] Emitting of program constants.
2020-07-16 dsinclair [msl-writer] Fixup matrix and array constructors.
2020-07-16 dsinclair Differentiate size and stride in array type name.
2020-07-16 dneto [spirv-reader] Support duplicate type definitions
2020-07-15 dsinclair [msl-writer] Add struct offset support.
2020-07-15 dsinclair [msl-writer] Add builtin support
2020-07-15 dsinclair Add helpers for referenced variables.
2020-07-15 dsinclair [msl-writer] Refactor some entry point variable code.
2020-07-15 dsinclair [msl-writer] Generate entry point functions.
2020-07-14 dsinclair [msl-writer] Handle emitting user function calls.
2020-07-14 dsinclair Inherit refererenced globals up the call stack.
2020-07-14 dsinclair [msl-writer] Generate input/output structs
Created with:
roll-dep third_party/tint
Change-Id: Ia437e8dc309b06a64ddd4d91ec3af1499af13553
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24920
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Set apiVersion to Vulkan 1.0 if the instance only supports
Vulkan 1.0. Otherwise set apiVersion to Vulkan 1.2, treat
1.2 as the highest API version dawn targets.
Bug: dawn:426
Change-Id: I322eaa0a93a518df36b86717c2ed5a98c5d056ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25065
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
This patch adds the check and implementations of buffer lazy
initialization before CopyBufferToTexture().
The support of buffer lazy initialization before CopyTextureToBuffer()
is much more complicated than what we do for CopyBufferToTexture(), so
we decide to put it in another CL instead of writing them together with
CopyBufferToTexture().
BUG=dawn:414
TEST=dawn_end2end_tests
Change-Id: I45fdcdde2c9a0dafff23623815fc35c877990ef1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25140
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
The CL that added offset/size args landed about the same time
as the CL that adding zero init mapping tests (without the args).
Tbr=cwallez@chromium.org
Bug: dawn:445, dawn:414
Change-Id: I388399d425c3a3c12be79b160686caaf3d81a89c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25162
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This should not be necessary as the command pool should own the
memory if it was created without the creation flag
VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT. However, some drivers
leak memory if vkFreeCommandBuffers is not called.
Bug: chromium:1082181
Change-Id: Ia437fc17b2a304a248b9227b43cfff1868f9f10e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25062
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Depth texture values outside the 0-1 range are not supported without
an extension.
Bug: dawn:413, dawn:367
Change-Id: I75e7f0de054d6f9a4bac7c6b955c65db810fe36e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24681
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Projects using Dawn that are compiled with Emscripten may use some
of our common headers and utilities. ex.) creating a ShaderModule
from SPIR-V. Add handling for __EMSCRIPTEN__ to Platform.h so
compiling to WASM works.
Also, implement GetExecutablePath on Emscripten as unreachable.
This is only ever used to search native paths in the Vulkan backend.
Bug: none
Change-Id: I5d9d6e27e287cb34e7af3214add1c4bc8c6a0f70
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25064
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Added an additional alignment on the staging buffer offset in
WriteTexture on Vulkan to match
VkPhysicalDeviceLimits::optimalBufferCopyOffsetAlignment.
We now allocate some additional memory in the staging buffer for that
purpose.
Bug: dawn:483
Change-Id: Ic5b95aa57f6c241e0ab9f9853b4c3152e52e5630
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24982
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Changed the order of validation blocks in ValidateLinearTextureData.
It doesn't match the order in spec now, but for the algorithm to
compute required bytes in copy we need the conditions which come
after the ones relating to it. Also switched the order of
ValidateLinearTextureData and ValidateTextureCopyRange for similar
reasons.
Bug: dawn:483
Change-Id: If00ae769d170ea12494258721916ec55d79e2880
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25041
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch implements buffer lazy initialization beffor MapAsync() and
buffer creation with BufferDescriptor.mappedAtCreation == true.
Note that this patch doesn't initialize buffers in MapReadAsyc() and
MapWriteAsync() because they are deprecated and will be removed soon.
BUG=dawn:414
TEST=dawn_end2end_tests
Change-Id: Ifea99833897081f599c45797e0829c57de1ac926
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24687
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Fixing an earlier TODO about aligning bytesPerRow in WriteTextureImpl
to VkPhysicalDeviceLimits::optimalBufferCopyRowPitch.
Bug: dawn:483
Change-Id: Ided2d367177f2f886a84f232c77f1f9f0d50d05d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24981
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This changes the format of the server->client callback for async mapping
to match MapAsync. Previously there were two callbacks, one for
MapReadAsync and one for MapWriteAsync.
Bug: dawn:445
Change-Id: I3330c07ac8bb6d1fa9019563e9c946875e852639
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24821
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
vkCreateImage when bound to imported memory, must also have
a VkExternalImageCreateInfo struct in its pNext chain that
has VK_EXTERNAL_MEMORY_HANDLE_TYPE_TEMP_ZIRCON_VMO_BIT_FUCHSIA
as a handleType.
This was discovered when tests started failing after a roll
of the Vulkan validation layers.
Bug: none
Change-Id: Ic7fc95f963062c8740e714a490adf6a020fed220
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25100
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
WebGPU currently allows as many as 108 view descriptors per bind
group. This is too many to have one descriptor allocator per size,
so we need to bucket them by size.
Bug: dawn:443, dawn:488
Change-Id: I4fc8cf7cd0dc8292bb6a8488fd2ceb7575e1e5f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24787
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This changes the format of the client->server command for async mapping
to match MapAsync and updates the doer on the server to implement it via
MapAsync. Previously the command had an isWrite boolean that routed to
either MapReadAsync or MapWriteAsync.
Also updates the Wire tests using mock_webgpu.h for the new server-side
traces.
Bug: dawn:445
Change-Id: I673cbe5e08b7c71539e8678dbb07b4043a9fadb2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24820
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Also removes suppressions for tests that pass after
https://swiftshader-review.googlesource.com/c/SwiftShader/+/46509https://swiftshader.googlesource.com/SwiftShader/+log/ad65826a2ab1..e8dd233c7a85
$ git log ad65826a2..e8dd233c7 --date=short --no-merges --format='%ad %ae %s'
2020-07-16 cwallez Fix B<->T copies of multiple array layers and unpacked rowpitch
2020-07-15 bclayton Regres: Collate and add new documentation for Regres
2020-04-08 natsu Support Gralloc3 in SwiftShader
2020-07-14 swiftshader.regress Regres: Update test lists @ cd0af645
2020-07-13 capn Undefine Bool after the headers that define them
2020-07-11 capn Remove dead ASTC code for GLES
2020-07-09 capn Rename command classes to match API calls
2020-06-04 srisser Add decoder for BC6h
2020-06-15 sugoi Image dirtiness
2020-07-09 amaiorano Android: build against llvm-10 instead of llvm-7
Created with:
roll-dep third_party/swiftshader
Bug: None
Change-Id: Ife6dcf9f832e4aaab40de3bdb62d4b1eb258d2f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/25042
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Fix a couple names in the definition of writeTexture.
Bug: None
Change-Id: I051b6db0db076a1150850b885073cc36d3bd4b0e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24900
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This calls into git cl format, so it should always be consistent with
that.
Removes all the old clang-format scripts and dependencies.
Change-Id: I879577a5c1df81617ec0d33096ce7884f4413659
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24840
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The .clang-format files tell clang-format to ignore certain directories
(replacing code in lint_clang_format.sh which will be removed).
$ git ls-tree -r master --name-only | grep '\.\(c\|h\|cpp\|gn\|gni\|mm\|m\|py\)$' | xargs ./append-space-to-files
$ git checkout -- generator/templates third_party/khronos/{KHR,vulkan}
$ git cl format --full --python
Followed by manual reformatting of a few things in Python for
readability.
Bug: none
Change-Id: I4c9e472cc9a5cd80c07286e808f4e597cfef5428
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24785
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This gives Chromium the option to give Dawn the correct dxgi adapter to use
Bug: chromium:1036711
Change-Id: Ica544d2e76d1c300038fa07b5b639a35c43f60b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24761
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Added implementation of writeTexture in Metal. It's using a
staging buffer instead of writing directly from the CPU to
the texture, because Dawn uses the private storage mode for
most of the Metal textures.
Bug: dawn:483
Change-Id: I6b85ee8bbe343881337bdb203a122dc1f1523177
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24581
Commit-Queue: Tomek Ponitka <tommek@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
GN recently added support for Apple frameworks to link, rather than
overloading the libs lists. This pulls .frameworks out of the libs
lists, so that GN can stop supporting .frameworks in libs in the
future.
Bug: chromium:1052560
Change-Id: I0b57a3c4c995887a57937317db30b67cf7a7f0f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24281
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch optimizes the implementation of buffer-to-texture and
texture-to-buffer computations on D3D12 backends by computing
TextureCopySplits once for all the 2D texture array layers in the
copy instead of computing it once per layer. You can see the
comments in the function D3D12::ComputeTextureCopySplits() for more
details.
BUG=dawn:453
TEST=dawn_end2end_tests
Change-Id: I1b66d24d2418147957fbe03e2c25144bd043a62e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24643
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
kMaxBindingsPerGroup is not a real WebGPU limit. Code in Dawn that
uses it now uses dynamically sized vectors, optimistic stack_vecs or
a different limit like kMaxDynamicBuffersPerPipelineLayout.
The CL introduces kMaxOptimalBindingsPerGroup=32 which is used to size
the static portion of stack_vecs, but the value is tentative.
Bug: dawn:443
Change-Id: I08e06bed6531bed8b4365f36cf2fc0579ac5f180
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23502
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>