This CL deprecate Discover[Default]Adapters and replace them with
Discover[Default]PhysicalDevices. This help clearify the behavior of
discovering physical devices and requesting / getting adapters, and
prepare for adding adapter toggles in GetAdapters.
Related end-to-end tests AdapterDiscoveryTests are split into
PhysicalDeviceDiscoveryTests and AdapterCreationTests as well.
Bug: dawn:1774, dawn:1495
Change-Id: Iac3d9da3022e5eb3c6dd6b3e3b2224f523792289
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133968
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Change-Id: I049bc6499f22ddb359b9d4701eaa5df31f5a652a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134340
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
On D3D12, there is a limit of the number of texels in a buffer which is 1<<27. See D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP and the spec. This patch limits it according to the spec in case of D3D12 in MaxLimitTests.cpp. This fixes MaxLimitTests failure on Arm device.
Bug: dawn:884
Change-Id: Ia14ebca92855ec7b7e8d81b7bd547108948da567
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133961
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Min Lee <lemi@microsoft.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This is a small refactor in preparation for exposing GetCurrentTexture
on the SwapChain.
Bug: dawn:1551
Change-Id: I7cc8ec4a9042f48c4af7b2cc2126b1d9248a2003
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133462
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
This is an internal usage only used for barriers management in some
backends, and doesn't need to be exposed publicly.
Fixed: dawn:1535
Change-Id: I0474977227230acbf7dd3cfa91bf589ffd9464fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133460
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This binds UAV slots all together at the same time.
Bug: dawn:1816
Bug: dawn:1705
Change-Id: Iea7af9cf00caf126a3964cc43bbf2162b35f80e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132600
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Chrome needs to get a ID3D11Device for DComp
Bug: dawn:1705
Change-Id: Ia6a586a38f381b7fddcbc94fe41a7011af59b333
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133780
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
TimestampQueryTests.ResolveTwiceToSameBuffer fails on Mesa driver >=
21.2.0 and D3D driver >= 31.0.101.3413 on Intel Gen12 GPUs due to driver
bugs with different root causes, but the workaround of clearing
destination buffer before resolving queries works for both.
Bug: dawn:1546, dawn:1823
Change-Id: I3f20a9100f4b6d3386e9685b351ad4fed69195bd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133284
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
`namespace dawn {` was written before some #includes
Bug: dawn:302
Change-Id: I1f0e507f63cc47b180d2021cf859d7964cfa4613
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133622
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@google.com>
Kokoro: Austin Eng <enga@chromium.org>
DAWN_DEBUG_BREAK_ON_ERROR executes dawn::BreakPoint inside
ErrorData::Create so that an application can inspect their callstack
immediately when an error is generated.
Bug: dawn:1789
Change-Id: I3f31b9713414d31b69ed469474e0f3c0f714540a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133562
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
- Adds the feature and the major backend supports.
- Adds initial validation testing.
Bug: dawn:1664
Change-Id: I9918c3de8cce379319d3d1877e45c51acb388961
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133281
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Jones <bajones@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Bug: dawn:302
Change-Id: I8af045c609d1552c491d6e6f48b13b172172c2ab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133520
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Bug: dawn:302
Change-Id: I91c9dd26456c7f7b8b72a24c332d1aae053fd73d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133365
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Austin Eng <enga@chromium.org>
Kokoro: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
- Before since it was in the TearDown, cleanup can be called before
the device was gone which meant that async tasks could still be in
flight.
Bug: dawn:1374
Change-Id: I4cd5a4e096a3fe13e230197a6a4d4d57daea31c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133480
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Only Constants.h remains in no namespace; but it may be addressed
in the future as well.
Bug: dawn:302
Change-Id: Ib9b9ab4b974ad1de1bb9f2302f4d24d8216f55e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132841
Kokoro: Austin Eng <enga@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This change updates the Device descriptor to allow a device lost
callback to be passed in at device creation time. This will be
important for allowing the API to return devices which have
already been lost in a future CL, which is the behavior required
by the spec.
This change does not yet deprecate the old method for setting the
callback, as there's still some tricky scenarios that will need to
be worked around to enable that and this CL is already fairly
large. (The uses in question pass the device or a value created
from the device as the userdata.)
Bug: chromium:1234617
Change-Id: I1adea5ceffdfdcfedff9fff4960f12303abba29c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121041
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This will allow for both AST transforms and IR transforms to be used
in the same transform manager.
The transform manager is no longer a Tranform subclass.
Bug: tint:1718
Change-Id: I59bd87806090fa365ce4b575710c5ffcfc657bd8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132501
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Notes:
- Separates ChainedStruct to be reusable without cpp header. (Also
updates native structs to directly use it.)
- Manually implements the descriptor in DawnNative.
- Reworks ChainUtils with mapping from struct to STypes.
- Updates the tests to use either SetPlatformForTesting which is still
required because DawnTest uses a "global" instance for all tests and
some tests require setting (and cleaning up) a test specific platform.
Bug: dawn:1374
Change-Id: I078c78f22c5137030cf3cf0e8358fe4373ee9c6c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132268
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Add custom C++ serializer for methods that need to be handwritten
Bug: chromium:1374747
Change-Id: I438db05b6fd6d1a1542d847c4b40f22b9143b0d5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114721
Commit-Queue: Brendon Tiszka <tiszka@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
RTV and UAV in d3d11 pixel shaders share the same resource slots. To
avoid any potential conflicts, this assigns UAV slots reversely.
Bug: dawn:1807
Bug: dawn:1705
Change-Id: Ie0ca20aa0e532736c0534c6810b8a807dde6f972
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132274
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Implements C++ serializer implementation that translates protobuf
objects into Dawn serial data.
1) A generator that builds a fuzzing harness that converts LPM structured data
into serialized bytes, that are then sent to Dawn Wire Server.
2) Object store for dawn objects that are allocated and
freed.
Bug: chromium:1374747
Change-Id: I09c1be6cdc2eccf4a91de808f19494d97d01b3d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/114720
Commit-Queue: Brendon Tiszka <tiszka@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Bug: chromium:1443658
Change-Id: I9a0fe75cacf31b5b22cd89468af2c854079a19a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132900
Kokoro: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
In Vulkan, unclippedDepth is currently implemented as depthClamp=true,
depthClipEnable=false. However, depthClamp=true will implicitly
disable depth clipping if no
VkPipelineRasterizationDepthClipStateCreateInfoEXT is specified. This
allows us to support depth-clip-control on devices without
VK_EXT_depth_clip_enable.
Change-Id: I27c81da34dc3c72e31118cd858f92d9fdfae83e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132620
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
failing with DXGI_ERROR_DEVICE_HUNG
Bug: dawn:1812
Change-Id: Ib76d91784e9ec1102427c7b4468e9d4a214f99ec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132560
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
This validation existed for render passes but not for compute passes,
and it's not clear why.
Bug: dawn:1809
Change-Id: I8babb6ddf455a915f5a0c85ad1a7d741fdb467a8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132481
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
All AST transforms live inside this namespace. There will be a
corresponding ir::transform namespace for IR transforms.
Change-Id: I543972451c08e7df5632b835257999a8af3701d1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132424
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
If vertex buffer is null, SetVertexBuffer() actually unset that
buffer slot. This is a new feature in WebGPU. This change adds
validations and unittest in order to support this feature.
Bug: dawn:1675
Change-Id: Ia3e5d4196423590ff5b60ea78cc1e8cdd9c67d15
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/124842
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>