This CL modifies code generation so that the generated client procs call
the handwritten methods on client objects directly.
Previously the flow was:
- wgpuBarDoStuff
- ClientBarDoStuff
- ClientHandwrittenBarDoStuff
- client::Bar::DoStuff
With this CL the flow is:
- wgpuBarDoStuff
- ClientBarDoStuff
- client::Bar::DoStuff
This required adding Buffer creation methods on client::Device instead
of calling client::Buffer static methods directly.
Bug: dawn:445
Change-Id: I1b332b71ac7a03685afcf8fd0617d3d27da468cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24062
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This CL only moves code, renames client::Fence members, and introduces
client::Queue. Additional fence methods are added for the interaction
with the queue. There are no functional changes.
With this ApiProcs.cpp is almost passthrough and will be removed in a
follow-up CL.
Bug: dawn:445
Change-Id: I65544ef76b54614452cf7c74a948a96cb35a4cfe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24061
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This also removes the reliance on BufferBase::IsMapped to know whether
to unmap on destroy. This call was confusing because it was used by the
D3D12 backend to know if its own storage was mapped, but semantically
seemed to check for Buffer::State::Mapped (and not MappedAtCreation).
Bug: dawn:445
Change-Id: I3d6fde1d2996798d53264d5643545f0efb90551a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/24060
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <brandon1.jones@intel.com>
This CL adds GetMappedRange reusing the existing GetMappedPointerImpl
call in dawn_native. In dawn_wire tracking is added to keep a
Buffer::mMappedData around.
Tests are added to test the result of Get[|Const]MappedRange in all
buffer states.
Bug: dawn:445
Change-Id: I3737dc4d36f31d392839952da0b5c0d10c7c8a88
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23861
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
In a follow-up CL we need to know if the buffer is in the
MappedAtCreation state for validation of GetMappedRange. Having the
state not 100% reflect the state in the spec meant that validation if
GetMappedRange would fail for buffers mapped at creation for which
IsMapWritable is true.
Bug: dawn:445
Change-Id: I4a64335a708b838526da8d65f907b21c782816e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23981
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This CL only moves code, renames client::Buffer members and does
additional casts where needed. No functional changes.
Bug: dawn:445
Change-Id: I2bf83ecc1c9b36d5965d0365360dd981fcd41aac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23860
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Otherwise on 32-bit platforms, creation of a buffer bigger than the max
size_t would overflow the check and no OOM would be produced.
Bug: chromium:1099621
Change-Id: I987a338b150d10c0eabc3eb5fb3b815a5c2a5ca2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23960
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
In a render/compute pass, if a texture is used as the same usages
across its subresources, and it is also used as different usages
across its subresources. We should mark that it is not used as the
same usages across its subresources for this pass, and we need to
visit every single subresource to track its usages transition.
Bug: dawn:462
Change-Id: Ide0770db62a3b7b85664757b21eb3280a0bb646c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23300
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Added Device::GetOrCreateEmptyBindGroupLayout which caches the result
after being run and modified PipelineBase::getBindGroupLayout to use
that instead of creating a new empty bind group layout each time.
Bug: dawn:466
Change-Id: I70a5719265784eb8f60c2eedf6db7596462b21bd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23980
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Tomek Ponitka <tommek@google.com>
Also fix a misuse of VkBufferImageCopy that caused some Swiftshader
failures.
Bug: dawn:22
Change-Id: Ie812a590d70c7561dfcf2f78ce6c530187610e65
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23200
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This patch moves the computation of TextureBufferCopySplit outside of
the loop over each copy texture array layer so that we only need to do
the computation once for each B2T and T2B copy command.
BUG=dawn:453
TEST=dawn_end2end_tests
Change-Id: I1fcfc972504f845467af92a77bc37870ed7b52a7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23720
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch adds the support of copying with multiple texture array
layers in one buffer-to-texture and texture-to-buffer copy command.
BUG=dawn:453
TEST=dawn_end2end_tests
Change-Id: If009dbb29f2b0ef0667715eed0d66053b1491fd4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23248
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Bug: dawn:442
Change-Id: I889a943cbaf2d349c31a15fdf126d66964bdd0a7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23247
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This patch fixes a bug in buffer-to-texture and texture-to-buffer copies
when copySize.height == 0 or copySize.depth == 0. Previously we miss the
checks if either copySize.height or copySize.depth is 0 before doing
(copySize.height / blockHeight - 1) and (copySize.depth - 1) thus we
will get incorrect results because of arithmetic overflows.
This patch fixes this bug by adding the missed check and adds the
related regression tests in dawn_unittests
BUG=dawn:453
TEST=dawn_unittests
Change-Id: I970e420c0fa7f0b61c656365bef079c123a59e6a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23520
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
|MTLDevice maxBufferLength| is not available until 10.14, so on
lower versions of macOS, try using |recommendedMaxWorkingSetSize|
Bug: dawn:450
Change-Id: I52dc4211cf3d7014771d580a9af9c72abe92a375
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23263
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
ASAN throws when hitting OOM conditions which these tests intentionally
try to create.
Bug: dawn:450
Change-Id: I635480ae329cd5ace55287d77e2b79e663174f49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23246
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL adds support for multisampled sampling on the D3D12 backend.
This was already working on other backends. It also adds tests that all
of the sample locations are correct.
Bug: dawn:431
Change-Id: I6849e5e2d708ad4824e6db2665d668d43a4ef5ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23245
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Change mTailPtr to mCurrent that's a VkBaseOutStructure*.
Bug: dawn:464
Change-Id: Ic10a0abc95e279e1537786601d006cf18305687a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23540
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
All the querying of extensions was correctly handled for the WebGPU
ShaderFloat16 extensions, except that we forgot to request it when
creating the VkDevice.
In practice this doesn't crash as most drivers won't check if the
extension is enabled, and just compile the shader code correctly.
However the Vulkan Validation Layers complain. This CL fixes it by
requesting the features on device creation.
Bug: dawn:426
Change-Id: Id7307bb4f1d08a10bec9fc7bf0500c5761f96ff7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23203
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
TypedInteger.h didn't include <functional> which made the reference to
std::hash cause a compilation failure. Fix this by moving TypedInteger
hashing to HashUtils.h so that TypedInteger doesn't include <functional>
in all of its users.
Bug: dawn:442
Change-Id: I5a0271bb187682616eb5ef3a13bb7f6271203453
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL adds a TypedInteger helper which provides additional type
safety in Dawn. It is a compile-time restriction that prevents integers
of different types from being used interchangably in Debug builds.
It also adds ityp::{array,bitset,span} as helper classes to wrap std::
versions (not span). These accept a template paramter as the Index type
so that typed integers, or enum classes, may be used as a type-safe
index.
For now, bind group layout binding indices use TypedInteger. Future
CLs will convert other indices to be type-safe as well.
Bug: dawn:442
Change-Id: I5b63b1e4f6154322db0227a7788a4e9b8303410e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19902
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Device shouldn't be used until after DeviceBase::Initialize so we need
to move the NextSerial call to after Device Initialization is completed.
Bug: chromium:1094477
Change-Id: I2ab317c1d75f853c022faac3fc0bbd66fbd7c14e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23261
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Retrieval filter was receiving errors that shouldn't be
stored or not storing new errors. Since these errors are
never reaching the storage filter or being stored without
being filtered, this workaround removes the storage
filter entirely and filters them upon being retrieved.
After the change, two new E2E tests fail
backend validation and require further investigation.
Bug: dawn:460
Change-Id: I92d8c55c71832064b94e8ff0307e7af57ea81fda
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23144
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Fuzzer recently started sometimes injecting errors with
CheckHRESULT returning E_FAKE_ERROR_FOR_TESTING, which needs to also be ignored
in AssertAndIgnoreDeviceLossError so that we can continue with destruction.
Rename AssertAndIgnoreDeviceLossError to IgnoreErrors
This CL also adds Austin's pretty printing of HRESULT results as hex values
and adds printing of "E_FAKE_ERROR_FOR_TESTING" error.
Bug: chromium:1094448
Change-Id: I6715a5eec02919a3e3b4c86d493b3f7e84c5e206
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23241
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
When the fuzzer passes the command DeviceLoseForTesting, the
DawnWireServerFuzzer will hang forever when waiting for a fence signal
because the device was lost. This commit sets a callback on device loss
which gives an extra condition to break the hang.
Bug: dawn:444
Change-Id: I0157358ed6da39cc6fcab7e1be8a3d5fde74266f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23141
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Natasha Lee <natlee@microsoft.com>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
This patch does several clean-ups in CopyTests as a preparation of
supporting buffer-to-texture and texture-to-buffer copies with multiple
texture array layers.
1. Remove the zero-initialization of textures in CopyTests_B2T
2. Use a big buffer that contains the pixel data in all the texture
array layers instead of several small ones that only contains one
texture array layer.
3. Make CopyTests_T2T::DoTest() also use CopyTests::TextureSpec as its
input parameter.
4. Add tests for the copies with multiple texture array layers. In this
patch we just copy the data once per texture array layer, while in
the next patch we will be able to copy the data for all the related
texture array layers in one copy command.
5. Move some helper functions for copy tests to WGPUHelpers.cpp
BUG=dawn:453
TEST=dawn_end2end_tests
Change-Id: Ia0150a6c55fffce3e24dda2cd45fd920b0873dc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23120
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reland after a refactor of how the extension handling work in the Vulkan
backend.
The original author is David Turner <david.turner.dev@gmail.com>.
This CL ensures that, on architectures with a varying subgroup size,
compute shaders are always compiled with a fixed subgroup size to
avoid consistency issues when one shader writes data in a subgroup-size
dependent layout to GPU memory, to be read by another shader in a
future dispatch.
At the moment, only Intel ICDs are known to implement this [1],
and the code uses a heuristics to chose the size of 16, which seems to
be the sweet spot according to Intel engineers.
+ Update the PNextChainBuilder class to deal with the fact that
VkComputePipelineCreateInfo::pNext is defined as a const void*,
which created compiler errors in the previous implementation.
[1] https://bugs.freedesktop.org/show_bug.cgi?id=108875
Bug: dawn:464
Change-Id: I035ee06084fcc964742f0bff4c54cff257c742ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23202
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reland after a refactor of how the extension handling work in the Vulkan
backend.
The original author is David Turner <david.turner.dev@gmail.com>.
Certain Vulkan ICDs (Intel ones notably) will compile SPIR-V
shaders with an liberal, compiler-selected, subgroup size (i.e.
either 8, 16 or 32). For more context, see [1].
This can be a problem for compute, when one shader stores data
in device memory using a subgroup-size dependent layout, to be
consumed by a another shader. Problems arise when the compiler
decides to compile both shaders with different subgroup sizes.
To work-around this, the VK_EXT_subgroup_size_control device
extension was introduced recently: it allows the device to
report the min/max subgroup sizes it provides, and allows
the Vulkan program to control the subgroup size precisely
if it wants to.
This patch adds support to the Vulkan backend to report and
enable the extension if it is available. Note that:
- This changes the definition of VulkanDeviceKnobs to
make room for the required pNext-linked chains of
extensions.
- A helper class, PNextChainBuilder is also provided in
UtilsVulkan.h to make it easy to build pNext-linked
extension struct chains at runtime, as required when
probing device propertires/features, or when
creating a new VkDevice handle.
- This modifies VulkanDeviceInfo::GatherDeviceInfo() to
use PNextChainBuilder to query extension features and properties
in a single call to vkGetPhysicalDevice{Properties,Features}2.
Apart from that, there is no change in behaviour in this CL.
I.e. a later CL might force a specific subgroup size for
consistency, or introduce a new API to let Dawn clients
select a fixed subgroup size.
[1] https://bugs.freedesktop.org/show_bug.cgi?id=108875
Bug: dawn:464
Change-Id: I01e5c28e7dac66f0a57bf35532eb192912b254fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23201
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
All existing tests and samples are updated and deprecation tests added.
CommandEncoder still encodes using arrayLayers so the backends are
unchanged. They will be handled in a follow-up CL.
Bug: dawn:22
Change-Id: Ib5346b46eb04d97349cab8f32ef8da5034726ca8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23104
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This CL checks buffer sizes before creating map read/write handles.
It is an error to map a buffer that can't be addressed on the CPU.
It also changes client-side synchronous errors on mapAsync to be
normal map failures, and not device lost errors. These should be
recoverable.
The CL adds additional testing for really large, but not UINT64_MAX
buffers, and fixes a VVL warning when buffer allocations exceed the
size of their memory heap.
Bug: dawn:450, dawn:398, chromium:1014740
Change-Id: Ieb34c04c3d01c429b7e3b7810729d5e91ecb6270
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22626
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
If a texture's old states of all subresources are the same, and its
new states are the same too, then we can use one barrier to transit
states for all subresources. We don't need to use one barrier per
each subresource.
This change can reduce barriers we dispatched, in order to improve
performance for particular situations.
Bug: dawn:441
Change-Id: I9fe9dabda725e05d4ce5a8e69ee7b40e6724a22a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23145
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch put subresource related variables like baseMipLevel,
levelCount, baseArrayLayer, layerCount into a single struct at
backends.
Bug: dawn:157
Change-Id: I50c6bb0ed8ae7a184506c23cab4b64a472bbd75e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23163
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This makes the tracking in TextureBase match the shape of
wgpu::TextureDescriptor.
GetSize() becomes a bit more surprising because the depth can sometimes
be the array size, so new getters GetWidth(), GetHeight() and GetDepth()
are added.
Some simplifications to the backend texture creation code are included
that will make it less error prone to add support for 1D / 3D textures.
Bug: dawn:22
Change-Id: I33b6ca99af9d58fc88f5f626cfd5e2e62a8b45cb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23103
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This updates CL:
- Adds a deprecation warning to use size.depth instead of
arrayLayerCount.
- Changes all tests and samples to use size.depth.
- Adds deprecation tests for the change.
In particular the state tracking in TextureBase isn't changed yet
because it requires non-trivial changes in the backends. It will be done
in a follow-up CL.
Bug:dawn:22
Change-Id: Ic02dfb5baaba8d5b06cd339ce988e9b1d16cb5e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23101
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch enables nonzero_clear_resources_on_creation_for_testing
toggle on buffer on OpenGL backends as a preparation of supporting
buffer lazy-initialization in Dawn.
BUG=dawn:414
TEST=dawn_end2end_tests
Change-Id: Ib49ad17a5d89e14dbdb08d2eb8d6441fadb68f10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23143
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch enables nonzero_clear_resources_on_creation_for_testing
toggle on buffer on D3D12 backends as a preparation of supporting
buffer lazy-initialization in Dawn.
BUG=dawn:414
TEST=dawn_end2end_tests
Change-Id: Id4f45ff5ccf906692c3855451b120aa56f68c7a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23142
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Prevents the d3d12 fuzzer from building on non-windows platforms.
bug: dawn:444
bug: chromium:1094230
Change-Id: I3ce20c645b3fe99b51e06b493ced34308d7cc21e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23162
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
When we do transition barriers for a texture view outside of a pass
(say copy, clear, initialization), if the texture view can cover all
subresources, and its old usages across all subresources are the
same, then we can use one transition barrier. We don't need to use
separate barrier per each subresource.
This patch can reduce barrier we delivered, and improve performance
for particular situations.
Bug: dawn:441
Change-Id: I2ae9b39793915553cbaaceacaf58bf87c9ba3bc6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23129
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This is preparatory change for a subsequent CL that will deprecate
TextureDescriptor::arrayLayerCount in favor of size.depth.
Bug: dawn:157
Bug: dawn:22
Change-Id: Id64556dc81056fbe7751073ffe9872026c145e77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23102
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The checks for dependencies of Device extensions were incomplete, makes
sure the transitive dependencies of the extensions we care about are all
known so they can participate in the dependency check.
Also removes a workaround for surprising Vulkan behavior with instance
extensions getting promoted as device functions. This should be handled
correctly now as DeviceExt contains the physical device extensions as
well.
Bug: dawn:457
Change-Id: I4b79729d809c9edfedcb075a0e6aa5b4dd473ab3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22942
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Fixes bug where a newly allocated ShaderVisibleDescriptorHeap would be
untracked in the residency LRU upon allocation, causing Dawn's residency
manager to become out of sync with D3D12's internal residency refcount
by calling MakeResident once more than needed.
Bug: dawn:193
Change-Id: I47804471b41df476db989634e50bded6006e05aa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23125
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Moves last TickImpl call during ShutDown to only be called if the
device was fully created.
Bug: dawn:400, chromium:1093639
Change-Id: I25437e3b33d0fc57f21e82c63bfb0fd4d9384175
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23123
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch put subresource related variables like baseMipLevel,
levelCount, baseArrayLayer, layerCount into a single struct at
front-end. We have a lot more at backend too, a following patch
will do that.
Bug: dawn:157
Change-Id: Iab5633a4246b6ae89b80c39f5672dbb31d7a3e78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22704
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
D3D/VK driver may return a size larger than requested and could cause
PowerOfTwo() to overflow. This change adds a check to ensure the size
is within the limit before attempting sub-allocation.
BUG=dawn:27
Change-Id: I2b2ce727abff953642a69b65c8f30be8e53e562d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23060
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Similarly to the CL for Instance extensions, it makes each device
extension linked to an enum class and a bitset. Logic surrounding device
extensions is changed to take advantage of this to be more programmatic
and less error prone when adding support for a new extension.
Bug: dawn:457
Change-Id: Iecf623c40b890b7e00ba972d5eac0712866692b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22941
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
If a texture follow this rule:
* old usages of all subresources are the same
* new usages of all subresources are the same
Then we can use one barrier to transit states for all subresources.
We don't need to use one barrier per each subresource.
This patch adds a flag at front-end to capture many (but not all)
situations which follow the rule above, then we don't need to loop
over every subresource at Vulkan backend.
Bug: dawn:441
Change-Id: I6124ee2cb09c9142fefd8f057dc6d2659301e2d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22702
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Adds harness for fuzzing the d3d12 backend with a WARP device.
Bug: dawn:444
Change-Id: I3e5ca325b19eb8b6cfe53e4d833c5acbbd293a26
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22880
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
At the moment each instance extension needs special handling
in 6+ places when added to the Vulkan backend. This is very
error-prone and makes it difficult to do changes in how they
are extensions are handled.
This CL makes instance extensions linked with an enum class
and a bitset to know which are available (instead of individual
booleans). A table of known extensions with more information like
`versionPromoted` so that they can be handled programmatically.
Bug: dawn:457
Change-Id: I266deb730eb2b7f3ab0ee7ada1b06ff9748a60e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This case verifies that reading from one read-only storage texture then
writing into another write-only storage texture in one dispatch are
supported in compute shader.
Bug: dawn:458
Change-Id: If1b4c13da067fa39b45a378b54c22a4162695c8d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23040
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This catches a few driver bugs or validation errors when doing empty
copies.
Bug: dawn:446
Change-Id: Ibef50b0c03b2fa24bc00cf5c7b6d26b8ac6fae8a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19602
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
When creating a zero-sized buffer mapped, StagingBuffer creation
is skipped. This required adding a new MappedAtCreation state
since mStagingBuffer couldn't be used as a tag value for that.
Made the OpenGL backend always create non-zero-sized buffers.
Finally added tests for MapRead/WriteAsync and CreateBufferMapped
of zero-sized buffers.
Bug: dawn:446
Change-Id: I04f6fe98fd646f1867c21065cd1cd33a1595e19f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21481
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch enables nonzero_clear_resources_on_creation_for_testing
toggle on buffer on Vulkan backends as a preparation of supporting
buffer lazy-initialization in Dawn.
BUG=dawn:414
TEST=dawn_end2end_tests
Change-Id: I7619d02ae898e30fd15438d35437802a09e959cc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22981
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This patch enables the tests CopyTests_T2T/CopyWithinSameTexture* on
D3D12 after the D3D12 texture subresource tracking has been supported.
This patch also changes the related comment in Vulkan as WebGPU CG has
already decided to disallow the overlaps among source and destination
subresources in texture-to-texture copies.
BUG=dawn:453
TEST=dawn_end2end_tests
Change-Id: Ibf008c800cfea62658050f565f321a391412c54c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/23000
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Pipeline layout incorrectly indexes into a root table array
when there are more root descriptors than root tables.
To fix, the array is dynamically sized where parameters
are appended instead of indexed into the root signature.
Bug: dawn:449
Change-Id: I6d7f65fb791d323704b1c3a3af9c871a79e32a30
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22960
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Metal supports FP16 on both macOS and iOS, so we can
unconditionally enable this extension on Metal backend.
BUG=dawn:426
TEST=dawn_end2end_tests
Change-Id: I16c9c907bb112a66e76506ede9bc89a04313d7b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22882
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
This patch enables nonzero_clear_resources_on_creation_for_testing
toggle on buffer on Metal backends as a preparation of supporting buffer
lazy-initializations in Dawn.
BUG=dawn:414
TEST=dawn_end2end_tests
Change-Id: Ia7106482922aeb0521affa206f459d40938a0131
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22861
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch makes Dawn provide more detailed error messages when the
pipeline layout is not compatible with shader module, which is helpful
to debug such errors in WebGPU applications.
BUG=dawn:456
Change-Id: Ib5a870d8e66645481434c4d3dc6fdc1a585aac36
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22881
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
When we use a texture for different purpose, we need to add proper
barrier(s) in order to make it ready. Previously, the barrier is
done per entire texture. So it is invalid to sample/read/copy from
one subresource (say a mip/array slice) and render/write/copy to
another subresource of the same texture at the same time.
With this patch, barrier is set per each texture subresource. So it is
valid to use a subresource as source and use another subresource of the
same texture as destination at the same time.
However, planar slices like depth/stencil planes are not handled
gracefully. This is a TODO task. Another task is to combine barriers
into one if they can be combined. I will do this optimization in
another patch in near future.
Bug: dawn:157
Change-Id: I783a76cb88fcdffb60c307ddfb89d50f1583201a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22101
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This patch combines barriers in a render/compute pass into one
function call.
Previously, we need to dispatch barrier(s) for each buffer/texture
in a pass. So we may need quite a lot function calls to deliver
barriers in a pass in real web applications. One example is that
we did see that too many function calls to deliver barriers in
Aquarium (WebGPU porting) contributed to CPU usage and bottleneck.
Bug: dawn:441
Change-Id: Ibe44967fefd2e1e6e64df4587146c4fb7fbe8e73
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22700
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This reverts commit 0357eed7de
and reland commit bdc05c3d5f.
The Vulkan-Loader has a bug where if the instance is created
with Vulkan 1.1 and not the promoted extensions, it will skip
emulation and if the ICD doesn't support Vulkan 1.1 nor the
extensions. Enable the promoted extensions, even when creating
a Vulkan 1.1 instance.
Original change's description:
> Check FP16 support on vulkan backend
>
> This patch check FP16 support on vulkan backend, and introduces
> the shader_float16 extension.
>
> BUG=dawn:426
> TEST=dawn_end2end_tests
>
> Change-Id: Ie09568a416ce9eb2c11afeede3e7da520550d5fb
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21901
> Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
Bug: chromium:1087896, dawn:426
Change-Id: I2c4465fb2fe957966b44d3e5840112219481c639
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22781
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch adds validations on the texture-to-texture copies within the
same texture to align with the latest change in WebGPU SPEC: When the
source and destination textures are the same one, the source and the
destination subresources involved in the copy must not overlap.
Note that we don't enable the newly added end2end tests on D3D12
because when doing texture-to-texture copy within the same texture, we
need to set the source subresources into TRANSFER_SRC state and set the
destination subresources into TRANSFER_DEST state, while right now we
don't support subresource tracking on D3D12.
BUG=dawn:453
TEST=dawn_unittests
TEST=dawn_end2end_tests
Change-Id: I6408640d01beaf6ab9ef30b001e9c87cfecbdd65
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21601
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch changes all the tests related to write-only storage textures
in dawn_end2end_tests StorageTextureTests to make them test all the
texture formats that support being used as storage textures in WebGPU.
BUG=dawn:267
TEST=dawn_end2end_tests
Change-Id: I4e49efc21f768a9b7645bf334bd41a97fd4838e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22663
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Zero-sized copies are invalid in a couple backends, and in follow up
CLs CreateBufferMapped will be change to handle zero-sized buffers
correctly.
Bug: chromium:1069076
Change-Id: Ieef62a13182bbe1e939a3847980c91339e42aa8f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22460
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch changes all the tests related to read-only storage textures
in dawn_end2end_tests StorageTextureTests to make them test all the
texture formats that support being used as storage textures in WebGPU.
BUG=dawn:267
TEST=dawn_end2end_tests
Change-Id: I4d6ddbee638a787a2dcfc626bd4963a9b9043772
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22640
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
To avoid overly ticking, we only want to tick when:
1. the last submitted serial has moved beyond the completed serial
2. or the completed serial has not reached the future command serial added
by the trackers (MapRequestTracker, FenceSignalTracker, ErrorScopeTracker).
Bug: dawn:400
Change-Id: Ie7c65acc332846ac1a27f9a18f230149d96d2189
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19062
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Bug: dawn:433
Change-Id: I47d9ffe16d6ad7730628dc27ec6708006cf4384d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22560
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Per MSDN recommendations, Dawn should handle MakeResident failures by
evicting some more and attempting MakeResident again.
Bug: dawn:193
Change-Id: I0a9d326dcd000360f6eafb5691efb4987a77e8d5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22280
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Some WebGPU CTS tests were failing with invalid WGPUTextureFormat
when really the format was simply missing. This CL updates
the validation code so it is more clear.
Bug: dawn:433
Change-Id: Ie7aacd01ea424d9f5df0078703a474e98b72ce41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22543
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
If the shader declares a storage buffer RO but uses storage buffer in
the BGL, the shader compiler will be told to treat these bindings as
UAV instead of SRV to avoid PSO mismatches.
Bug: dawn:410
Change-Id: I3be3257449de55fd2d35e914233b48c6f7121b58
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22322
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is blocking Skia from updating to newer clang
Tbr=cwallez@chromium.org
Bug: chromium:1064305
Change-Id: I7d894dba701ebe2fe0e1b78d5fb42032d88846aa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22522
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
This was hitting an ASSERT because D3D12 doesn't have an option
to set None as the shader visibility.
Bug: dawn:448
Change-Id: I3e056e531e7d1bb89da1736bc609bfe97a2fa194
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22324
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This function was validating the depth of the copy which is
incorrect for 2D array textures. Remove this check for now
since it would be only relevant for 3D textures which Dawn
does not support yet.
Bug: dawn:424
Change-Id: I756080a899a7c5effe5843a530d4db0571bc10d5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22323
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
The windows.h macros were undefined only at the end of this platform
header previously but with the addition of d3d12sdklayers.h the
definition of ID3D12DebugQueue::GetMessage picked up the macro and
became GetMessageA or GetMessageW, but Dawn code referred to it as
GetMessage causing a compilation error.
Fix this by preemptively loading windows.h and undefing some of the
macros so that the D3D12 headers don't see them.
Bug:
Change-Id: I1985cc20a9bdec1d25619ac5088e918b2acf8ecb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22400
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
A previous CL sorted bindings by binding number, but bindings were first
sorted by type. This means a bind group layout with mixed dynamic
storage and uniform buffers would not always have all dynamic bindings
in increasing order. Instead, it would be strictly increasing within
each section of uniform/storage buffers. This CL corrects the issue
by first sorting dynamic buffers by binding number.
Bug: dawn:408
Change-Id: I3689eb64ad8aa8768cebe266eebcba75a21894ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22303
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This will help remove noise in debug layer output. This patch also
promotes warnings and higher to Dawn errors.
BUG: dawn:363, dawn:418, dawn:419, dawn:421
Change-Id: I3112c94aff71fc7e76dff48c82bafe9e051ed3b4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21702
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
When device initialization failed, DeviceBase::mCurrentErrorScope is
nullptr so we need to guard the call to UnlinkForShutdown.
Bug: chromium:1081998
Change-Id: I65a1948117fa9461f7fc8d2d1d70aef669bc375d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21685
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds the basic supports of read-only and write-only storage
textures on OpenGL backend. Currently on OpenGL backend we only support
using either a layer of a texture or the entire texture as either read-
only or write-only storage texture.
BUG=dawn:267
TEST=dawn_end2end_tests
Change-Id: I235b98d8d961a17739ea35eec9726dcc80889c4b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
On Intel the lazy-clearing optimization that bundled multiple
subresources at once to lazy-clear failed when multiple different
mip-levels were bundled together. The rendering was "clipped" to the
size of the smalled miplevel, resulting in some mip levels not being
fully cleared.
Bug:
Change-Id: Icfafbeae25bd426119a0b499237052c87eafe93e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22341
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
In the Vulkan backend, we only need to set VK_LAYER_PATH and
VK_ICD_FILENAMES while we're gathering the device information. After
this, we should unset the environment variables or they will persist
and affect loading Vulkan again (from Dawn or another client) in the
future.
Bug: dawn:406
Change-Id: I30c38b0980e181126fcd7fa911bbf9e8aa35f3b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22021
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This adds tests that it is possible to render into a subresource bound
as an output attachment. Attaching a subresource as an output attachment
is still not implemented correctly on OpenGL and Metal.
This CL also adds a helper to DawnTest to allow checking stencil buffer
contents.
Bug: dawn:430
Change-Id: Ic8652dd9da8d3c7a47d7b0548306e2054f642e7d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22164
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds the supports of copying multiple array layers of a
2D array texture in one texture-to-texture call. Note that in D3D12
and Metal it is implemented by copying each array layer in a for-loop.
Note that we need extra validations when the source and destination
texture are the same one in a texture-to-texture copy. This CL does
not include these validations and we will add them in another one.
BUG=dawn:18
TEST=dawn_unittests, dawn_end2end_tests
Change-Id: I1239543e5692e140474b3c1de0b3579be449e283
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22140
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch adds validations to forbid using cube or cube array texture
views as storage textures in Dawn as they are not supported on D3D12.
BUG=dawn:267
TEST=dawn_unittests
Change-Id: Iafb705a4bedae25ee54cfa45f710b2f3b7aab912
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22166
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch check FP16 support on vulkan backend, and introduces
the shader_float16 extension.
BUG=dawn:426
TEST=dawn_end2end_tests
Change-Id: Ie09568a416ce9eb2c11afeede3e7da520550d5fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21901
Commit-Queue: Xinghua Cao <xinghua.cao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This change implemented texture subresource on Vulkan. It added a new
function to handle barriers for texture subresource for bind groups.
It also simplified barriers which are set for texture clear and copy.
Before this patch, all barriers are done upon all mip levels and all
array layers. With this patch, barriers are done upon particular mip
level(s) and array layer(s).
We may need more texture subresource end2end tests for copy and clear
opterations. I will visit that later.
Bug: dawn:157
Change-Id: Ie2247c6315326494f2d3736334e84b2867a16c17
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22024
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Removes an assert when attempting to evict the residency LRU while
empty.
Bug: dawn:415
Change-Id: If346d0f2cc28ec089871b3c5aaf8f5641344f9fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22023
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
This patch adds the dawn_end2end_tests on the use of 2D array texture
views as read-only and write-only storage textures.
In HLSL neither RWTextureCube nor RWTextureCubeArray are supported, and
the HLSL function Load() also accept neither TextureCube nor
TextureCubeArray, thus we can neither support imageCube nor
imageCubeArray in the shaders used by Dawn.
BUG=dawn:267
TEST=dawn_end2end_tests
Change-Id: I0bce8bd3bff75baa14943b974ef3a6cc2b6d2434
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21980
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
In Vulkan, importing memory by file descriptor takes ownership of
the file descriptor. It is necessary to dup it in
ClearImageAcrossDevicesAliased because the texture is imported
twice. This fixes these tests on SwiftShader.
Bug: dawn:417
Change-Id: I08b6464c4b8bd31f738037678e29fd6d066e7888
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22020
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
BUG=dawn:405
Change-Id: I7a79a0d7ce58ff995ec1ff917dd427875fb4deaf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21340
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This patch adds a validation to disallow declaraing combined textures
and samplers in shaders.
SPVC doesn't provide a way to extract the information of combined
textures and samplers from shaders, so currently we cannot add the
related validation when we use SPVC.
BUG=dawn:423
TEST=dawn_unittests
Change-Id: I81f05dc6adb57fbc981ee1a651e160c096315551
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/22000
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch adds the adapter type in the dawn_end2end_test name when the
adapter is Microsoft Basic Render Driver. In a Windows Remote Desktop
session, there will be two adapters whose name is "Microsoft Basic
Render Driver" with one of the adapter type being "CPU" and another
being "Integrated GPU" on an Intel integrated GPU for example. To avoid
the conflicts in the name of end2end tests and causes ASSERT failures,
we add the adapter type to the test name when the adapter is Microsoft
Basic Render Driver.
BUG=dawn:396
TEST=dawn_end2end_tests
Change-Id: I26108ac106957ea7e72d531a366851fd71cbc2b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
These tests hit a failing ASSERT in SwiftShader.
Suppressing to get the bots running and green.
TBR=cwallez@chromium.org
Bug: dawn:417
Change-Id: I2a2955650df0bb94206534ce1e401299eea6f26a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21960
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Adds logic to lock residency for bound descriptor heaps, then unlock and
insert into the LRU cache when no longer bound. Adds a basic functional
test.
Bug: dawn:193
Change-Id: Idfaaee6b873374c07a0b94b1982ad65353218799
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21400
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This skips tests that would fail on SwiftShader on systems with
no display.
Bug: dawn:283
Change-Id: Ie3aa46349df3116305712a5aa143d874cef0d4b4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21781
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Texture subresource total number is wrongly calculated. This change
fixed the tiny bug.
Bug: dawn:157
Change-Id: Id6dad7e60fa9fe63dac3567814486d3f9dfcee9e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21902
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
All the buffer backend files had basically the same implemenations
of MapRequestTracker and the tracker was owned by device backends.
This refactor puts MapRequestTracker into its own file
and has the tracker be owned by DeviceBase and BufferBase.
Bug: dawn:400
Change-Id: Id28422b575e9c04d4435d5f119e0ffe08c2d1ce8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21760
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch adds the validation that forbids the buffer-to-buffer copies
when the source and destination buffer are the same one as in D3D12 the
Source and Destination resource cannot be the same when doing a
CopyBufferRegion.
BUG=dawn:17, dawn:420
TEST=dawn_unittests
Change-Id: Ie3e0c5361919ff369240a65d6e7fbae05b8332b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21780
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Factor out common shader compilation logic to ShaderModuleD3D12
used by both RenderPipeline and ComputePipeline, and implement
a new compilation path using DXC when UseDXC toggle is enabled
Bug: dawn:402
Change-Id: I67d3ae0aecee11634af917735456ddbe10b3d86a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21840
Commit-Queue: Hugo Amiard <hugo.amiard@laposte.net>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Allows bindgroups that use the same samplers to share
a descriptor heap allocation. This is particularly important
for sampler heaps which incur expensive pipeline flushes
due to the smaller size requiring more frequent switches.
The device dolls out entries to a sampler heap allocation cache.
When the BindGroup is created, it does a lookup and refs the
allocation. This ensures the cache does not grow unbounded
or needlessly store unused entires.
This change is a follow-up of de-coupling heaps.
BUG=dawn:155
Change-Id: I3ab6f1bdb13a40905cb990cd7a2139e73da30303
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20783
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The tests can pass on Metal and OpenGL backend as expected.
But they can't pass on D3D12 and Vulkan backend. I will work
on that soon.
Bug: dawn:157
Change-Id: I4fcf229f7a24369004d5594a3801f0acad804fd0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21341
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
By default, the tests will run on all available adapters, so this
adds an --exclusive-device-type-preference flag which takes a list
of comma-delimited device type preferences (discrete,integrated,cpu).
Tests will run only on the first available device type.
This is useful because in Chromium's test infrastructure, the same
test arguments are passed to one machine on which we want to use the
discrete GPU, as well as one machine where we want to use the
integrated GPU.
Bug: dawn:396
Change-Id: Id936fff3356eef3c6d12dfd1407b0e1f0f020dc1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21202
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This moves the creation of the Instance and Adapter discover to
environment creation. It allows programatically filtering test
parameterizations based on what is available on the system instead of
relying on what is enabled at compile time.
Because of an issue with the Vulkan validation layers, the instance and
adapters are created twice. Once in environment creation, and once on
environment set up. The Vulkan validation layers use static global
mutexes which are unsafe when Chromium's test launcher forks the
launcher process between environment creation and SetUp.
Bug: dawn:396
Change-Id: Id79f0d274331e4ba95f75b2ca4e896ad0f7a31a8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21762
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This patch adds dawn_end2end_tests to verify any textures whose first
use is being used as read-only or write-only storage texture have been
cleared to 0.
BUG=dawn:267
TEST=dawn_end2end_tests
Change-Id: I26a1b6b46ba8fc87c6599870771192262ce07d83
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21740
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Enables GBV by default when the backend validation layers are enabled.
This feature is particularly useful for catching mistakes in shaders
that otherwise pass when only using the debug layer.
BUG=dawn:363
Change-Id: I7b730ce8e43069dc3150e7a5857a0977b3147390
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21701
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is a reland of 071fe56ffe
It creates textures as TYPELESS if they may need reinterpretation
of the bit layout. Right now only sampled Depth32Float needs this
so it is special-cased.
Original change's description:
> Support depth32float sampling on D3D12
>
> Bug: dawn:367
> Change-Id: I026e718130cbd92427c6292045fd041c878d4f77
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20840
> Commit-Queue: Austin Eng <enga@chromium.org>
> Reviewed-by: Stephen White <senorblanco@chromium.org>
Bug: dawn:367
Change-Id: I8b0ad465915c4476099fc1097e0cd02b23bd21b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21640
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This makes it much easier to understand where errors come from.
Bug: none
Change-Id: I345164177e6258a32bdc37d233bc5df8bba13132
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21660
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
They were deprecated in favor of bytesPerRow and rowsPerImage.
Bug: dawn:22
Change-Id: I5bd3262ee8ba2f891d01f6b8a3f5df86f7596686
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21684
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It was deprecated in favor of chaining a
wgpu::ShaderModuleSPIRVDescriptor.
Bug: dawn:22
Change-Id: I210cd7c21c33c6ca8dd286ea64389b774a4355e5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21683
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It was deprecated in favor of wgpu::Device::GetDefaultQueue.
Bug: dawn:22
Change-Id: I28d7e616b2beb7de8eed3a3df501eb97a6475928
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21682
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It was deprecated in favor of viewDimension.
Bug: dawn:22
Change-Id: I8016d7440d98cc69acd1b48cb76f7ae1c1353896
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21681
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This removes the following types and members as well as fixup code
and depraction tests for them:
- wgpu::BindGroupLayoutBinding
- wgpu::BindGroupLayoutDescriptor::bindingCount
- wgpu::BindGroupLayoutDescriptor::bindings
- wgpu::BindGroupBinding
- wgpu::BindGroupDescriptor::bindingCount
- wgpu::BindGroupDescriptor::bindings
Bug: dawn:22
Change-Id: Ifc0e25107f3dcfbb850624cb362909f38c90bec2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21680
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds the following:
- UseDXC toggle
- Loads DXC (and DXIL to sign the DXBC) in d3d12/PlatformFunctions
- Adds GetModuleDirectory to SystemUtils
GetModuleDirectory was added to prevent loading issues regarding dynamic libraries when the executable is not in the same path as the dawn module.
This patch doesn't add DXC to RenderPipelineD3D12 nor ComputePipelineD3D12.
Bug: dawn:402
Change-Id: I2b8e4a2b7df31b9c766c748f92e11050c0aec3a0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21420
Commit-Queue: Felix Maier <xilefmai@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Wgnu-zero-variadic-macro-arguments is fixed by:
- A previous googletest roll fixing the warning in gmock.
- Adding a dummy argument to AddTraceEvent so that the __VA_ARGS__ is
never empty in TraceEvent.h and doesn't require __VA_ARGS__ token
pasting with a comma.
- Extracting the first parameter in DAWN_INSTANTIATE_TEST with some
preprocessor tricks instead of singling it out, to avoid __VA_ARGS__
token pasting with a comma.
Wmicrosoft-enum-value is fixed by a previous spirv-cross roll that fixes
the warning upstream.
Bug: dawn:394
Change-Id: Icfe037ae9549087e9d62b6f42f91958addbb53ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21483
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds the validation on the buffer-to-buffer copies within the
same buffer. When the source and destination buffer are the same one in
CopyBufferToBuffer(), the copy region cannot overlap or it will cause
undefined behaviors on Metal and Vulkan.
BUG=dawn:17
TEST=dawn_unittests, dawn_end2end_tests
Change-Id: I63ab790787ec0a973ae22787a9348bddfb6a5373
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21602
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This fixes a bug where dynamic offsets were applied to the wrong bindings.
Dynamic offsets are applied in increasing order of binding number.
Bug: dawn:408
Change-Id: I3de6ee1bfd6e00239ddc46f820c3f81ba82815cb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21620
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This avoids a stack overflow when many error scopes are pushed on device
shutdown. It also changes the error scopes to return a Unknown error
type on shutdown instead of NoError.
A regression test is added.
Bug: chromium:1078438
Bug: chromium:1081063
Change-Id: Ibfab8dd19480414c1854ec2bd4928939663ba698
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21440
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It is valid to have race condition for multiple writes on the same
resource in some situations in render pass. These situations are:
1) multple storage buffer bindings on the same buffer,
2) multiple writeonly storage texture bindings on the same texture.
This change fixed a bug in tests and added a new test, in order to
make sure that validation code in Dawn allows this kind race condition.
Bug: dawn:407
Change-Id: I42332418bea5b6e608f6730e42f60c1c12b0b025
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21361
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This is valid in WebGPU but causes validation errors in backends.
Also make it an OOM error on Metal to request a buffer close to
UINT32_MAX size because it would truncate the size, and could lead to
OOBs.
Bug: chromium:1069076
Change-Id: Ib961cb236cb7cabc0ae21203bf1d72ba82a56272
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21060
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Returning COM for getters needlessly refcounts which wastes CPU cycles
in critial sections and floods PIX traces with [Add/Release]Ref.
BUG=dawn:212
Change-Id: Ifa853f2d5f78a450fdb7ffb9492f0d08dfbcdd37
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21364
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This enables both Swiftshader Vulkan and the system Vulkan drivers
to be discovered and used simultaneously.
Bug: dawn:396, dawn:283
Change-Id: I580ca26c12296fe13c0331c4faf6e7a4520664e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21041
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This change added more tests for texture usage tracking for compute.
It also added multiple write usages related tests for both buffer
and texture.
Bug: dawn:358, dawn:359
Change-Id: I8e3dbc92a06ceccfa5fce3ed319e4e641e72e41f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21100
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Move mCompletedSerial and mLastSubmittedSerial to Device frontend and
add getters and setters for the device backend to access such.
This is to aid the Device in taking more ownership of Serials and Ticking.
Bug: dawn:400
Change-Id: Ifa53ac294a871e484716842a3d212373b57847c4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20480
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Tint is behind a build flag, since Tint is not yet available in
chromium's third_party.
BUG=dawn:403
Change-Id: If5fa36b36216ef6965341b886c3bd70d27daf23a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21300
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
This file was missing an include of libfuzzer_exports.h which was
causing LLVMFuzzerInitialize to be stripped from the binary.
Tbr=cwallez@chromium.org
Bug: chromium:1075605
Change-Id: I251e3dd7ad1b3ebb95339dec946b80ce2e5d4a05
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21301
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This change added tests for invisible and unsed bindings for
texture usage tracking. It also removed one buffer test, which
is not useful.
Bug: dawn:365
Change-Id: I01232836fb150ecea011a5fcbc250fa1eb7207cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21120
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Bug: dawn:367
Change-Id: I026e718130cbd92427c6292045fd041c878d4f77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20840
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This patch adds the basic supports of read-only and write-only storage
textures on D3D12.
The subresource tracking and barriers on the subresources used as
read-only and write-only storage textures are not included in this
patch.
BUG=dawn:267
TEST=dawn_end2end_tests
Change-Id: Ie29a3a9962cd1a79217bc87815ed0bd27623e3a8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21140
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This renames ComparisonSamplerTests to DepthSamplingTests
and adds tests which do normal sampling of depth32float textures
as well as sampling and comparison sampling in compute shaders.
Comparison samplers in compute shaders appear to be broken at least
on Metal Intel Haswell Iris 5100
Bug: dawn:367, dawn:401
Change-Id: I4a8208265675892d42b591126ffed2aadd420ab1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20782
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Depth textures outside the 0-1 range are clamped on OpenGL unless we
reinterpret contents as R32
Bug: dawn:367
Change-Id: Ifb539689c55bb5a4a16427025c9f0d97c4156c6b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20823
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
GL_DEPTH is for calls like glEnable(GL_DEPTH) and
glClearBuffer(GL_DEPTH, ...). GL_DEPTH_COMPONENT is the
enum for the texture internal format.
Bug: dawn:367
Change-Id: I8f237e26148e3fd5a624a8bb4ed69e65fdd1acd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20822
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Configure was transitioning the swapchain images from undefined to
present layout but this was already happening because TextureVk starts
with a mLastUsage of None that will force a transition from undefined
when used.
Also introduce an internal texture usage bit kPresentTextureUsage to
prepare for the eventual remove of wgpu::TextureUsage::Present when
old swapchains are removed.
Bug: dawn:269
Change-Id: I57d26f18e34cacd5d91419a45787b2ece9558846
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20881
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Resource usage tracking for compute is per dispatch. So we should
call pipeline and dispatch to trigger resource tracking in compute.
This change added dispatch calls for compute pass related tests.
This change also changed inappropriate comments, and moved a test
to a proper location in the file.
Bug: dawn:358
Change-Id: I6d31169164c434c2f446cd5746170433dd1eb4b7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/21000
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This will allow follow-up CLs to no-op empty copies without making the
nooped copy skip the validation.
Bug: chromium:1069076
Change-Id: Id2460c531bc68e4a8a27705520aeaec7e944d7a7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20880
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This aligns this constructor to be used via Create like the other
vulkan::Texture constructors.
Bug: dawn:269
Change-Id: Ib85874bf24bfe49b644b4faa63c9248c540811c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20882
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This patch adds tests to verify that texture usage tracking is per
each pass for render, and it is per each dispatch for compute.
Bug: dawn:358
Change-Id: I7ed0f470a6457e4cc53b02cd03c3da7d68cbca9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20162
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch also add validation tests for texture subresource tracking
for render pass. Resource usage tracking for compute is per each
dispatch() call, I will add it in next patch.
BUG=dawn:157
Change-Id: I6c4b932e317d66521fa428311e727876d0adf4ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17661
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
It is invalid to read and write on the same buffer/texture in
a single draw or dispatch. This change adds tests to cover this
situation.
Note that we have already added resource usage tests between passes
in the same command buffer, and tests between draw or dispatch calls
in the same pass. And this patch adds tests inside a draw or dispatch
call.
Bug: dawn:358
Change-Id: Ic52b2e559e9c996e5b76ea960183d80d67c24178
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20821
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This fixes the roll in Google3, otherwise it complains that
unordered_set<const char*> hashes the pointer, which is most likely not
what you want to do.
Bug: dawn:394
Change-Id: I1ef06c923bb45e55b39c23e5e7734f1577c47255
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20860
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
If we are missing pipeline in render or compute pass, it always reports
that we are missing vertex buffers or bind groups for render and compute
pass respectively.
Bug: dawn:359
Change-Id: I5550e55fcc9f29c0f2fb71462def836061038add
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20784
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
When we test resource per draw/dispatch, we need to set pipeline, etc.,
in addition to set bind groups.
Bug: dawn:358
Change-Id: Ic51986d0608baf786521158c887a0c1ced7ccacf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20800
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Allows bindgroups to be populated by heap type. Previously, failing to
populate one type of GPU descriptor heap required both GPU heaps
to be switched out. This resulted in extra copies and heap allocations
should only one heap type overflow.
This change also simplifies GPU descriptor heap management:
- Allocator no longer needs to operate on both heaps.
- Sub-allocation tracking can be moved into handles.
A follow-up change will remove duplicated sampler heap allocations.
BUG=dawn:155
Change-Id: I1960cf3a8bc3d86d3e8b2775da3d0c92125bcf82
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19887
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch adds resource usage tracking tests for overwritten
situations within a draw/dispatch when we call multiple
SetBindGroup. We should track the overwritten resources
even though they are not used in render/compute pass.
Bug: dawn:357
Change-Id: I7467db1c0b43fed8513ddb7604adbbd1be55866f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20160
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
It is required on Windows to be able to use __uuidof().
Bug: dawn:394
Change-Id: I02c1a4d36688c5985d5eb7f65737f6b821655ddc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20703
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch adds the basic supports of read-only and write-only storage
textures on Vulkan.
The subresource tracking and barriers on the subresources used as
read-only and write-only storage textures are not included in this
patch.
BUG=dawn:267
TEST=dawn_end2end_tests
Change-Id: I6831b96202a97182763ecd28bc41ab03df904a7c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20560
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
When building in Chromium, Dawn's gtest targets use sources files
in Chromium so it can use Chromium's GTest harness. These source
files were compiled with the "dawn_internal" config included.
This made them include Dawn-specific warnings that trigger on parts
of Chromium's //base.
Instead compile these "main" files as separate source_sets without
dawn_internal and link them in the dawn test executables.
Bug: chromium:1075817
Change-Id: I573390ca3e6a7dfd1e8a949dc10ed268f0d0f63e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20520
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
GetResourceAllocationInfo() returns UINT_MAX64 when
the requested size is too large. This corrects the
validation to OOM when D3D considers the size
invalid.
Only validating for zero-size would cause a device
loss as certain D3D drivers may not always consider
zero-sized invalid and NextPowerOfTwo(UINT_MAX64)
would overflow the allocator.
BUG=dawn:393
Change-Id: Idaad10c139f6428d4f48bca24027a6691257aca9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20400
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This patch adds the basic supports of both read-only and write-only
storage textures on Metal with several simple end2end tests that use
read-only or write-only storage textures in every shader stage.
Here are the follow-ups after this patch:
1. test all the texture formats that can be used as both read-only and
write-only storage textures.
2. support using a texture with multiple different binding types in one
rendering or compute encoders.
3. test image2DArray, imageCube and imageCubeArray.
BUG=dawn:267
TEST=dawn_end2end_tests
Change-Id: Id0de623f7c48389b3b1e90b34a34fd16b14e1477
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Add missing includes:
- Add missing vector include WGPUHelper.h
- Add missing algorithm include as there is a std::transform used in DawnPerfTestPlatform.cpp
Remove c++20 designated initializers from tests.
Removing these as we target c++14 and they trigger warnings in MSVC.
Bug: dawn:394
Change-Id: Id7aea9ef953cc9baa5b7633a036dd09a96aca130
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20460
Commit-Queue: Felix Maier <xilefmai@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This will help avoid the introduction of additional non-standard
code and the warnings can be reintroduced one by one.
Bug: dawn:394
Change-Id: Ib3cd63058f47d17ae5ef67b047887a3b263a7e64
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20382
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The new warnings are:
- -Wdeprecated-copy
- -Winvalid-offsetof
- -Wpessimizing-move
And the list of warnings was sorted alphabetically.
Bug: chromium:1072449
Change-Id: I9f3eecae645455c481ecc2e0be4df350e1453907
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20381
Reviewed-by: Zhenyao Mo <zmo@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Implements logic for managing the NON_LOCAL memory segment for UPLOAD
and READBACK heaps on Non-UMA devices.
Bug: dawn:193
Change-Id: I2426bf6b5f7a7ccd4420f830f344379af9faf73c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19901
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reland with a fix where commands only start being serialized by the
device after the first GetDevice() is called, not in the constructor.
This makes it so calling GetDefaultQueue always returns the same
object. It required updating various WireTests to account for the
additional wire calls.
Bug: dawn:22
Change-Id: Ibe43d84b25100f58a9ec5029a9341e400aec97f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19982
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
The test failed to switch out because the same
bindgroups were being de-duped. This change encodes
as many bindgroups required to switch.
BUG=dawn:155
Change-Id: I238cd0cebf2f8372046fe0cf83a18570aca41761
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20241
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This is a reland of 96c4019214
It includes a fix to add a dummy descriptor count if the
VkDescriptorPool would be empty, and adds a test that a bind group
with an empty bind group layout may be created and used.
Original change's description:
> Slab-allocate VkDescriptorSets
>
> This introduces a slab allocator for VkDescriptorSets which creates
> a VkDescriptorPool pre-allocated with multiple VkDescriptorSets per
> BindGroupLayout. In the future, we can deduplicate pools that have
> the same, or roughly the same, descriptor counts.
>
> This CL also removes the old DescriptorSetService and moves most of
> the functionality onto the DescriptorSetAllocator itself to keep
> the tracking logic in one place.
>
> Bug: dawn:340
> Change-Id: I785b17f4353fb3d40c9ccc33746600d6794efe7c
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19320
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
Bug: dawn:340
Change-Id: Iabb744f110d0cab442bb857b31c87ba46bf0ad7a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20321
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
To avoid accidental memory leaks on account of using raw pointers,
use Ref<TextureBase> as method return type except at Dawn interface
boundaries.
Change-Id: I6459062ee28984de2cb1d5a2059bc70cf82b2faf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19580
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
This reverts commit 96c4019214.
Reason for revert: Breaks the roll, WebGPU CTS hits the
ASSERT(totalDescriptorCount > 0)
Original change's description:
> Slab-allocate VkDescriptorSets
>
> This introduces a slab allocator for VkDescriptorSets which creates
> a VkDescriptorPool pre-allocated with multiple VkDescriptorSets per
> BindGroupLayout. In the future, we can deduplicate pools that have
> the same, or roughly the same, descriptor counts.
>
> This CL also removes the old DescriptorSetService and moves most of
> the functionality onto the DescriptorSetAllocator itself to keep
> the tracking logic in one place.
>
> Bug: dawn:340
> Change-Id: I785b17f4353fb3d40c9ccc33746600d6794efe7c
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19320
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org,bryan.bernhart@intel.com
Change-Id: Icb58485f1080eab79b24fbcd834a89fc6206b80e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:340
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20280
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Resource usage tracking in compute pass is per dispatch. So readable
and writeable usages in pass granularity may be valid.
This patch also removes ComputePassValidationTests.cpp because it
is duplicated with ResourceUsageTrackingTests.cpp. The former actually
contains resource usage tracking tests only, and the latter is also
for the same purpose and it is much more comprehensive.
Bug: dawn:358
Change-Id: I53f8906660b348eeff4f2a061e3b829d1c2ceab8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20122
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Uses the staging descriptor allocator to enable
sub-allocation for RTV/DSVs.
This change also simplifies CPU descriptor heap
management for render-passes:
- Allocating slot-by-slot removes extra attachment
pass.
- No need for the slower direct allocation allocator.
- Move RP creation of view handles into RP builder.
BUG=dawn:155
Change-Id: I508492a2e56a897bf8c85f9a45cd13f62fa0a2ef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20042
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This introduces a slab allocator for VkDescriptorSets which creates
a VkDescriptorPool pre-allocated with multiple VkDescriptorSets per
BindGroupLayout. In the future, we can deduplicate pools that have
the same, or roughly the same, descriptor counts.
This CL also removes the old DescriptorSetService and moves most of
the functionality onto the DescriptorSetAllocator itself to keep
the tracking logic in one place.
Bug: dawn:340
Change-Id: I785b17f4353fb3d40c9ccc33746600d6794efe7c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Adds functionality to query VideoMemoryInfo for the NON_LOCAL memory
segment.
Bug: dawn:193
Change-Id: I63c2f5a649c37617e7b39a60faa2d3b5b5077156
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19900
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Previous to this change, you were unable to assign or move Ref<Derived>
to a Ref<Base>.
This change addresses the problem by introducing <typename U> versions
of assignment, copy and move methods. nullptr_t specific ones were
also added to disambiguate things for the compiler.
Bug:dawn:390
Change-Id: Ib5d44231e26db35de33d63c67b36b5bf411a3540
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20121
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is currently the only depth format that can be sampled.
Bug: dawn:367
Change-Id: Ie35c3f7eeee03661838e301453f387ae99e671d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19702
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch enables one texture to be used as both write-only storage
texture and sampled texture in one compute pass.
Note that while we don't need to check the usage scope of a texture in
the whole compute pass scope, we still need to verify one texture cannot
be bound to multiple bindings that are used in one dispatch at the same
time. This check will be added in the following patches.
This patch also adds tests to ensure a texture can be used as the
following binding types in one compute pass:
- read-only storage + sampled
- write-only storage + sampled
- read-only storage + write-only storage
BUG=dawn:267
TEST=dawn_unittests
Change-Id: Ibff2b005a5269a0bfa254e0417de4920758add39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20120
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Ref<T> specialization will allow us to, in a future change, return
Result<Ref<T>> instances from Create methods while still keeping the
tagged pointer optimization.
Change-Id: I20c764358af22ba1dc53458d59b0b2b4770a0c6a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19801
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
This also adds the definition of the WGSL sub descriptor but forbids
using it for now.
Bug: dawn:22
Change-Id: I0514eec95bbcda28911547d6bda4d5257b62432b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19865
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This will make it easier to support SPIRV as a chained sub-descriptor of
ShaderModuleDescriptor in follow-up CLs.
Also fix a couple style and formatting issues.
Bug: dawn:22
Change-Id: Iddaf1f87edee65687e17670b70024835918a0382
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19864
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch adds the validation rules on the texture usage scope with
storage textures in one render pass.
1. Write-only storage cannot be used in combination with anything else
in the same render pass.
2. Sampled and read-only storage are allowed to be used in the same
render pass.
This patch also adds dawn_unittests to test the storage texture usage
scope in one render pass:
1. read-only or write-only storage only
2. read-only or write-only storage + sampled
3. read-only or write-only storage + output attachment
4. read-only + write-only
This patch also removes kWritableBufferUsages as it is not used in Dawn
at all.
BUG=dawn:267
TEST=dawn_unittests
Change-Id: Ib2a0f06ec8d183c5f812f87459c6b1b8f79937e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19820
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch enables the use of write-only storage textures in fragment
shader stage after the new decision in WebGPU CG.
BUG=dawn:267
TEST=dawn_unittests
Change-Id: Ia1884e5d1a8e63cf992d3518df7375c2b3a72c41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19784
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This is a reland of 6d9e4f8076
Now that the Chromium-side API change has landed, this CL can land.
Original change's description:
> Add ComparisonSampler binding type and validation tests
>
> Bug: dawn:367
> Change-Id: Iba1d3d03f6247a356b6f3fabfe7a7ba3c0753171
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18423
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
Bug: dawn:367
TBR=cwallez@chromium.org,kainino@chromium.org
Change-Id: I325d096e7ce092d17833429c3f54ef7c71189739
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20045
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
- Move RefCounted to common (from dawn_native) so that we can use
it from additional places.
- Use EXPECT_ macros instead of ASSERT_ in RefCounted tests for
improved logging on failures.
- Add a missing test for Ref::Detach.
- Plug memory leak in RaceOnReferenceRelease
Change-Id: Iaa7b11b5a6fa146e3c322143279a21a4ac027547
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19903
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
This reverts commit 6d9e4f8076.
Reason for revert: Breaks the roll in Chromium, gpu_sampler.cc must first be
fixed to use the new undefined value, before this can be landed.
Original change's description:
> Add ComparisonSampler binding type and validation tests
>
> Bug: dawn:367
> Change-Id: Iba1d3d03f6247a356b6f3fabfe7a7ba3c0753171
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18423
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:367
Change-Id: Ic071a601df2063bd2da5388b2e75c1a121924a69
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19983
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This reverts commit f93791ab62.
Reason for revert: breaks gl_tests on roll.
Original change's description:
> Special-case GetDefaultQueue in the wire
>
> This makes it so calling GetDefaultQueue always returns the same
> object. It required updating various WireTests to account for the
> additional wire calls.
>
> Bug: dawn:22
>
> Change-Id: I8c74374b7c732b8bb7d0490bbc740dee0d2dface
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19726
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
TBR=cwallez@chromium.org,kainino@chromium.org,enga@chromium.org
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:22
Change-Id: Id2f051b1d4be64a6e16ee8bbe998d72028660334
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19980
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch adds validation tests for invisible and unused bindings.
The tests create bindings for compute, fragment and none stage. So,
only some bindings are visible for a particular render/compute pass.
In addition, some visible bindings in bind groups are not used by
pipeline. But resources of all bindings in bind groups (including
invisible/unused bindings) should be tracked, in order to identify
resource usage conflicts.
Bug: dawn:365
Change-Id: Ibb8d45a1a7b69891a17b4949147a16ada4ed6bd8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18120
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This makes it so calling GetDefaultQueue always returns the same
object. It required updating various WireTests to account for the
additional wire calls.
Bug: dawn:22
Change-Id: I8c74374b7c732b8bb7d0490bbc740dee0d2dface
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19726
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This makes all backends register the default queue at device
initialization time, so that the same queue is returned by
each call to GetDefaultQueue.
All usages of CreateQueue are replaced by GetDefaultQueue
except a couple ones that could use the queue initialized by
DawnTest::SetUp.
A deprecation warning mechanism is added so that users of Dawn
can now that they should upgrade their usage of the API. It also
comes with a backdoor so we can test that they are emitted.
New DeprecatedAPITests are added that will contain tests for
deprecated APIs, and will also check that deprecation warnings
are produced.
The special casing of GetDefaultQueue in the wire will be done
in a follow-up CL to ease the review. It happens to work through
the regular wire mechanisms at the moment but returns a different
object on each GetDefaultQueue call.
Bug: dawn:22
Change-Id: I78dc1fa474769674278d30040e8d05c658b88360
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19724
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This target was forgotten in the previous cleanup.
Bug: chromium:1064305
Change-Id: Ibf35df4393927ac8cc08d4965b8b8098c36e4bd3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19860
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This layer replaces VK_LAYER_LUNARG_standard_validation that is now
deprecated.
Bug: dawn:388
Change-Id: I488c175b997434a8e22deecfba3fc89495969cbc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19722
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
On macOS we can't rely on having the Vulkan loader installed in the
system. So we add the Vulkan loader as an optional dependency of Dawn
and use it on macOS when building Dawn in standalone with Vulkan
support.
Usage of building our own loader might broaden if the loader gains
features that are useful on other OSes. For example the ability to pass
in the "root ICD" entrypoint to the loader so we can have both
Swiftshader and the system driver at the same time.
Bug: dawn:388
Change-Id: I7ade4961cce0463c66846ad17aebf95224f1afcc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19723
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
It's possible for a heap in the residency LRU to outlive the
ResidencyManager. When this happens, some heap in the LRU will be
referencing the LRU head node. On destruction, the outstanding heap
will attempt to access the LRU head node after the memory has been
freed. This commit removes the LinkedList head node from the list
within the LinkedList destructor to fix the bug.
Bug: dawn:387
Change-Id: I13617d1b4e464e1541f989f31caecd4305037019
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19581
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
In the case that a previous submit to the GPU required Dawn to exceed
the residency budget, Dawn must attempt to get back under budget the
next time EnsureCanMakeResident is called. This CL fixes a bug where we
only evicted the current size needed to be resident, which would
incorrectly raise the budget when a submit to the GPU required us to
exceed the budget.
Bug: dawn:193
Change-Id: I04649056e9eecce1fc6b5759c889b52a4f1b4594
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Makes it easier to track where and why a test failed.
Bug: none
Change-Id: Icdccde97db68c32c35af6c044a3eacd4d4978b61
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19701
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Accessing the d3d device using COM needlessly
refcounts. This is a particular issue in areas
that frequently access the d3d device like
Populate().
BUG=dawn:155
Change-Id: I24e83093623afd02fa592d8ec0c404b4571c374b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19703
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
DynamicUploader/RingBuffer were incorrectly assuming that they could not
get empty allocation requests. Fix this and add a test.
The test also surfaced a bug in the Metal backend where the command
recording context could be left with a blit encoder open that was not
properly handled on device shutdown.
Bug: chromium:1069076
Change-Id: I9793b37142bd509254ce2894fa9f6208e9a68048
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19291
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Also fixes an uninitialized variable in tests.
Roll build/ f3d0ca5f4..896323eed (1627 commits; 2 trivial rolls)
f3d0ca5f46..896323eeda
$ git log f3d0ca5f4..896323eed --date=short --no-merges --format='%ad %ae %s'
2020-04-14 chromium-autoroll Roll Fuchsia SDK from 0.20200414.2.1 to 0.20200414.3.1
2020-04-14 sergey.kipet gtkui: Fix standalone Ozone/Wayland configuration
2020-04-14 gbiv Reland "compiler: remove `!is_android` from CrOS thinlto checks"
2020-04-14 wez [fuchsia] Add //fuchsia/SECURITY_OWNERS and per-file OWNERS using it.
2020-04-14 hypan android: Add emulator avd specific OWNERS files
2020-04-14 chromium-autoroll Roll Fuchsia SDK from 0.20200413.3.1 to 0.20200414.2.1
2020-04-14 hypan emulator: Add option "--debug-tags" for avd start
2020-04-14 chromium-autoroll Roll Fuchsia SDK from 0.20200413.2.1 to 0.20200413.3.1
2020-04-13 steveroe Reland "[fuchsia] Collect Fuchsia system logs from Chrome-Fuchsia tests."
2020-04-13 chromium-autoroll Roll Fuchsia SDK from 0.20200413.1.1 to 0.20200413.2.1
2020-04-13 chromium-autoroll Roll Fuchsia SDK from 0.20200412.2.1 to 0.20200413.1.1
2020-04-13 wez Revert "[cipd] Refactor CIPD template"
2020-04-13 hirokisato Revert "Manually roll chromite to pick up localhost vs VM fixes."
2020-04-13 chromium-autoroll Roll Fuchsia SDK from 0.20200412.1.1 to 0.20200412.2.1
2020-04-12 atyfto [cipd] Refactor CIPD template
2020-04-12 chromium-autoroll Roll Fuchsia SDK from 0.20200412.0.1 to 0.20200412.1.1
2020-04-12 chromium-autoroll Roll Fuchsia SDK from 0.20200410.3.1 to 0.20200412.0.1
2020-04-11 dmazzoni Re-enable some Android content_browsertests
2020-04-11 chromium-autoroll Roll Fuchsia SDK from 0.20200410.2.2 to 0.20200410.3.1
2020-04-10 cduvall Revert "Use .r8dex.jar and .mergeddex.jar rather than .dex.zip"
2020-04-10 bpastene Manually roll chromite to pick up localhost vs VM fixes.
2020-04-10 chromium-autoroll Roll Fuchsia SDK from 0.20200409.3.1 to 0.20200410.2.2
2020-04-10 leuisken fix vs%s_install environment variable
2020-04-10 huangs [Build] print_python_deps.py: Use importlib.util for Python 3.
2020-04-10 chromium-autoroll Roll Fuchsia SDK from 0.20200409.2.1 to 0.20200409.3.1
2020-04-10 nhiroki Revert "Android: Use lint from cmdline-tools"
2020-04-10 wnwen Android: Use lint from cmdline-tools
2020-04-09 chromium-autoroll Roll Fuchsia SDK from 0.20200409.1.1 to 0.20200409.2.1
2020-04-09 bsheedy Optimize Android Skia Gold code
2020-04-09 agrieve Use .r8dex.jar and .mergeddex.jar rather than .dex.zip
2020-04-09 chromium-autoroll Roll Fuchsia SDK from 0.20200409.0.1 to 0.20200409.1.1
2020-04-09 ddorwin [Fuchsia] Add ddorwin to OWNERS
2020-04-09 huangs [Build] extract_unwind_tables.py: Remove temp file usage.
2020-04-09 chromium-autoroll Roll Fuchsia SDK from 0.20200407.1.1 to 0.20200409.0.1
2020-04-08 jeffyoon [ios] moving test runner xcode version to //testing/buildbot
2020-04-08 agrieve Android: Always run Desugar.jar as well as d8 desugaring
2020-04-08 akiss Add use_external_fuzzing_engine build argument
2020-04-08 wnwen Android: Use dots to distinguish java build steps
2020-04-08 agrieve apk_operations.py: Don't look for .mapping file for release builds
2020-04-08 hypan emulator: add "--dry-run" option for avd create
2020-04-08 wez [fuchsia] Migrate cr_package_fuchsia() to use SDK-provided rules.
2020-04-08 vasilyt Reland "Build: remove resource_dirs support"
2020-04-08 spang Revert "[fuchsia] Migrate cr_package_fuchsia() to use SDK-provided rules."
2020-04-07 agrieve Add more logging to compile_resources.py
2020-04-07 agrieve Add a \n to the end of AndroidManifest.expected
2020-04-07 chromium-autoroll Roll Fuchsia SDK from 0.20200407.0.1 to 0.20200407.1.1
2020-04-07 chromium-autoroll Roll Fuchsia SDK from 0.20200406.3.1 to 0.20200407.0.1
2020-04-07 brucedawson Better asserts on missing files during gn gen
2020-04-07 chromium-autoroll Roll Fuchsia SDK from 0.20200406.2.3 to 0.20200406.3.1
2020-04-06 xhwang media: Remove enable_mojo_media gn arg
(...)
2019-08-14 pcc Only link against libandroid_support on 32-bit platforms.
2019-08-14 thakis win: Remove msvc_use_absolute_paths gn arg.
2019-08-14 agrieve Android: Remove use_r8 flag and respect proguard_jar_path when set.
2019-08-14 robliao Start A List of Areas to Consider when Updating the Windows SDK
2019-08-14 hans Roll clang 365097:368742.
2019-08-14 aluo Make chrome smoke test self-testing and fix launch intent flags.
2019-08-14 chromium-autoroll Roll Fuchsia SDK from 890518145943 to 890514841981
2019-08-14 chromium-autoroll Roll Fuchsia SDK from 890520283089 to 890518145943
2019-08-14 svillar Fix build with BLINK_ANIMATION_USE_TIME_DELTA enabled
2019-08-14 ntfschr apk_operations: allow downgrade for bundle installs
2019-08-14 wez [Fuchsia] Remove legacy constant names from FIDL/JS.
2019-08-14 chromium-autoroll Roll Fuchsia SDK from 890523177803 to 890520283089
2019-08-13 wez [Fuchsia] Update FIDL/JS generator for 64-bit method ordinals.
2019-08-13 chromium-autoroll Roll Fuchsia SDK from 890525926525 to 890523177803
2019-08-13 chromium-autoroll Roll Fuchsia SDK from 890528724273 to 890525926525
2019-08-13 chromium-autoroll Roll Fuchsia SDK from 890530860946 to 890528724273
2019-08-13 wez Revert "Reland "[Fuchsia] Make hardware boot image downloading opt-in by .gclient.""
2019-08-13 kmarshall Reland "[Fuchsia] Make hardware boot image downloading opt-in by .gclient."
2019-08-12 chromium-autoroll Roll Fuchsia SDK from 890533504707 to 890530860946
2019-08-12 agrieve Android: Delete last references to "resource_rewriter" .build_config type
2019-08-12 justincohen Reland "[ios] Goma use is forbidden for official iOS builds."
2019-08-12 justincohen Revert "[ios] Goma use is forbidden for official iOS builds."
2019-08-12 thakis clang docs: mention llvm_force_head_revision
2019-08-12 chromium-autoroll Roll Fuchsia SDK from 890536058498 to 890533504707
2019-08-12 chromium-autoroll Roll Fuchsia SDK from 890539920088 to 890536058498
2019-08-12 huangs [DevUI DFM] Add BUILDFLAG(DFMIFY_DEV_UI).
2019-08-12 sidereal Revert "Reland "Roll clang 365097:368354.""
2019-08-11 chromium-autoroll Roll Fuchsia SDK from 890541741734 to 890539920088
2019-08-11 chromium-autoroll Roll Fuchsia SDK from 890544660006 to 890541741734
2019-08-11 chromium-autoroll Roll Fuchsia SDK from 890547849076 to 890544660006
2019-08-11 chromium-autoroll Roll Fuchsia SDK from 890550071829 to 890547849076
2019-08-10 thakis Revert "clang tot bots: Disable Wdangling-field"
2019-08-10 chromium-autoroll Roll Fuchsia SDK from 890552937159 to 890550071829
2019-08-10 chromium-autoroll Roll Fuchsia SDK from 890555439656 to 890552937159
2019-08-10 chromium-autoroll Roll Fuchsia SDK from 890557346683 to 890555439656
2019-08-10 kmarshall Revert "[Fuchsia] Make hardware boot image downloading opt-in by .gclient."
2019-08-10 thakis clang tot bots: Disable Wdangling-field
2019-08-10 kmarshall [Fuchsia] Make hardware boot image downloading opt-in by .gclient.
2019-08-09 rnk Reland "Roll clang 365097:368354."
2019-08-09 thakis mac: Create all parent directories of build/mac_files/xcode_binaries
2019-08-09 chromium-autoroll Roll Fuchsia SDK from 890560294264 to 890557346683
2019-08-09 sclittle Revert "Roll clang 365097:368354."
2019-08-09 rnk Roll clang 365097:368354.
2019-08-09 thomasanderson Switch Linux/Ozone to build with GTK
2019-08-09 justincohen [ios] Goma use is forbidden for official iOS builds.
2019-08-09 thakis mac: Stop downloading full hermetic Xcode.
2019-08-09 cliffsmo Add delayloads for full browser test libraries
2019-08-09 thakis clang tot bots: Disable Wreturn-stack-address
2019-08-09 chromium-autoroll Roll Fuchsia SDK from 890562890212 to 890560294264
2019-08-09 chromium-autoroll Roll Fuchsia SDK from 890565823233 to 890562890212
Roll buildtools/ 74cfb5700..2c41dfb19 (26 commits; 1 trivial rolls)
74cfb57006..2c41dfb19a
$ git log 74cfb5700..2c41dfb19 --date=short --no-merges --format='%ad %ae %s'
2020-03-30 tvanderlippe Update clang-format version to eb85e90350e
2020-03-23 brettw Roll GN from 9499562d..5ed3c9cc
2020-03-12 agrieve Roll GN from fd3d768b..9499562d
2020-03-10 thakis roll gn 4166e9fbc1f..fd3d768bcfd4
2020-02-29 xiaohuic Clean up buildtools repo migration code
2020-02-24 thakis Revert "Roll libunwind 43bb9f8722..d999d54f4b"
2020-02-21 thakis Roll libunwind 43bb9f8722..d999d54f4b
2020-02-21 seblalancette Roll GN from 97cc440d..4166e9fb
2020-02-21 bpastene Reland: Pull libunwind, libcxx, libcxxabi from a different mirror.
2020-02-19 bpastene Revert "Pull libunwind, libcxx, libcxxabi from a different mirror."
2020-02-19 thakis Pull libunwind, libcxx, libcxxabi from a different mirror.
2020-01-28 thakis Roll GN 83dad00a:97cc440d
2020-01-28 thakis Reformat remaining gn files.
2020-01-21 sdefresne Roll GN 0c5557d173..83dad00afb
2020-01-16 thakis Reformat all gn files in /buildtools/third_party/libc++.
2020-01-16 felipesalazar Include cxa_thread_atexit on linux targets.
2020-01-13 thakis Roll GN a5bcbd726a..0c5557d17
2020-01-08 bpastene Update //buildtools/README.txt after it was merged into chromium.
2019-12-31 agable Roll GN from 6feb5599..a5bcbd72
2019-12-13 chouinard Roll GN from ad9e442d..6feb5599
2019-11-18 xiaohuic Reland: Roll src/buildtools/third_party/libc++/trunk/ 5938e0582..78d6a7767 (333 commits)
2019-10-28 xiaohuic Revert "Roll src/buildtools/third_party/libc++/trunk/ 5938e0582..78d6a7767 (333 commits)"
2019-09-13 hnakashima Add exception for libassistant to import checker.
2019-09-10 dpranke Add a COMPONENT entry (Build) for //buildtools.
2019-09-10 dpranke Roll GN from 152c5144..ad9e442d
Roll third_party/binutils/ 01aa7745b..f9ce77769 (2 commits)
01aa7745b0..f9ce777698
$ git log 01aa7745b..f9ce77769 --date=short --no-merges --format='%ad %ae %s'
2020-04-03 adetaylor Adding CPEPrefixes for more dependencies.
2019-10-07 efoo Add "# COMPONENT" to OWNERS files
Roll tools/clang/ 3605577b6..698732d5d (129 commits)
3605577b67..698732d5db
$ git log 3605577b6..698732d5d --date=short --no-merges --format='%ad %ae %s'
2020-04-10 aeubanks Point TODOs at newer bug
2020-04-09 inglorion goma_link: Add more unit tests, split from integration tests
2020-04-09 johannkoenig remove GarbageCollectedFinalized plugin flag
2020-04-09 jabolopes Fix garbled diff output in clang test tool.
2020-04-08 inglorion goma_link_tests: Require Python 3
2020-04-03 aeubanks Revert "Use urllib instead of curl"
2020-04-03 aeubanks Use urllib instead of curl
2020-04-03 hans Clang package: build with -DLIBCXX_ENABLE_{SHARED,STATIC}=OFF
2020-04-02 akhuang Reland "clang build.py: change LLVM_ENABLE_ZLIB from ON to FORCE_ON"
2020-04-01 bikineev blink_gc_plugin: Add check for WeakPtrs to GCed objects
2020-03-31 bikineev blink_gc_plugin: Change RefPtr to scoped_refptr
2020-03-31 hans Roll clang n345938-a1762f9c-1 : n346557-4e0d9925-1.
2020-03-29 jdoerrie [clang tools] Don't print edit lines when no replacements exist
2020-03-26 rnk Update clang blink gc plugin test expectations
2020-03-25 agable Revert "clang build.py: change LLVM_ENABLE_ZLIB from ON to FORCE_ON"
2020-03-25 akhuang clang build.py: change LLVM_ENABLE_ZLIB from ON to FORCE_ON
2020-03-24 thakis Roll clang n345635-5d881dd8-1 : n345938-a1762f9c-1.
2020-03-20 inglorion goma_link_tests: Add test for -gsplit-dwarf
2020-03-19 hans Roll clang n344329-9284abd0-6 : n345635-5d881dd8-1.
2020-03-18 inglorion Update goma_link_tests to look for '<func>' instead of 'func'
2020-03-15 thakis Revert "Change to download and build zlib every time, in case a bot happens to die during a build"
2020-03-14 inglorion Pass -g* flags to code generation in distributed ThinLTO
2020-03-14 akhuang Change to download and build zlib every time, in case a bot happens to die during a build
2020-03-13 aeubanks Create new branch at origin/master, don't specify -r in git cl try
2020-03-13 akhuang Clang build.py: add zlib to linker search path so that cmake can find it
2020-03-12 hans Clang packaging script: don't do separate threads-enabled and disabled builds
2020-03-11 thakis clang build: enable in-process cc1 at clang build time instead of with a compiler flag.
2020-03-10 thakis Make run_tool.py less spammy after /showIncludes:user change.
2020-03-09 hans Clang packaging script: don't build lld with thinlto
2020-03-06 hans Revert "IWYU for bind/callback_helpers.h and ptr_util.h"
2020-03-06 thakis Roll clang n343707-61f538d3-1 : n344329-9284abd0-1.
2020-03-06 gab IWYU for bind/callback_helpers.h and ptr_util.h
2020-03-05 rnk Blink GC plugin: Fix tests after addition of const qual
2020-03-04 omerkatz heap: Make all TraceAfterDispatch methods const
2020-02-27 ehsankia Remove infrastructure for multiple extractor backend.
2020-02-26 hans Roll clang n341867-c2900381-1 : n343707-61f538d3-1.
2020-02-18 omerkatz heap: Add omerkatz@ as GC and GC plugin owner
2020-02-10 inglorion Fix fallback logic in goma_ld.py
2020-02-09 thakis Roll clang n340759-eaabaf7e-2 : n341867-c2900381-1.
2020-02-05 inglorion Correct fallback and mtime in distributed ThinLTO scripts
2020-02-04 akhuang Use zlib to build LLVM on Windows.
2020-02-04 inglorion Add scripts for distributed ThinLTO
2020-02-03 keishi blink_gc_plugin: Handle TraceIfNeeded for resolved T
2020-01-31 thakis clang upload script: Use Cq-Include-Trybots: for internal bots too.
2020-01-30 thakis clang upload script: Move list of bots from docs to Cq-Include-Trybots:.
2020-01-29 thakis Fix some more compile errors after upstream 777180a32b6107 in blink clang plugin
2020-01-29 thakis Fix some compile errors after upstream 777180a32b6107 in blink clang plugin
2020-01-29 thakis Fix some clang tool compile errors after upstream 777180a32b6107
2020-01-29 hans Roll clang n332890-c2443155-2 : n340759-eaabaf7e-1.
2020-01-28 enga Revert "Roll clang n332890-c2443155-2 : n340584-68051c12-1."
(...)
2019-11-15 hans Remove tools/clang/scripts/download_lld_mac.py
2019-11-15 hans Remove tools/clang/scripts/download_objdump.py
2019-11-11 hans Add UBSan runtime to the Mac Clang package
2019-11-05 thakis win: upload pdb for clang_rt.asan_dynamic-x86_64.dll to symbol server.
2019-11-05 hans Clang update.py: Add --package option
2019-10-30 johnchen Revert "Roll clang 373424-64a362e7-1 : n330255-55c223a7-1."
2019-10-29 hans Roll clang 373424-64a362e7-1 : n330255-55c223a7-1.
2019-10-24 hans Make upload_revision.py do a git checkout so it can get the commit count
2019-10-24 Taylor.Woll Add libclang package to sit alongside prebuilt LLVM binaries
2019-10-22 hans Clang build.py: LLVM no longer has SVN revision numbers
2019-10-15 hans Clang package.py: Don't run 'git diff' before building
2019-10-15 hans Clang build.py: Nuke the source dir if there is a local diff
2019-10-15 mlippautz heap: Add bikineev@ as GC and GC plugin owner
2019-10-03 thakis clang upload script: include full svn-git-sub triple in generated cl text.
2019-10-02 thakis Roll clang 372314:373424.
2019-09-25 rnk Fix crbug number in comment for 962988
2019-09-24 nicolaso Reland: "[Traffic Annotation] Remove function_context from extractor output"
2019-09-24 raul tools/: Convert uses of has_key
2019-09-24 hans Fix process-graph.py after #698787, take 2
2019-09-24 hans Fix process-graph.py after #698787
2019-09-23 hans Build Clang using profile-guided optimization on Windows
2019-09-22 raul tools: Use Python 3 style print statements [2/9]
2019-09-20 hans Roll clang 371856:372314.
2019-09-20 bikineev blink_gc_plugin: Remove GCFinalized and related diagnostics
2019-09-16 thakis Roll clang 371202:371856.
2019-09-13 mlippautz gc-plugin: Add mlippautz as owner
2019-09-12 tandrii Specify -B <bucket> where to trigger optional tryjobs.
2019-09-12 bikineev blink_gc_plugin: Check for correct use of CRTP
2019-09-12 bikineev Change clang subrevision to reflect changes in blink-gc-plugin
2019-09-11 bikineev blink_gc_plugin: Add no-gc-finalized options
2019-09-06 thakis Roll clang 370156:371202.
2019-09-05 thakis Roll clang 369647:370156.
2019-09-02 mlippautz [Stack Map Artefact] Add compiler plugins needed for safepoints
2019-09-01 thakis Fix Wfinal-dtor-non-final-class in plugin tests.
2019-08-29 contact Update BaseBindRewriters to convert base::BindRepeating to base::BindOnce
2019-08-28 hans Build clang with gcc 5.3.0 on Linux
2019-08-28 jakehughes [Stack Map Artefact] Introduce moving heap and root relocation
2019-08-28 jakehughes Layout initial experimental stack map gc design
2019-08-23 medinaandres Added revision to build_clang_tools_extra.py
2019-08-22 hans Roll clang 365097:369647.
2019-08-20 thakis clang upload script: Skip presubmits on upload.
2019-08-17 thakis clang: Attempt to fix plugin compilation after llvm r369130.
2019-08-16 hans Clang build script: Remove NDK r16 workaround
2019-08-15 jmadill Revert "Roll clang 365097:368742."
2019-08-14 hans Roll clang 365097:368742.
2019-08-12 sidereal Revert "Reland "Roll clang 365097:368354.""
2019-08-09 rnk Reland "Roll clang 365097:368354."
2019-08-09 sclittle Revert "Roll clang 365097:368354."
2019-08-09 rnk Roll clang 365097:368354.
2019-08-09 thakis clang mac tot bots: Stop setting DEVELOPER_DIR.
Created with:
roll-dep build buildtools third_party/binutils tools/clang
Bug: None
Change-Id: Ice39068a904341972861759771f4793ea2aa694b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19601
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This is a temporary fix until dawn_wire can support multiple devices.
When using objects from different devices, the wire will inject an
error into the receiver object's device. Methods that return objects
will return a dummy object. Using the dummy object will cause a fatal
error on the server.
Without this fix, the server would blindly lookup an ObjectId which
could point to some other object. This would bypass same-device
validation and have incorrect results.
Bug: dawn:383
Change-Id: I898f07d4b26f2a97ef952b82af488e7f807c36f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19261
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
The upstream WebGPU spec decided to not pursue CreateBufferMappedAsync,
and it adds some complexity to Dawn, so we remove it.
Bug: dawn:22
Change-Id: I4182a90c4a1aa0bfbaecd7d8f67d7049cf5df5d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/17321
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This prevents the client from continuing to send commands
when the wire connection has dropped. In Chromium this may
be because the connection to the GPU process is lost and the
transfer buffer may be destroyed.
This CL also adds a new helper to make testing callbacks
with mocks easier.
Bug: chromium:1070392
Change-Id: I6a69c32cc506069554ead18ee83a156ca70e2ce2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19160
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This was found during some changes in Google3.
Also renames BitsPerWord to kBitsPerWord.
Bug:
Change-Id: I80cfe3a391963c2da376a7d8eadfc2797df01894
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19286
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It also changes remaining deps for internal targets
from libdawn_proc to dawn_proc.
Bug: chromium:1064305
Change-Id: I36df2b5d7793be9d6c878b6a1f2ec238603a8205
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19289
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This change adds more resource binding related tests to clarify some
validation rules.
Bug: dawn:359
Change-Id: I16eca96c22c0d5f3f16dce5151bcabfd04d28349
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18940
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
None visibility of shader stage bindings should be supported in
bind group. But Dawn can't support it. The patch fixed this issue.
Bug: dawn:385
Change-Id: I5b747abead24050b56b0fd0a9de561c87df4e36e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19340
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This is a more accurate name and conflicts less with the callback
request serials.
Bug: none
Change-Id: I0f9660c24468064dadffb3ab9b3392d403f93c41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19260
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
It's possible though unlikely to overflow the generation for a given
ObjectId. If this happens, an object like a Buffer or Fence could begin
receiving callbacks for previously destructed objects. This CL makes it
so the client doesn't reuse ObjectIds once they've hit the max generation
number so overflow isn't possible.
Bug: dawn:381
Change-Id: I443c1c87d96614a95d1973e2bf18cd702c34b3f9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19240
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is required for the call to the IsWindow function that's in
Surface.cpp.
Bug: chromium:1064305
Change-Id: I0c4a6ed17ba4aada994262d393de142de3f26144
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/19282
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>