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>
In the WebGPU specification, validation errors for mapAsync take
precedence over the early-unmap or early-destroy promise resolution.
Change the client to wait for the mapAsync status from the server before
sending the cancelation through the callback. If the server sends back
an error, then it takes precedence over the client-side status.
Also adds tests for the updated semantic.
Bug: dawn:445
Change-Id: I7bf1d8bbb3cb62d73ab19ecdf0aad2963e854964
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29300
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
ValidateOrSetAttachmentSize() was asserting that
textureSize.width >> attachment->GetBaseMipLevel() is nonzero.
This is not true for rectangular textures, where the smaller dimension
may hit the lower bound and must be be clamped at 1.
Fixed by calling GetMipLevelVirtualSize() which performs the clamp.
Added a test which exercises rectangular mipmapped textures as color
attachments. This required a few fixes to the test harness, which had
the same bug as that fixed in the code (assumes (width >> size) > 0).
Bug: dawn:535
Change-Id: Idde3b68feb14d8a241803d09a094b059d9935d91
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29261
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Adds validation to ensure clear colors do not exceed 2^24 and a
corresponding unit test. Also removes intermediate float conversions
that are no longer necessary.
Bug: dawn:525
Change-Id: I020b98de85384c20da51158de79eab87f60dcf6d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29040
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Since we are intending to ship using Tint for normalization, fuzzing
should include this transform.
BUG=dawn:531
Change-Id: Ica25c3bbdc6ff392d5e31361734de43fd1c12815
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
For sampling, check that formats without 4 components sample them as
(0, 0, 0, 1) instead. For rendering, check that extra components output
by the shader are ignored.
Bug: None
Change-Id: Ib49fcaa58e984d821667e992d3ddb1bb093bdba0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29061
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This has been fixed by the layout transition fixes. The dedicated
memory bug doesn't seem relevant at this time.
Bug: dawn:200, dawn:206
Change-Id: I953a20850881f64f5ff5ddbede9aed3a835d22da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29123
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Fixed in the roll of Swiftshader.
Bug: dawn:483
Change-Id: I8baad1d8d61e7b99c01dc27f929da830ca30c8d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29081
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This will prevent mixing it up with other serial types in the future.
Bug: dawn:442
Change-Id: I74e964708acc62eb0f33127cc48f1b9a7b171d11
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28923
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This will prevent mixing it up with other serial types in the future.
Bug: dawn:442
Change-Id: Ia1ec00572fa268e48349f7d9e39234ec8f5d3953
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28961
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This will prevent mixing it up with other serial types in the future.
Bug: dawn:442
Change-Id: I32f356c62f19ef29f3bf51c19873369fb817bb16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28960
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This will prevent mixing it up with other serial types in the future.
Bug: dawn:442
Change-Id: I1cdb35ee01be3c771183003bc357c84d46aa5745
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28922
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This will prevent mixing it up with other serial types in the future.
Bug: dawn:442
Change-Id: Ie655d57722fcd79c82acc5aac429aed2c2741c3e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28920
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This is in preparation for follow-up CLs that will use typed integers
for the various serial types.
Bug: dawn:442
Change-Id: I5296546e96acd6ac9f7a0bfc46dc7eba40cb3cf5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28921
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds two new buffer map async status "destroyed before
callback" and "unmapped before callback" to replace the status "unknown"
so that the developers can get more details when meeting such errors in
the call of buffer mapAsync.
Note that this patch still preserves "unknown" as it is still being used
in Chromium.
BUG=dawn:533
TEST=dawn_unittests
Change-Id: I12deefb49311ea6adea72c24e4e40797dd7eb4a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28883
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
A lot of our switches over enum values use the following pattern:
default:
UNREACHABLE();
return foo;
This is problematic because when adding a new value to one of the WebGPU
enums, there is no compilation error for switches that are missing it.
Currently we're supposed to write code and tests and fix UNREACHABLEs when
we see them.
Instead we should strive to have most switches on enums to be complete
and explicitily tag unreachable values as UNREACHABLE. Some switches
might still want to use default: UNREACHABLE() if only a couple values
need to be handled out of very many.
In this CL we go through all the UNRAECHABLEs and change them if need
be. Also an ErrorQueue class is added to avoid having
QueueBase::SubmitImpl just be UNREACHABLE (and force overriding
instead).
Bug: dawn:527
Change-Id: I33dfb4703104912cc5f001f9faf907a61324de68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28501
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This function was bit long and was difficult to read. Refactor it to use
a single double keyed map and helper functions.
Bug: dawn:527
Change-Id: I8c1173fd0e06256c7e7060a850996e1e90187d50
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28640
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
In B2T, T2B and T2T copies, copySize has 0 in width, height or depth
will trigger errors in D3D12 backend.
This patch bypass the command record step for noop copy. But all
validation rules still applies to the copy.
BUG=dawn:255
Change-Id: I4d01cef2e3c1f78440014c2c6ac63a48310d99af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28521
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Returning the layouts from an export operation and then using
them in a subsequent import operation allows the import to preserve
the texture contents.
This fixes Vukan image wrapping on some AMD/NVIDIA devices.
Bug: dawn:200
Change-Id: Icbb6e759856d410bb69724b9f439bc3088756d19
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28380
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Change dawn.json to reflect changes in the WebGPU IDL. Also fixes any
conversion issues in Dawn.
Bug: dawn:525
Change-Id: Ifb46329f073bcf31d43342f20f4819eac061d5a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28400
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
This reverts commit 52a588f3c9.
Reason for revert: added a workaround to filter out messages.
Original change's description:
> Disable debug layer logger
>
> This logger is producing too much output on Windows and causing
> Chromium's gtest harness to kill the tests.
>
> Tbr=cwallez@chromium.org
> No-Try: true
> Bug: chromium:1130483
> Change-Id: I1990bc800bbb7eda62901d14f656375c30fbeef2
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28740
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
TBR=cwallez@chromium.org,enga@chromium.org
Bug: chromium:1130483
Change-Id: Ifeee73838a957f619dfdb977f21585fe8abacc3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28760
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
It was using a lot of calls to helper functions full of switches that
were hiding the logic that's relatively simple.
Bug: dawn:527
Change-Id: Iaf2603efa255df5ba2f44989b5375d433f04d5df
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28561
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Instead of calling validation functions directly in
PipelineLayoutBase::CreateDefault, use ValidateBGLDesc and
ValidatePipelineLayoutDesc.
Also makes the visibility of the default layout match the aggregation as
in the WebGPU spec.
Also makes refcounting of BGLs a bit less manual at the bottom of
CreateDefault.
Also adds tests for minBufferBindingSize and visiblity aggregation in
the default layout computations.
Bug: dawn:527
Change-Id: I6bbd5f3de8b235dddf6cbd2bedfd34a094fcb277
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28560
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This logger is producing too much output on Windows and causing
Chromium's gtest harness to kill the tests.
Tbr=cwallez@chromium.org
No-Try: true
Bug: chromium:1130483
Change-Id: I1990bc800bbb7eda62901d14f656375c30fbeef2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28740
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
These warnings are used in Skia.
Bug: None
Change-Id: I1948f448a89b0c213ce1aacd6bb8532f90d399be
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28160
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
It isn't in the upstream WebGPU spec and completely unimplemented in
Dawn.
Bug: dawn:527
Change-Id: I2023c7b1de2a9fa50d26ab1678b7ef7e32c64af6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28500
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
D3D debug layer uses the descriptor size (width) to
validate CBV bounds when directly allocating UBOs.
This causes validation failure when the buffer size
is misaligned (ie. not a multiple of 256B) even
through the underlying resource heap size is always
64KB aligned.
This change always aligns the buffer size to be 256B
to avoid such validation error should sub-allocation
fail.
BUG=dawn:506
Change-Id: Ic9072934cac65cfd25d0e2a20cb364bd3ca88e3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/26820
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
In addition to adding the pass running logic, how shaders are stored
in the ShaderModule is changed, so that cached shader that was used to
create the ShaderModule is differentiated from the
modified/intermediate shader that is actually being passed to
SPIRV-Cross.
Also rolling SPIRV-Tools to pick up a fix for a bug I discovered in
the RBA pass implementation.
Roll third_party/SPIRV-Tools/ fd05605be..34ef0c3fd (25 commits)
fd05605bef..34ef0c3fdc
$ git log fd05605be..34ef0c3fd --date=short --no-merges --format='%ad %ae %s'
2020-09-16 rharrison Fix missed modification flagging (#3814)
2020-09-16 andreperezmaselco.developer spirv-fuzz: Use an irrelevant id for the unused components (#3810)
2020-09-16 stefanomil spirv-fuzz: Improvements to random number generation (#3809)
2020-09-16 greg Add buffer oob check to bindless instrumentation (#3800)
2020-09-16 vasniktel spirv-fuzz: Remove CanFindOrCreateZeroConstant (#3807)
2020-09-15 andreperezmaselco.developer spirv-fuzz: Add bit instruction synonym transformation (#3775)
2020-09-16 vasniktel spirv-fuzz: Skip unreachable blocks (#3729)
2020-09-15 afdx Fix build errors (#3804)
2020-09-15 vasniktel spirv-fuzz: Handle invalid ids in fact manager (#3742)
2020-09-15 vasniktel spirv-fuzz: Support memory instructions MoveInstructionDown (#3700)
2020-09-15 stefanomil spirv-fuzz: Pass submanagers to other submanagers when necessary (#3796)
2020-09-15 stefanomil spirv-fuzz: Transformation to flatten conditional branch (#3667)
2020-09-14 46493288+sfricke-samsung spirv-val: Add BaseInstance, BaseVertex, DrawIndex, and ViewIndex (#3782)
2020-09-14 dnovillo Properly mark IR changed if instruction folder creates more than one constant. (#3799)
2020-09-11 afdx Add missing file to BUILD.gn (#3798)
2020-09-11 antonikarp spirv-fuzz: Add TransformationDuplicateRegionWithSelection (#3773)
2020-09-11 afdx spirv-reduce: Support reducing a specific function (#3774)
2020-09-10 afdx spirv-reduce: Refactoring (#3793)
2020-09-10 afdx Favour 'integrity' over 'coherence' as a replacement for 'sanity'. (#3619)
2020-09-10 antonikarp spirv-fuzz: Fix header guards in transformations/fuzzer passes (#3784)
2020-09-10 paulthomson spirv-fuzz: Add SPIRV_FUZZ_PROTOC_COMMAND (#3789)
2020-09-10 paulthomson Add missing include (#3788)
2020-09-09 paulthomson Improve spirv-fuzz CMake code (#3781)
2020-09-08 stevenperron Allow SPV_KHR_8bit_storage extension. (#3780)
2020-09-08 stefanomil spirv-opt: Add function to compute nesting depth of a block (#3771)
Created with:
roll-dep third_party/SPIRV-Tools
BUG=dawn:523,dawn:480
Change-Id: I1f424f5fe6d67999412f286e831ea2ea26372b9e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/28540
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>