Changes Device::Tick to return a boolean that denotes whether or not
Tick needs to be called again.
Bug: dawn:119
Change-Id: I9d4c7e291536d676b33fc61d652667c1fbff8c62
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29980
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Now that the command serialization knows to no-op if
GetCmdSpace returns nullptr, when the wire is disconnected,
we can replace it with a no-op serializer that always returns
nullptr.
Bug: chromium:951558
Change-Id: I7363fd10f529119e515eda0e743e1a7839049b9b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
The variable use_x11 in Chromium takes into account more thinks like
whether we are building in LaCrOS mode and more. If we don't do this,
compilation of Chromium fails when Dawn tries to include X11/Xlib.h
Bug: chromium:976495
Change-Id: I8b4e865f50f60235466c8ba72683927124aa094e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30220
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Previously Format::Type was used instead of wgpu::TextureComponentType
so that ::Other could server as a tag value. This was confusing and
almost the single use of ::Other.
In a follow-up CL the format baseType is changed to be a per-aspect
value, and Format::Type. This CL is a self-contained step in that
direction.
Bug: dawn:527
Change-Id: Ida834087f45a8fca17670ffe8ebd4d5c4f1cd423
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30102
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
In follow-up CLs the aspect of texture views becomes more important as
it is used to query the texture format's base type and supported
componenet types.
Previously asking for the AspectInfo for wgpu::TextureAspect::All could
be ambiguous for depth-stencil formats. By using the internal bitfields
the constraint is much more clear that a single bit must be set.
Bug: dawn:527
Change-Id: Iebff40f28c4a6c38ebe5a7cccf62f8ab3363e4e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30101
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
In follow up CLs additional will be added to the AspectInfo, like the
supported component types.
Also simplify the logic for GetTexelInfo since all aspects are the first
aspects, except stencil which is always stencil8.
Bug: dawn:517
Change-Id: Iebbcb8a7f8fa2c4b7b06f65d6e4e8917c0a85366
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30100
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
And use it to print the driver version at the start of
dawn_end2end_tests. This will help when figuring out issues
happening on CQ but not necessarily locally.
Bug: None
Change-Id: Ibdb9ab8cab53cc1e1cf8a807da53edeca616bed9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29602
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL adds support for chunking large commands by first serializing
large commands first into a separate buffer, and then sending the
buffer data chunk by chunk.
This code path is used for large writeBuffer and writeTexture, as well
as the inline memory transfer service for buffer mapping. The transfer
for writeBuffer and writeTexture will be optimized further in Chrome,
and the inline memory transfer service is currently used only in tests.
Bug: chromium:1123861, chromium:951558
Change-Id: I02491a44e653e2383174958d9c3d4a4db6fd7bde
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28882
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This also removes an unused param from the ValidateSPIRV method.
BUG=dawn:543
Change-Id: I369a8097ef49751cedbe6605989750a292027b6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29842
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Use QueueBase to track fences in flight and map requests so that they
can be resolved in the order they were added. Before these tasks were
separately tracked in FenceSignalTracker and MapRequestTracker, so tasks
would be resolving out of order.
Bug: dawn:404
Change-Id: I8b58fb72c99f43bc4593f56e08920d48ac506157
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29441
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Natasha Lee <natlee@microsoft.com>
This allows empty scissors, so add a test for it.
This disallows scissor boxes that are bigger than the renderpass
attachment so remove an end2end test for that behavior.
Update the SetScissorRect validation tests.
Bug: dawn:542
Change-Id: I5b8578a4df1b94510a9356bd4007efddf2711588
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29820
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
- Add WriteTimestamp and ResolveQuerySet on Metal
- Enable end2end tests of timestamp query on Metal
- Lazy initialize the distination buffer in ResolveQuerySet
- Update part of end2end tests to test from render pass instead of
command encoder due to we cannot write timestamp on CommandEncoder
without any copy commands on Metal.
Bug: dawn:434
Change-Id: Ie9217e1f5a00bc252d6293ef7521c2e343ba9259
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29020
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Hao Li <hao.x.li@intel.com>
As a side-effect this allows empty viewports which need special handling
in Vulkan because it is not allowed to set width to 0 (but ok to set
height to 0).
Validation tests are updated to cover the new validation checks.
Most of the viewport end2end tests are rewritten because they didn't
pass the new validation.
A new end2end test is added to test various kinds of empty viewports to
cover the extra logic in the Vulkan backend.
Bug: dawn:542
Change-Id: I8bb25612eeed04162a6b942983167eacab3a1906
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29681
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Use "protected" rather than "private" for the using declarations.
Bug: dawn:544
Change-Id: I1166016fd11d9e2b512f08194f4f4c3f628d0c27
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29845
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This is to match the upstream WebGPU spec.
Bug: dawn:445
Change-Id: I1a511ed9a2a04c7b95368ce724d69c128158f097
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29360
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The upstream Tint issues have been fixed and Tint has rolled. This CL
re-enables the disabled test.
Bug: tint:263
Change-Id: Id8a73e198c15c74c55dc9b26603f4a3850d995b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29680
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is to match the upstream WebGPU spec.
Bug: dawn:445
Change-Id: I4246487247fdba8d90a119c1970d6d4df3235835
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29361
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This can be used to simplify some logic in Blink.
Bug: dawn:445
Change-Id: I9859c51bc95f564847035533426675188eb8ef99
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29362
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This is a reland of b04a92f01b
with the deletion of a duplicate exported function in dawn_wire that
was causing a compilation failure on Windows.
Original change's description:
> Add a per-thread proc table using thread local storage
>
> In situations where both dawn_wire and dawn_native are used on separate
> threads (Chrome with --single-process or --in-process-gpu), it's
> desirable to have a per-thread proc table so that the WebGPU C++ API can
> still be used. This eliminates classes of bugs with manual
> reference/release errors.
>
> This also changes many of the GetProcs functions to return const
> references to the static proc tables known at compile time, instead of a
> copy.
>
> Bug: none
> Change-Id: I8775bb715b312dd9476a1903fbd797d4b1302614
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29240
> Reviewed-by: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
Bug: none
Change-Id: Id90e5372132cd93a2f8631c8185d0e71b01bc1af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29443
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
The OSX machines in "luci.flex.try" pool that run Dawn tryjobs
have been upgraded from OSX 10.14 to OSX 10.15. Per [1],
the preferred Xcode version on OSX 10.15 is '12a7209' and most
tryjobs (from other projects) install that version. But when
a Dawn tryjob runs, it rolls Xcode back to '11b52'. Reinstalling Xcode
back and forth like that takes time (~20 min), it caused some tryjobs
in the "infra" project to timeout.
Unhardcode Xcode version in Dawn configs. It should allow the recipe
to pick the "best" version ('12a7209' in this case).
[1]: https://source.chromium.org/chromium/chromium/tools/depot_tools/+/master:recipes/recipe_modules/osx_sdk/api.py;l=21?q=11b52&ss=chromiumR=cwallez@chromium.org, tandrii@chromium.org
Change-Id: I8499a763679b9e9270854bf66c2a21f1e6354594
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This reverts commit b04a92f01b.
Reason for revert: Build failed on win-archive-dbg; see:
https://chromium-review.googlesource.com/c/chromium/src/+/2450792
Original change's description:
> Add a per-thread proc table using thread local storage
>
> In situations where both dawn_wire and dawn_native are used on separate
> threads (Chrome with --single-process or --in-process-gpu), it's
> desirable to have a per-thread proc table so that the WebGPU C++ API can
> still be used. This eliminates classes of bugs with manual
> reference/release errors.
>
> This also changes many of the GetProcs functions to return const
> references to the static proc tables known at compile time, instead of a
> copy.
>
> Bug: none
> Change-Id: I8775bb715b312dd9476a1903fbd797d4b1302614
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29240
> Reviewed-by: Stephen White <senorblanco@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
TBR=cwallez@chromium.org,senorblanco@chromium.org,enga@chromium.org
Change-Id: I4587b457b7b2dd5d3c7457065bf4e77b95af59d7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: none
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29442
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
In situations where both dawn_wire and dawn_native are used on separate
threads (Chrome with --single-process or --in-process-gpu), it's
desirable to have a per-thread proc table so that the WebGPU C++ API can
still be used. This eliminates classes of bugs with manual
reference/release errors.
This also changes many of the GetProcs functions to return const
references to the static proc tables known at compile time, instead of a
copy.
Bug: none
Change-Id: I8775bb715b312dd9476a1903fbd797d4b1302614
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29240
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>