If the copy region generated from 2D texture copy splitter has an
empty first row due to alignment adjustment and we simply extend
it to all copied depth slices, the copy region will be incorrect
for 3D texture copy.
If there is an empty first row and the copy height is odd, we can
split the copy region into two:
- copy0: copy the first depth slice
- copy1: copy the rest depth slices because there is no empty
row after alignment adjustment
This method resolves the remaining problem when copy height is 1.
It also is an optimization for other odd copy height cases, say
copy height is 3, 5, 7, etc.
This change implements the special situation when the copy region
generated from 2D texture copy splitter has an empty first row and
its copy height is odd.
Bug: dawn:547
Change-Id: Idf4f4a9b87f783c5328463e0f4182429a7e809f1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53885
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Deprecates the computeStage member of the descriptor in favor of compute
as described by the spec. In order to support both variants without
breaking backwards compatibility some code had to be manually added to
the wire client to copy from the deprecated member to the new one and
visa versa.
Change-Id: I9d5c2fc9c446c927c5792c9af9ed56c90060b65b
Bug: dawn:800
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53884
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The change implements copy non-zero mip level for 3D textures
on D3D12 when the texture has multiple mip levels. The texture
size on level 0 can be either 256-byte aligned or 256-byte
unaligned(its size is non-power-of-two).
Bug: dawn:547
Change-Id: I8ed74fa587cfd814e7f526173dcb653d0a252a1e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51201
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
- Pipeline statistics query is not fully implemented, disallow its
creation as unsafe
- Add pipeline statistics creation in UnsafeAPIsTest, because it needs
enable extension, add a separate test class for it.
BUG: chromium:1177506
Change-Id: Ic77e04c9c854b396e7240674bd9deb0caf97a513
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53889
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
On macOS 10.15 on AMD GPU, WriteTimestamp cannot be called without any
copy commands on MTLBlitCommandEncoder, otherwise crash occurs. But this
issue is not reproduced on macOS 11.0, just disable timestamp query on
the bad version on AMD.
BUG: dawn:545
Change-Id: I69a012b2091b8ccd251d23ddb26b72e06c07492f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53581
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This allows the client to specify a different release key for the keyed
mutex than the default of acquire key + 1. If the release key is the
sentinel value of UINT64_MAX, it's set to acquire key + 1. Once Chromium
transitions to always specifying the release key, it will be made a
required parameter and the default behavior will be removed.
Bug: chromium:1213977
Change-Id: I327f7157bb7ff23cf216e43043568ce7c6f38a60
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53880
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Implements two basic binding tests requested in a previous review. Moves
ExternalTextureState enum to be private.
Bug: dawn:798
Change-Id: I9e5ac31a92bab26b7d68568802db1fa988e849a9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53700
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones (Intel) <brandon1.jones@intel.com>
If there is an empty row at the beginning of a copy region due to
alignment adjustment, this copy region split by 2D texture splitter
will be definitely incorrect for 3D textures because every depth
slice (except the first slice) will wrongly skip one row. We need
to recompute this copy region via modifying this copy region and
adding a couple more copy regions for the empty first row issue.
The idea of recomputation is:
- modify this copy region and don't copy the last row in order to
make its bufferSize.height not exceed rowsPerImage,
- use one more copy region to handle the last row of each depth
slice except the last depth slice,
- use another copy region to handle the last row of the last depth
slice.
Bug: dawn:547
Change-Id: Ib2f6019963ed29d62a9f13d7316b5f04801db8c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52341
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The unavailable queries are allowed in ResolveQuerySet and resolved to
0s, which has been fixed in
https://dawn-review.googlesource.com/c/dawn/+/48320.
BUG: dawn:434
Change-Id: I72b1f0b621fc22a7a0d30c407c7359e59d7b905c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53762
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Add a toggle named "dump_translated_shaders", and when this toggle
is enabled, translated HLSL shaders will be dumped and log via
Device::EmitLog in the kInfo logging level.
BUG: dawn:792
Change-Id: Ia5ccc96019c32b43aa315f080f80a26919b441e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53580
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
There have been some bugs seen with this on some platforms.
Bug: dawn:838
Change-Id: I29fa483eee3c299960d2c998fce90d918ac4dc9d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52560
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
When we are copying data, we need to offset "rowsPerImage" rows
for each depth slice, even though this is a partial copy whose
copy height is less than rowsPerImage.
In addition, when we copy the original data into expected buffer
for comparison, we don't pack data for T2B copy and T2T copy. We
don't remove paddings during copy. So I renames PackTextureData
to CopyTextureData. For B2T copy, we do pack data. Right now we
name it CopyXXXX and we pack the data during some copies, it is
understandable. But if we name it PackXXXX but don't pack data
sometimes, it is weird. In addition, for B2T copy, we pack the
data, so I shorten the buffer size we allocated for comparison.
This change also renames "slice" to "layer" if it includes multiple
depth slices and actually means a layer, but keep slice as slice if
it means an array layer or a depth slice for different cases.
Bug: dawn:547
Change-Id: I6d82e6c25f50bd4c988b1f65f85b24ad1c191d01
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53501
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Add timestamp query back in Metal supported extensions, and calculate
the timestamp period based on CPU timestamps and GPU timestamps sampled
on device.
There is a crash issue (dawn:545) on macOS 10.15 on AMD devices, but
cannot be reproduced on macOS 11.0+, we can just disable it on AMD with
macOS 10.15 in the following CL.
Bug: dawn:434
Change-Id: Icb4823e7c3115776e64c6a41fd0aea0f6536ccdf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51720
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
If we are copying a partial of rows, the buffer size doesn't need
to be that large of the entire image which has "rowsPerImage" rows.
There was a bug in texture copy splitter. And this workaround was
introduced at https://dawn-review.googlesource.com/c/dawn/+/30741
in order to workaround that bug. D3D12 validation is actually correct.
Now that we have fixed the bug at
https://dawn-review.googlesource.com/c/dawn/+/52680/. The workaround
is not needed.
Bug: dawn:547, dawn:520
Change-Id: I92292c71dc5479fc2ba863eb9f897516bd1a96a0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53360
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Details:
- Add the logging level type WGPULoggingType, including levels verbose,
info, warning, and error,
- Add the API SetLoggingCallback, which bind the callback to deal with
logging string,
- Add the return command DeviceLoggingCallback and related code,
- Add DeviceBase::EmitLog(WGPULoggingType, const char*) , and
DeviceBase::EmitLog(const char*) use WGPULoggingType_info as default,
to post logging from native or server device to bound callback
via CallbackTaskManager.
BUG: dawn:792
Change-Id: I107b9134ff8567a46fa452509799e10b6862b8d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52200
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
This patch implements the asynchronous path of CreateComputePipelineAsync
on D3D12 backend with the basic framework of the dawn_unittest
AsyncTaskTest.Basic.
1. Call the constructor of dawn_native::d3d12::ComputePipeline in the main
thread.
2. Execute dawn_native::ComputePipelineBase::Initialize() (a virtual function)
asynchronously.
3. Ensure every operation in dawn_native::d3d12::ComputePipeline::Initialize()
is thread-safe (PersistentCache).
4. Save all the return values (pipeline object or error message, userdata, etc)
in a CreateComputePipelineAsyncWaitableCallbackTask object and insert this
callback task into CallbackTaskManager.
5. In Callback.Finish():
- Insert the pipeline object into the pipeline cache if necessary
- Call WGPUCreateComputePipelineAsyncCallback
Note that as we always handle the front-end pipeline cache in the main thread,
we don't need to make it thread-safe right now.
BUG=dawn:529
TEST=dawn_end2end_tests
Change-Id: I7eba2ce550b32439a94b2a4d1aa7f1b3383aa514
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47900
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is blocking the Tint roll which adds validation that
textureSampleCompare cannot be used in the compute stage.
Simply disabling this test for now since WGSL discussions seem to
indicate there may be a builtin added with a different name and
semantics.
Change-Id: Iaecf5865c9fb38aea3231c3ae823d783a665984d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
In every copy region, its bufferSize.height minus rowsPerImage
can be texture format's blockInfo.height (it is 1 for uncompressed
formats) at most, and it appears only if bytesPerRow is 256 and
copySize on height is a full copy.
This change will benefit 3D texture copy splitter via removing
unwanted empty rows issues. Because empty rows in 3D copy splitter
may lead to recompute/modify copy regions and there might be new
copy regions added.
The removed empty row situations are:
1) Partial copy on height: copySize.height < rowsPerImage *
blockInfo.height
2) bytesPerRow is greater than 512. For example, if bytesPerRow
is 512 and data in one row straddles two rows and there is no
empty row at the first part. The second part will have a fake
empty row if we don't recompute its alignedOffset.
3) There are two empty rows in a copy region. For example:
if data in one row straddles two rows and there is an empty row
in the first copy region. Then there will be two empty rows in
the copy region of the second part if we don't recompute the
alignedOffset.
This change also fixes an issue found by Corentin that copy related
argument "rowsPerImage" should not take effect when we are copying
one single depth or array slice.
Bug: dawn:547
Change-Id: I603291d559de1d05e420e5ed1f4cabf53de5a93f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52680
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Tests are based on the IOSurfaceWrappingTests.
Sampling tests are not implemented, since they would require
support for the samplerExternalOES sampler type in WGSL.
Bug: chromium:1205155
Change-Id: Icc114eaf6efaee93f1b8486e615f0fd307f23080
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50201
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Instead of having it as a decoration.
The old style is now deprecated and will be removed soon.
See https://github.com/gpuweb/gpuweb/pull/1735 for the WGSL spec change.
Bug: tint:846
Change-Id: Id2fa681ddf7b97cd3fa41d7b5538029d96db7e28
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53082
Reviewed-by: Corentin Wallez <cwallez@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This toggle will be used by Chromium to disallow the unsecured SPIR-V
path such that a renderer process can only use WGSL.
This new toggle will be covered by a test in Chromium that ensures that
in the default configuration SPIR-V is disallowed.
Bug: chromium:1214923
Change-Id: Ia67e0c7466044e1086399d995dc841426fe604c9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52781
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This patch removes the function declarations which don't have their
function bodies.
BUG=None
Change-Id: Id16c2a225319331cdbc3a827ebbabf58c16e1dfd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53140
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch re-enables the T2T copy workaroudn on Intel Gen9 and Gen
9.5 GPUs because the latest released Intel D3D driver still cannot
handle some copies correctly in some copy shapes.
BUG=chromium:1161355
Change-Id: Ia96fe05c3e027f56a734331de03fe42745754cc3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/52960
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
And fix a bug where the Metal backend hit an ASSERT when
clearing combined depth/stencil textures by copy.
Bug: dawn:780
Change-Id: Idf3061570f63d0abd3e8a41d0c251db4f6dc7e0c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51840
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Expand coverage for these tests by using combinatorial test
parameterization. Covers more cases and expands coverage to
compressed textures. This caught a bug on Vulkan where only the
first region for multi-layer compressed texture copies was cleared.
It also caught a driver bug on some Intel platforms, where clearing
the non-zero mip of a depth texture does not work.
Bug: dawn:780
Change-Id: Ic601bae111c1c2dd150f569d7e02759ca765201e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51680
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This change mainly is a preparation for 3D texture copy splitter,
which will be based on 2D texture copy splitter and then revise
or recompute incorrect copy regions if needed.
The change itself mainly rename some variables and comments and
distiguish 3D texture copies from 2D (array) texture copies. For
example, term slice is changed to layer if it only refers to layer
slices in 2D textures and it is not shared by depth slices in 3D
textures.
Bug: dawn:547
Change-Id: I6f84134a4fbcb90708901a1059b60e78e1a25ca5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This is a header-only utility so it can be easily included and
used anyhere. Include it in DawnTest.h to automatically pick up
definitions to print test parameters.
Also, work around bot limitations for very-long test names.
Bug: none
Change-Id: I940263ab0a4cc415b06fa04749694f16ff08335c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51841
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This patch implements the default implementation of WaitableEvent
(AsyncWaitableEvent) with std::condition_variable instead of
std::future as std::future will always block its destructor until
the async function returns, which makes us unable to clean up all
the execution environment of the async task inside the async
function.
This patch also implements WorkerThreadTaskManager to manage all
the async tasks (inherited from WorkerThreadTask) in the future,
for example all the Create*PipelineAsync() tasks.
This patch also updates the related dawn_unittest WorkerThreadTest.
Basic.
BUG=dawn:529
TEST=dawn_unittests
Change-Id: Ie789ba788789e91128ffc416e7e768923828a367
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51740
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This is the last patch to replace DAWN_SKIP_TEST_IF with
DAWN_SUPPRESS_TEST_IF or DAWN_TEST_UNSUPPORTED_IF. With this patch
DAWN_SKIP_TEST_IF will be completely removed from Dawn.
BUG=dawn:779
Change-Id: I5aec03697877ff9c6fa175f8d16eba951dd94cfa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51806
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Not doing so produces an infinite loop when iterating from begin to end.
Bug: none
Change-Id: I323587a19ba1618d7e9a326de2ee398ae5e0bb7b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51762
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Renames all the RenderPipeline*2 stuff to simple RenderPipeline* but
keeps *2 definitionas around as typedefs and wrappers so that users can
migrate away from it.
Bug: dawn:22
Change-Id: If301d81a829bba0646c3a61068f2279932b191e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51764
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is the first part to completely replace DAWN_SKIP_TEST_IF
with DAWN_SUPPRESS_TEST_IF or DAWN_TEST_UNSUPPORTED_IF.
BUG=dawn:779
Change-Id: I1795eb4271de08667d43f24b64b42d15ca4b8071
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51721
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Fences are no longer part of the WebGPU spec, and have been removed from
Blink.
Bug: dawn:22
Change-Id: I240c4c4107acfaf9facec88a43a38b5ff327c7a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50702
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Currently, we use the device maximum supported shader model for DXC
compiler. Meanwhile, we should use HLSL version 2018 or above to support
the maximum shader model. Otherwise, it may report below errors:
Explicit template arguments on intrinsic Load requires HLSL version 2018
or above.
Bug: None
Change-Id: I7b1bfd1c08eb5ad30b2f7d59d280678bb71d1d64
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51460
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
These tests are used to demonstrate that different copy scenarios
will impact how TextureCopySplitter to split copy regions for 3D
textures on D3D12.
Bug: dawn:547
Change-Id: I49947387acaa61f4eacbcd5a18c6cd8db913d2d0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Also add macros to make it easier to generate a params struct.
This makes it possible to generate parameterized tests in
dawn_end2end_tests
Bug: none
Change-Id: I009475dcc08a5274f5871237a363489cff7298f1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51000
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This changes the call to SPIRV-Cross in the GLSL backend to always set
the binding= decoration on interface variables instead of changing the
variable name and matching against it as was done previously. This
matching by name was done for macOS's OpenGL driver's old version of GL
but isn't needed now that Dawn has a Metal backend for macOS.
This also fixes opengl::ShaderModule to iterate only on bindings that
are known to the layout as the reflection between SPIRV-Cross and Tint
can be different.
Bug: tint:808
Bug: tint:386
Change-Id: I308b8da5994d8618799cf6583f1b0e5ea2ba2069
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51520
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
`kExternalTexture` was recently added in tint, and now the compiler warns / errors that this isn't handled by the switch.
Add a default that is `UNREACHABLE()`.
Will fix one of the issues preventing a tint -> dawn roll.
Bug: dawn:728
Change-Id: I510526af46e1f1981a7434f615aa8ed5e56534cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51362
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This patch disables the workaround about the T2T copy issue (the Toggle
UseTempBufferInSmallFormatTextureToTextureCopyFromGreaterToLessMipLevel)
on the latest Intel Gen9 and Gen9.5 D3D driver (27.20.100.9466) which
contains the fix for this issue.
This patch also implements the D3D driver version comparison algorithm
for Intel drivers.
BUG=chromium:1161355
TEST=dawn_end2end_tests
Change-Id: I406598f2c5745214a60bfc43fb732d45360aa1fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51343
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This patch introduces two new macros to replace DAWN_SKIP_TEST_IF():
1. DAWN_SUPPRESSED_TEST_IF(): for the tests failing on a specific HW / backend /
OS combination
2. DAWN_TEST_UNSUPPORTED_IF(): for the tests which require an extension or a toggle
to be present /not present or some WIP features.
This patch also adds a command line parameter "--run-suppressed-tests" to disable
the macro DAWN_SUPPRESSED_TEST_IF(), so that we can test any tests that are related
to any specific HW / backend / OS combinations without changing the source code and
re-building dawn_end2end_tests.
This patch also replaces DAWN_SKIP_TEST_IF() with DAWN_SUPPRESSED_TEST_IF() or
DAWN_TEST_UNSUPPORTED_IF() in QueryTests.cpp and ShaderFloat16Tests.cpp to test
the functionality of these two new macros. DAWN_SKIP_TEST_IF() will be completely
replaced by DAWN_SUPPRESSED_TEST_IF() or DAWN_TEST_UNSUPPORTED_IF() in the next
patch.
BUG=dawn:779
Change-Id: I05db632c614b6ad348fcac85da84744e45be3ae1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51341
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Also fix and enable testing for texture initialization on OpenGLES.
This CL also factors code so that opengl::Texture::ClearTexture can
use the DoTexSubImage helper.
Note: Clearing of compressed textures on GL still unimplemented.
Bug: dawn:780
Change-Id: I5c1268ee570f2d4347d365465700dd416fbf5619
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50121
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Also add suppressions for tests failing after the ANGLE roll.
Roll third_party/angle/ 9a025fd44..835bcb1e2 (460 commits; 1 trivial rolls)
9a025fd448..835bcb1e27
$ git log 9a025fd44..835bcb1e2 --date=short --no-merges --format='%ad %ae %s'
2021-05-08 lexa.knyazev Vulkan: Support GL_EXT_texture_sRGB_RG8
2021-05-18 angle-autoroll Roll vulkan-deps from 055e71b2a367 to 3d799e0e9b08 (25 revisions)
2021-05-14 syoussefi Vulkan: Optimize respecifying an image
2021-05-17 syoussefi Vulkan: Fix a bug releasing DynamicBuffer-owned buffer
2021-05-13 cnorthrop Tests: Add Pokemon Go trace
2021-05-13 cnorthrop Capture/Replay: Add const to string pointer
2021-05-13 cnorthrop Capture/Replay: Skip glGetActiveUniform
2021-05-13 cnorthrop Capture/Replay: Reset programs on loop
2021-05-17 cnorthrop Skip Texture2DTest.TextureSize on Linux+GL+TSAN
2021-05-17 jmadill ANGLETest: Skip test setup/teardown on major error.
2021-05-17 jonahr Fix out_of_range error in System_utils_posix
2021-05-14 syoussefi Vulkan: Cleanup texture image respecify
2021-05-13 syoussefi Vulkan: Fix desc set cache bug with xfb offset
2021-05-14 jmadill Gold Tests: Implement flaky retries and sharding.
2021-05-17 angle-autoroll Roll SwiftShader from c4d054c6ad41 to af907708adb3 (2 revisions)
2021-05-17 angle-autoroll Roll Chromium from 3b747dab7bb3 to 9b886afc6e79 (485 revisions)
2021-05-14 gert.wollny Capture/Replay: Add suffix to label for test file search
2021-05-12 gert.wollny Capture/Replay: Print context diff also with frame gaps
2021-05-10 gert.wollny Capture/Replay: track robustResourceInit
2021-04-12 cclao Vulkan: Add webgl conformance/texture-size test
2021-05-14 ianelliott Vulkan: Fix AGI hierarchy
2021-05-12 cclao Skip Texture2DArrayIntegerTestES3.NonZeroBaseLevel on OSX+OpenGL
2021-05-14 syoussefi Vulkan: Disable BufferVk suballocation
2021-05-14 angle-autoroll Roll VK-GL-CTS from 1c4a387382ea to 535dfe49fc49 (1 revision)
2021-05-14 geofflang GL: Recreate textures on eglReleaseTexImage.
2021-05-12 m.maiya Bug fix in glTexParameter and glGetTexParameter validation
2021-05-12 cclao Fix IOSurfaceClientBufferTest.RenderToBGRX8888IOSurface on OSX+OpenGL
2021-05-11 jmadill Test Runner: Add test expectations parser.
2021-05-05 jonahr Reland Change to module directory when loading swiftshader ICD.
2021-04-29 sergeyu [Vulkan] Add DisplayVkNull
2021-05-14 angle-autoroll Roll VK-GL-CTS from 6498f4042d9f to 1c4a387382ea (19 revisions)
2021-05-14 cnorthrop Tests: Update capture_replay_expectations
2021-05-07 cclao Vulkan: Add feature flag to flush at framebuffer boundary
2021-05-12 lubosz.sarnecki TracePerfTests: Don't call framebuffer functions on GLES1.
2021-05-13 jplate CL: Add symbol version map to libOpenCL
2021-05-14 angle-autoroll Roll Chromium from b0687cb1f1ec to 3b747dab7bb3 (328 revisions)
2021-05-09 jplate CL: Implement context for front end and passthrough
2021-05-11 syoussefi Translator: Fix struct/uniform separation w.r.t to arrays
2021-05-13 ianelliott Disable GL_EXT_shader_framebuffer_fetch_non_coherent on Arm/QCOM
2021-05-11 jmadill Allow specifying GPU config on expectation check.
2021-05-11 syoussefi Translator: Fix local var inits vs struct/uniform separation
2021-05-12 gert.wollny Capture/Replay: recreate the EGL window if contexts don't match
2021-05-13 angle-autoroll Roll Chromium from 3fb708290557 to b0687cb1f1ec (639 revisions)
2021-05-11 geofflang Add messages for framebuffer completeness errors.
2021-03-05 syoussefi Vulkan: Allow DynamicBuffer suballocation in BufferVk
2021-05-12 syoussefi Remove teglAndroidUtil.cpp override
2021-05-13 jmadill Test Runner: Fixes to skipped tests.
2021-05-09 jplate CL: device partitioning for front end and passthrough
2021-05-12 sugoi Add array bounds checks for WebGL shaders
2021-05-13 angle-autoroll Roll SwiftShader from be169ef35238 to c4d054c6ad41 (2 revisions)
(...)
2021-04-02 jmadill Add GL_ANGLE_get_serialized_context_string.
2021-03-30 cnorthrop Tests: Add Dragon Raja trace
2021-04-02 jmadill Fix rapidjson build error in Skia.
2021-03-29 cnorthrop Capture/Replay: Support multi-digit context
2021-03-25 cclao Vulkan: Add baseLevel and generateMipmap test for immutable texture
2021-03-25 m.maiya Vulkan: Add YUV G8_B8R8_2PLANE_420_UNORM support.
2021-03-31 cclao Vulkan: Add test render to immutable texture will flush
2021-04-02 angle-autoroll Roll vulkan-deps from a0d5b9653a91 to 61083c4a2ae0 (4 revisions)
2021-03-31 gert.wollny JsonSerializer: use stubs when building without rapidjson
2021-04-02 angle-autoroll Roll Chromium from cc20ce29e7a7 to 9c9ca054e2bc (391 revisions)
2021-04-01 cnorthrop Tests: Add Aztec Ruins trace
2021-04-01 cnorthrop Tests: Add League of Legends: Wild Rift trace
2021-04-02 kainino Revert "Metal: Support importing external metal textures"
2021-03-29 xinghua.cao D3D: fix uniform block alignment error
2021-04-01 ynovikov Fix and re-enable component build of angle_apks
2021-04-01 ynovikov Add Linux, Ozone and Fuchsia chromium.angle bots to CQ
2021-03-13 lehoangq Metal: Support importing external metal textures
2021-03-30 jonahr Don't append newline to empty InfoLog stream.
2021-04-01 angle-autoroll Roll vulkan-deps from 0a4b29c05e71 to a0d5b9653a91 (6 revisions)
2021-04-01 angle-autoroll Roll Chromium from e4067deef470 to cc20ce29e7a7 (104 revisions)
2021-03-31 jonahr Revert "Reland "Add support for Linux GPU info with Vulkan backend""
2021-04-01 angle-autoroll Roll Chromium from c181ac047c8b to e4067deef470 (350 revisions)
2020-07-18 lehoangq Metal: implement ANGLE_device_metal extension.
2021-03-31 ynovikov Reland "Link angle_util statically into angle_system_info_test"
2021-03-12 jonahr GLX: Always call XSync on creation/destruction of WindowSurfaces
2021-03-31 syoussefi Add a gl-d3d-only target for the translator
2021-03-30 cclao Vulkan: Split fragment shader from ColorAttachmentAndAllShadersRead
2021-03-30 jmadill Enable messenger_lite trace on SwiftShader.
2021-03-26 syoussefi Vulkan: Remove spam output regarding pipeline cache
2021-03-31 chonggu [Fuchsia] Use manifest fragments for Cr-Fuchsia binaries
2021-03-31 angle-autoroll Roll vulkan-deps from 4b3769b941e6 to 0a4b29c05e71 (2 revisions)
2021-03-31 angle-autoroll Roll Chromium from 8599134e632f to c181ac047c8b (466 revisions)
2021-03-19 timvp Detach separable shaders
2021-03-17 timvp Support linking PPOs without attached Shaders
2021-03-30 syoussefi Vulkan: Temporarily use GOOGLEX instead of EXT for MSRTSS
2021-03-25 rafael.cintron Check return value of allocateResource instead of asserting
2021-03-17 timvp Update PPO's executable when attached program is re-linked
2021-03-30 ynovikov Replace Win x86 dEQP GPU.FYI bot with chromium.angle bot
2021-03-30 angle-autoroll Roll vulkan-deps from e0d8a486f6d5 to 4b3769b941e6 (3 revisions)
2021-03-30 angle-autoroll Roll SwiftShader from fb53aa2bb7da to 4c0f888d7ef8 (1 revision)
2021-03-30 angle-autoroll Roll Chromium from 26bf9bb622f1 to 8599134e632f (396 revisions)
2021-03-17 timvp Reland "Save/Load missing members"
2021-03-29 syoussefi Don't link with SPIR-V repos if !vulkan && !metal
2021-03-15 gert.wollny Capture/Replay: serialize context to JSON
2021-03-15 gert.wollny Capture/Replay: Enable GetTexImage tests
2021-02-23 gert.wollny capture/replay: impl CaptureGetRenderbufferImageANGLE_pixels
2021-03-25 penghuang Only enable framebufferMultisample with framebufferBlitANGLE
2021-02-23 gert.wollny capture/replay: implement CaptureGetTexImageANGLE_pixels
2021-03-29 angle-autoroll Roll vulkan-deps from 7079d8df17da to e0d8a486f6d5 (7 revisions)
2021-03-29 angle-autoroll Roll Chromium from e0abc3035c46 to 26bf9bb622f1 (218 revisions)
Roll third_party/vulkan-deps/ 105af117f..3d799e0e9 (225 commits)
https://chromium.googlesource.com/vulkan-deps/+log/105af117f053..3d799e0e9b08
$ git log 105af117f..3d799e0e9 --date=short --no-merges --format='%ad %ae %s'
2021-05-18 chromium-autoroll Roll Vulkan-ValidationLayers from 2b22f2703be9 to 1d86b3235b42 (1 revision)
2021-05-17 chromium-autoroll Roll Vulkan-ValidationLayers from 2d7f42a44fa7 to 2b22f2703be9 (3 revisions)
2021-05-17 chromium-autoroll Roll Vulkan-ValidationLayers from c46a663b305b to 2d7f42a44fa7 (1 revision)
2021-05-17 chromium-autoroll Roll Vulkan-Tools from 1d176506710c to f89f72e10562 (1 revision)
2021-05-17 chromium-autoroll Roll Vulkan-ValidationLayers from 38bdcddf817f to c46a663b305b (3 revisions)
2021-05-15 chromium-autoroll Roll Vulkan-ValidationLayers from 957552062392 to 38bdcddf817f (1 revision)
2021-05-14 chromium-autoroll Roll Vulkan-ValidationLayers from 6da4ac2df971 to 957552062392 (1 revision)
2021-05-14 chromium-autoroll Roll Vulkan-ValidationLayers from da6b48f6f5f2 to 6da4ac2df971 (2 revisions)
2021-05-14 chromium-autoroll Roll SPIRV-Tools from 18d45142e7a2 to f0d110e3058b (1 revision)
2021-05-13 chromium-autoroll Roll Vulkan-ValidationLayers from 2e2e61e6aeb4 to da6b48f6f5f2 (1 revision)
2021-05-13 chromium-autoroll Roll Vulkan-ValidationLayers from e27f26557588 to 2e2e61e6aeb4 (3 revisions)
2021-05-13 chromium-autoroll Roll Vulkan-ValidationLayers from 20678fff2a19 to e27f26557588 (4 revisions)
2021-05-13 chromium-autoroll Roll SPIRV-Tools from 010cd289db8b to 18d45142e7a2 (1 revision)
2021-05-12 chromium-autoroll Roll SPIRV-Tools from f6b59599ae6c to 010cd289db8b (1 revision)
2021-05-12 chromium-autoroll Roll SPIRV-Tools from de1cae069c06 to f6b59599ae6c (1 revision)
2021-05-11 chromium-autoroll Roll Vulkan-Tools from c251814e52e6 to 1d176506710c (1 revision)
2021-05-11 chromium-autoroll Roll Vulkan-Tools from 6407a0c8a489 to c251814e52e6 (1 revision)
2021-05-11 chromium-autoroll Roll Vulkan-Tools from 535fc4091298 to 6407a0c8a489 (1 revision)
2021-05-11 chromium-autoroll Roll glslang from d234552c3095 to 202c8abae0a3 (1 revision)
2021-05-11 chromium-autoroll Roll Vulkan-Loader from 039cea5353be to a132dee142c0 (1 revision)
2021-05-11 chromium-autoroll Roll Vulkan-Tools from 202eb962485c to 535fc4091298 (1 revision)
2021-05-11 chromium-autoroll Roll Vulkan-ValidationLayers from 0aca21bce7bc to 20678fff2a19 (15 revisions)
2021-05-11 chromium-autoroll Roll Vulkan-Tools from 4ee5f2a8bee0 to 202eb962485c (1 revision)
2021-05-11 chromium-autoroll Roll glslang from 9431c53c84c1 to d234552c3095 (1 revision)
2021-05-11 chromium-autoroll Roll SPIRV-Tools from 1020e394cb12 to de1cae069c06 (1 revision)
2021-05-11 chromium-autoroll Roll Vulkan-ValidationLayers from 5ef1ec1b87b1 to 0aca21bce7bc (6 revisions)
2021-05-10 chromium-autoroll Roll Vulkan-Headers from 3f437c4a94ae to 9af411e83fb0 (1 revision)
2021-05-07 chromium-autoroll Roll Vulkan-ValidationLayers from 6330153b2b84 to 5ef1ec1b87b1 (2 revisions)
2021-05-07 chromium-autoroll Roll glslang from 41e39c615b14 to 9431c53c84c1 (1 revision)
2021-05-07 chromium-autoroll Roll SPIRV-Cross from 0eeaffe048b9 to 418542eaefdb (1 revision)
2021-05-07 chromium-autoroll Roll SPIRV-Cross from 72a2ec4c1b56 to 0eeaffe048b9 (1 revision)
2021-05-06 chromium-autoroll Roll Vulkan-ValidationLayers from 157c4bfe15cf to 6330153b2b84 (1 revision)
2021-05-05 chromium-autoroll Roll Vulkan-ValidationLayers from 5f40eb72ecd0 to 157c4bfe15cf (1 revision)
2021-05-05 chromium-autoroll Roll Vulkan-ValidationLayers from 3cafbf75e124 to 5f40eb72ecd0 (1 revision)
2021-05-05 chromium-autoroll Roll Vulkan-ValidationLayers from 3fa29a63072b to 3cafbf75e124 (7 revisions)
2021-05-04 chromium-autoroll Roll Vulkan-Loader from f14e11c9bf69 to 039cea5353be (1 revision)
2021-05-04 chromium-autoroll Roll Vulkan-Loader from 91955fbcff84 to f14e11c9bf69 (1 revision)
2021-05-04 chromium-autoroll Roll Vulkan-ValidationLayers from 0e7f7a9e108b to 3fa29a63072b (2 revisions)
2021-05-04 chromium-autoroll Roll Vulkan-Loader from 5dcea8a449c8 to 91955fbcff84 (1 revision)
2021-05-04 chromium-autoroll Roll SPIRV-Tools from 8ec9f456e614 to 1020e394cb12 (1 revision)
2021-05-04 chromium-autoroll Roll Vulkan-ValidationLayers from 6eaf131c0cd7 to 0e7f7a9e108b (2 revisions)
2021-05-03 chromium-autoroll Roll Vulkan-ValidationLayers from 61225265ebac to 6eaf131c0cd7 (1 revision)
2021-05-03 chromium-autoroll Roll glslang from 186bccdd9f8a to 41e39c615b14 (1 revision)
2021-05-03 chromium-autoroll Roll glslang from 56b17b2f2dfc to 186bccdd9f8a (1 revision)
2021-05-03 chromium-autoroll Roll Vulkan-ValidationLayers from cd5ffbe1bac1 to 61225265ebac (1 revision)
2021-05-03 chromium-autoroll Roll Vulkan-ValidationLayers from 884579ec2928 to cd5ffbe1bac1 (1 revision)
2021-05-03 chromium-autoroll Roll Vulkan-ValidationLayers from 5f00f84a15f6 to 884579ec2928 (1 revision)
2021-04-30 chromium-autoroll Roll Vulkan-ValidationLayers from a19068db1b8b to 5f00f84a15f6 (2 revisions)
2021-04-30 chromium-autoroll Roll Vulkan-ValidationLayers from 7ab4afe5052d to a19068db1b8b (1 revision)
2021-04-29 chromium-autoroll Roll Vulkan-ValidationLayers from 5363130b7570 to 7ab4afe5052d (3 revisions)
(...)
2021-03-26 chromium-autoroll Roll SPIRV-Cross from 84d1f8aa2a40 to 28ae7b8f357c (1 revision)
2021-03-26 chromium-autoroll Roll Vulkan-ValidationLayers from 5c65b37c60d8 to 0cee3a4e5088 (2 revisions)
2021-03-26 chromium-autoroll Roll SPIRV-Tools from f22793015360 to d0c73fcee18f (1 revision)
2021-03-25 chromium-autoroll Roll Vulkan-ValidationLayers from b1a10a4bc609 to 5c65b37c60d8 (3 revisions)
2021-03-25 chromium-autoroll Roll SPIRV-Tools from ecc840d30b69 to f22793015360 (1 revision)
2021-03-24 chromium-autoroll Roll Vulkan-ValidationLayers from 8d63a36ca533 to b1a10a4bc609 (1 revision)
2021-03-24 chromium-autoroll Roll Vulkan-ValidationLayers from 56b864783fd2 to 8d63a36ca533 (1 revision)
2021-03-24 chromium-autoroll Roll SPIRV-Tools from d20c9c2cf3fb to ecc840d30b69 (1 revision)
2021-03-24 chromium-autoroll Roll Vulkan-Tools from 27c21248221f to 1d3ce716dfef (1 revision)
2021-03-23 chromium-autoroll Roll Vulkan-Loader from f17f507c2472 to 5180defc0195 (1 revision)
2021-03-23 chromium-autoroll Roll Vulkan-ValidationLayers from 50fb183594f5 to 56b864783fd2 (1 revision)
2021-03-23 chromium-autoroll Roll SPIRV-Tools from bed84792f9dd to d20c9c2cf3fb (1 revision)
2021-03-23 chromium-autoroll Roll Vulkan-Loader from 1353e80d87b4 to f17f507c2472 (1 revision)
2021-03-23 chromium-autoroll Roll glslang from c51a774ebdd2 to 2c7c84c8ac99 (1 revision)
2021-03-23 chromium-autoroll Roll SPIRV-Tools from edb8399b0ff3 to bed84792f9dd (3 revisions)
2021-03-23 chromium-autoroll Roll Vulkan-ValidationLayers from 96810e2a54f8 to 50fb183594f5 (2 revisions)
2021-03-22 chromium-autoroll Roll glslang from 6701c2540bb2 to c51a774ebdd2 (2 revisions)
2021-03-22 chromium-autoroll Roll Vulkan-ValidationLayers from cd8d97e985a4 to 96810e2a54f8 (1 revision)
2021-03-22 chromium-autoroll Roll glslang from 847a19cd2b42 to 6701c2540bb2 (2 revisions)
2021-03-22 chromium-autoroll Roll Vulkan-ValidationLayers from 0480f13e233c to cd8d97e985a4 (1 revision)
2021-03-22 chromium-autoroll Roll Vulkan-ValidationLayers from a8918dfc53cf to 0480f13e233c (1 revision)
2021-03-22 chromium-autoroll Roll Vulkan-Headers from 89d366355e6f to a8d6ab19d197 (1 revision)
2021-03-21 chromium-autoroll Roll SPIRV-Tools from 6382cbb4973e to edb8399b0ff3 (1 revision)
2021-03-20 chromium-autoroll Roll SPIRV-Tools from 6578899781f6 to 6382cbb4973e (1 revision)
2021-03-20 chromium-autoroll Roll SPIRV-Tools from 75d7c14cfb07 to 6578899781f6 (1 revision)
2021-03-20 chromium-autoroll Roll SPIRV-Tools from f2a19b0150b9 to 75d7c14cfb07 (1 revision)
2021-03-19 chromium-autoroll Roll glslang from 979319b9b161 to 847a19cd2b42 (1 revision)
2021-03-19 chromium-autoroll Roll Vulkan-ValidationLayers from 309d9bea0956 to a8918dfc53cf (3 revisions)
2021-03-19 chromium-autoroll Roll SPIRV-Tools from 8f421ced3e05 to f2a19b0150b9 (1 revision)
2021-03-19 chromium-autoroll Roll SPIRV-Tools from 2b0d16a05905 to 8f421ced3e05 (1 revision)
2021-03-19 chromium-autoroll Roll SPIRV-Tools from a732e4c03cc1 to 2b0d16a05905 (1 revision)
2021-03-19 chromium-autoroll Roll SPIRV-Tools from a611be7782de to a732e4c03cc1 (1 revision)
2021-03-18 chromium-autoroll Roll glslang from d18bcd64fa40 to 979319b9b161 (1 revision)
2021-03-18 chromium-autoroll Roll Vulkan-ValidationLayers from b6c181342bff to 309d9bea0956 (2 revisions)
2021-03-18 chromium-autoroll Roll Vulkan-ValidationLayers from f8f145df59a7 to b6c181342bff (1 revision)
2021-03-18 chromium-autoroll Roll Vulkan-ValidationLayers from d5bf0be344f5 to f8f145df59a7 (2 revisions)
2021-03-18 chromium-autoroll Roll SPIRV-Tools from 4f498774db52 to a611be7782de (1 revision)
2021-03-18 chromium-autoroll Roll glslang from f5929b8c5f83 to d18bcd64fa40 (1 revision)
2021-03-17 chromium-autoroll Roll glslang from b2e5b5c559e1 to f5929b8c5f83 (1 revision)
2021-03-17 chromium-autoroll Roll Vulkan-ValidationLayers from 894604a86c46 to d5bf0be344f5 (1 revision)
2021-03-17 chromium-autoroll Roll Vulkan-ValidationLayers from e53e4e5f0cdc to 894604a86c46 (1 revision)
2021-03-17 cwallez OWNERS: Replace dsinclair with cwallez
2021-03-17 chromium-autoroll Roll SPIRV-Tools from c040bd3ae5fa to 4f498774db52 (1 revision)
2021-03-17 chromium-autoroll Roll SPIRV-Tools from 8866fd7ae27e to c040bd3ae5fa (1 revision)
2021-03-17 chromium-autoroll Roll SPIRV-Tools from 79ab273f997e to 8866fd7ae27e (3 revisions)
2021-03-16 chromium-autoroll Roll SPIRV-Tools from 042eff73fe0d to 79ab273f997e (1 revision)
2021-03-16 chromium-autoroll Roll Vulkan-ValidationLayers from 60f29ec48880 to e53e4e5f0cdc (3 revisions)
2021-03-16 chromium-autoroll Roll Vulkan-ValidationLayers from 053e2bf22dd2 to 60f29ec48880 (3 revisions)
2021-03-16 chromium-autoroll Roll SPIRV-Tools from 4100477e76c8 to 042eff73fe0d (2 revisions)
2021-03-16 chromium-autoroll Roll SPIRV-Tools from 478754c00537 to 4100477e76c8 (1 revision)
Bug: dawn:789
Created with:
roll-dep third_party/angle third_party/vulkan-deps
Change-Id: Iacc6680ee6168390d1bf88b5bafdcef59475159d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51361
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Currently we use offset to calculate the index of the queries in
timestamp compute shader, which is incorrect. The offset is the buffer
offset where we start to write the query results, and has nothing to
do with query index. In the query availability detection, the query
index should be based on the parameter firstQuery.
Add new test for resolving a timestamp query twice to the same
destination buffer with potentially overlapping ranges.
Bug: dawn:434
Change-Id: I2b5c5b192cf5d987ac48187e8240a25937957f51
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50760
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This permits enabling the OpenGL and OpenGL ES backends independently.
This change also enables the OpenGL ES backend on Windows.
This will cause the end2end tests to run on OpenGL ES on the
GPU-less bots, via SwANGLE.
Bug: dawn:580
Change-Id: I43d514b18862d176610b95e97013a67723ddac20
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50881
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Force the use_tint_generator toggle so that Tint is used as much as
possible in fuzzers to get coverage of the relevant code.
This will also fix a recurring fuzzer issue that required a code
transform that only exists in the Tint path: bindings must be renumbered
otherwise we hit an integer overflow in Swiftshader's descriptor set
writes.
Bug: chromium:1209602
Change-Id: Ie868fb07306f96a8ecf42a687313e0a466041a45
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51240
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
The change renames Texture2DCopySplit and copies2D to
TextureCopySubresource and copySubresources respectively.
Because they are not used for 2D only.
I didn't change Texture2DCopySplit to TextureCopySplit in order
to reflect its meaning and distinguish it from TextureCopySplits.
TextureCopySubresource is a collection of copy regions for either a
single layer of a 1D/2D texture or all depth slices on the same
mip level of a 3D texture (They are exactly what subresources are).
It also renames function ComputeTextureCopySplit to
ComputeTextureCopySubresource, and a couple similar renaming.
Bug: dawn:547
Change-Id: I17f8b349e209af0ed1ccaee4634be1e8235a63b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50920
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Use the device maximum supported shader model for DXC compiler.
Bug: None
Change-Id: I05f66d499405a3512a43daca35bb20be84f1f6c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51080
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>
The previous matmul is using 1-dimensional shared array. This PR
adds the 2-dimensional shared array. The perf result shows that:
1. For 1-dimensional shared array, enabe-robustness wil bring almost 2x
regression both for matmulFloat and matmulVec4 on Intel CFL.
2. For 2-dimensional shared array, enabe-robustness will bring almost 2x
regression on matmulFloat. But have little impact on matmulVec4 on Intel
CFL.
Tested on Intel_R_UHD_Graphics_630.
shader enable robustness disable robustness
MatMulFloatOneDimSharedArray 5383 us 3105 us
MatMulFloatTwoDimSharedArray 4788 us 2608 us
MatMulVec4OneDimSharedArray 3070 us 1743 us
MatMulVec4TwoDimSharedArray 1840 us 1802 us
Bug: dawn:594
Change-Id: Ia29a78cf70649ef8d3ba8476db1ad4d6ded80840
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50481
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiajia Qin <jiajia.qin@intel.com>
Added in https://dawn-review.googlesource.com/c/tint/+/50742
Bindings may not collide except on the D3D12 backend where we use
the register offset as the binding number. Offsets may alias if
they are for different HLSL register types (buffer, texture, etc.)
Bug: tint:797
Change-Id: I020e3b5cd1d35fdf5678b587225507e0cf24f5b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50801
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Certain backends performs transformations on the tint::Program in the ShaderModule.
These transformations may raise diagnostics.
Tint diagnostics generated from an underlying tint::Source::File need that File kept alive.
Change-Id: I32deceb4cedb419e914631d342884fc27972b5cb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50581
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Skip these tests on D3D12 because it is not implemented yet.
Bug: dawn:547
Change-Id: I0a009b00bd26bb04794bb627c53f4540462f1ca7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50243
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Bug: dawn:783
Change-Id: I3c7f0ffc3f45a0d67b411a39342e89c710604d54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50244
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This is more consistent with the other backends that have a
CommandRecordingContext.
Bug: dawn:780
Change-Id: Icb689d00cc4d873a489fc4d4c247feeb15f8797c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50120
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Adds UNASSIGNED-CoreValidation-DrawState-InvalidImageLayout (0x4dae5635)
initially, since we can see that it's causing issues with the WebGPU CTS
tests.
Change-Id: I862e3986d59ae590458f9011a16cc824bf752e72
Bug: dawn:785
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50423
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch skips CopyTests_T2B/CopyOneRowWithDepth32Float on all
D3D12 backends because it fails on many D3D12 drivers.
See https://crbug.com/dawn/727 for more details.
BUG=dawn:727
TEST=dawn_end2end_tests
Change-Id: I3d2c4cf363772939796a71c7efa165e57ed6ba41
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50280
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is now handled inside the SPIR-V sanitizing transform and can be
enabled via a transform config option.
Fixed: tint:753
Change-Id: I897c60dd304dd4643cc905a8ca3001dd963c5fb0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50060
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL complete the validation rules for CopyTextureForBrowser by:
- Restrict source texture must have |CopySrc| and |Sampled| usage.
- Restrict destinaton texture must have |CopyDst| and
|RenderAttachment| usage.
- Restrict sample counts of source texture and destination texture
must be 1.
- Restrict source copy origin.z must be 0.
- Restrict CopyTextureForBrowser() can only copy to single slice.
A validation unittest is added to check.
BUG=dawn:465
Change-Id: I5e645a4b69edeaf97ce1231bd7c8036027524ba8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49306
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Below are the list of all the individual changes, which are a good order
in which to review this CL.
Core changes:
- Change the tracking in the frontend to produce a synchronization
scope per dispatch instead of per compute pass. Some bindgroups might
not be part of any synchronization scopes so we also track all the
referenced resources on the side so they can be checked during
Queue::Submit validation.
- Fix clearing in the GL and Metal backends to use the per-dispatch
synchronization scopes.
- Fix the Vulkan backend to use the per dispatch synchronization scopes
to produce the correct pipeline barriers. This allows the removal of
previous logic that was subtly incorrect for Indirect buffer. This
allows the merging of the Compute and Render DescriptorSetTracker into
a single small helper class.
- D3D12 changes are similar to Vulkan, but the simplification is just a
the suppression of a branch with a lot of code in
BindGroupStateTracker.
Test changes:
- Fixup all the ResourceUsageTracking tests to follow the WebGPU spec
for synchronization scopes (fixing a lot of TODOs).
- Add additional tests checking that Indirect buffers are not allowed
to be used as a writeable storage in the same synchronization scope.
- Add tests for Queue::Submit validation correctly taking into account
resources that are bound but unused in compute passes.
- Add an end2end test for using a buffer as Indirect and Storage at the
same time in a DispatchIndirect, which would previously produce
incorrect barriers in the Vulkan and D3D12 backends.
Other small changes (that I was to lazy to put in a different CL):
- Add the utils::MakePipelineLayout helper function.
- Fix Indirect not being in the list of readonly buffer usages (caught
by a test added in this CL).
Bug: dawn:632
Change-Id: I77263c3535a4ba995faccbf26255da9a2f6ed3b5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49887
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This workaround was only necessary in the Metal backend but it was easy
to put it in the frontend so it was put there. However, this simplification
gets in the way of a validation change in the follow-up CL. So we move
the nooping to the Metal backend.
Bug: dawn:632
Change-Id: I0a9957a1bc9bdd7867eb8c60fcab710832c13af2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49886
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This change is a preparation for making the compute pass track the
synchronization scope usages per dispatch instead of for the whole pass.
This CL just separates the Compute and RenderPassResourceUsage types.
This requires making the difference between
SyncScope/ComputePass/RenderPass ResourceUsageTracker instead of having
a single combined tracker.
This change also duplicates SetBindGroup by removing the common handling
in ProgrammablePassEncoder and putting it in ComputePassEncoder and
RenderEncoderBase. This is necessary because the UsageTracker types are
now split, but it will also help have different handling of SetBindGroup
for compute and render in follow-up CLs.
There are no functional changes.
Bug: dawn:632
Change-Id: I482c04483d8b734fb10e44e717071eedcff2f15f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49884
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This makes error messages from command buffers more useful because they
keep the whole stack trace instead of just showing that the error was
created in the CommandBuffer::Finish call.
Bug: dawn:632
Change-Id: I23e66045c3caa1ad086003a04eed78c40aefc562
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49885
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This change is a preparation for making the compute pass track the
synchronization scope usages per dispatch instead of for the whole pass.
- Split the tracking of render and compute passes usages.
- Rename PassTextureUsage to TextureSubresourceUsage since is it not
per-pass
- Add SyncScopeResourceUsage as a subclass of PassResourceUsage to
start modifying some of the code to work with synchronization scopes
(even if syncscope == pass at the moment).
There are no functional changes.
Bug: dawn:632
Change-Id: Ieeb6d70a44dc1c726f26989eebcd87e63e732785
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49883
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch implements CallbackTask and CallbackTaskManager to store
the callbacks of Create*PipelineAsync().
In the futureCallbackTaskManager will manage all the callbacks that
should be called in Device.Tick().
BUG=dawn:529
Change-Id: I6ad4352371eb44515bc2d85cdc68220c9b758b8e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49060
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Mip dimension should be greater than or equal to 1, while width >> level
may lead to 0.
Bug: dawn:547
Change-Id: Ib3dfb9fbdbed0e922df6efa366598eff0ca10df2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49506
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Note that a slice somehow means a subresource on D3D12. There
are mip slice, array slice, and plane/aspect slice in D3D12.
We reuse the term "slice" for multiple depth of a 3D texture,
although one single depth slice of multiple depth slices is
not a separate subresource of a 3D texture (all these depth
slices for one mip are a separte subresource in 3D texture).
For the reason above, this change also renames "slice" to
"layer" in some functions if "slice" is a layer in that
function. Because a layer is definitely a subresource but a
slice may not be (like a single depth slice of a 3D texture).
Bug: dawn:547
Change-Id: I88b8120ef7f73bfc261fc225f4242924da221654
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49240
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This patch fixes the incorrect return status of Create*PipelineAsync
when device is lost by explicitly calling and clearing all the
Create*PipelineAsync callbacks in DeviceBase::HandleError() when the
device is lost.
BUG=dawn:529
TEST=dawn_end2end_tests
Change-Id: I67a8047b2e5a54f6f85c5a4cbcf420b744ac0d5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49080
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Remove d3d12.li, dxgi.lib and d3d11.lib dependencies when targeting UWP.
Add dxgi.lib only for DXGIGetDebugInterface1 in debug build when targeting UWP.
Use DXGIGetDebugInterface1 only in debug build when targeting UWP.
Bug: dawn:766
Change-Id: I5fa53dbb257acf604836f861f75a122a7d417e7c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49040
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: 陈俊嘉 <cjj19970505@live.cn>
This patch removes an incorrect ASSERT(IsComplete()) in the
destructor of AsyncWaitableEvent because when the destructor of
AsyncWaitableEvent is called, the async task attached to mFuture
may not be completed and the status of mFuture may not be 'ready'.
In fact in C++14 we can always guarantee the attached async task
is completed after the destruction of mFuture.
BUG=dawn:529
Change-Id: I2f28246beb025a0d39dd432a404c0b04aed17249
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
GBV's ability to patch shaders with validation code
was hanging several end2end tests. Since disabling
GBV shader patching would render partial validation
ineffective, partial validation was re-mapped to have
GBV disabled while full validation enables GBV by default.
End2end tests now default to partial validation so
tests that would otherwise not run with GBV can still
have some coverage.
BUG=dawn:592
Change-Id: Iafb271b5ee8862592152fa45c34f188d64432e60
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46725
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Auto-Submit: Bryan Bernhart <bryan.bernhart@intel.com>
This avoids breaking dependents when they use a version of clang that's
different than the one being tested on Dawn CQ.
Also re-enable -Wdeprecated-copy(-dtor)
Bug: chromium:1201858
Change-Id: I09763fdb98e7dba53b4d9fa66fa4c606620a0078
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49100
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Remove the following 2 function declarations since their function
bodies are no longer available.
1. ResultOrError<Ref<RenderPipelineBase>> CreateRenderPipeline(
const RenderPipelineDescriptor* descriptor);
in src/dawn_native/Device.h
2. BufferUploader* GetBufferUploader() const;
in src/dawn_native/vulkan/DeviceVk.h
BUG=none
Change-Id: I55a92a4acb3af3ea4807bfd0b58a0246d0b28cc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/49061
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Add necessary cflags and cflags_cc for winrt compilation.
Add 'dawn_is_winuwp'.
Set 'dawn_enable_vulkan' and 'dawn_supports_glfw_for_windowing' when compiling for UWP.
Link d3d12, d3d11 and dxgi stub libs when compiling for UWP.
Use LoadPackagedLibrary instead of LoadLibraryA in DynamicLib when compiling for UWP.
Swapchain related changes will be in another commit.
Bug: dawn:766
Change-Id: I1210798a21cc175bab77281403d262d4bfb02d99
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48480
Commit-Queue: 陈俊嘉 <cjj19970505@live.cn>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
This CL adds two helpers for more ergonomic processing of
ChainedStructs.
1. FindInChain(): Iterates through the chain and automatically
casts the ChainedStruct into the appropriate child type before
returning.
2. ValidateSTypes(): Verifies that the chain only contains structs
with sTypes from a pre-defined set. This also allows the caller
to specify one-of constraints.
3. ValidateSingleSType(): Verifies that the chain contains a
single struct with a specific sType or is an empty chain. This
is a common case of |ValidateSTypes()| and is separated out as
a fast-path.
Change-Id: I938df0bf2a9b1800b1105fb7f80fbde20bef8ec8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47680
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Previously this was being indirectly supplied by <memory>, which has
been removed. Clang happily still finds std::forward, but GCC does
not.
BUG=dawn:768
Change-Id: I87e6bb6aa83bc7f3253c58e32fa0ba977752858c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48820
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
- Add vkCmdFillBuffer in ResolveQuerySet to clear the buffer to 0s for
these unavailable queries if the buffer has been initialized or fully
used which won't been initialized with 0s again.
- Because vkCmdFillBuffer has driver issue on Intel Windows, Skip some
affected cases.
- Remove unsafe api checking from Occlusion Query.
Bug: dawn:434
Change-Id: Ib34f81d93b0de8f08f0eeebf3c8a967eeb5ecefb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This will help detect cases where the mapped data is used after it is
freed, in particular in WebGPU tests around the interaction of mapping
and GC.
Bug: chromium:971949
Change-Id: I820d9885d39379fbc95c6504b9a4151053768d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48382
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch moves the initialization of DXC libraries from
BackendD3D12::GetOrCreateXXX() to Device::Initialize() so
that we don't need to deal with those lazy initializations
in the asynchronous path of Create*PipelineAsync().
BUG=dawn:529
Change-Id: I792847c138738ae8c300d7a1bf3d23fc8fecd746
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48580
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This test was passing on SPIRV-Cross due to SPRIV-Cross's
overreporting of binding information per entry point. On Tint it was
failing, because the resources in the vertex shader were not being
referenced, so not being reported. I have corrected the values passed
to the utility code that generates the shaders, so that it generates
the needed references.
I have also slightly tweaked the test, so it will distinguish between
failure states better.
BUG=tint:716
Change-Id: If88f600a36cba8b580d888e902b8d8102e05bd10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48520
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
unique_ptr's destructor sets itself to null and frees its owned
memory. This is a problem because for the slab allocator, the
member variable holding the unique_ptr is inside the freed memory.
Bug: skia:10501
Change-Id: I41179261041fe415bb2af3667114b079f61b3c7b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48100
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Use tint::transform::DataMap for inputs as well as outputs.
This allows tint to nest transforms inside each other (e.g. embedding
transforms inside sanitizers), and still having a consistent way to pass
data in and out of these transforms, regardless of nesting depth.
Transforms can also now be fully pre-built and used multiple times as
there is no state held by the transform itself.
Bug: tint:389
Change-Id: If1616c77f2776be449021a32f4a6b0b89159aa2a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48060
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Previously all uses of reentrant object creation in Dawn native
needed to manually AcquireRef. Change them to use CreateFooInternal that
returns a ResultOrError<Ref<>> and are renamed to CreateFoo.
Bug: dawn:723
Change-Id: Ifcda3659d02cc5a4c63c248dc53af7fee7c4a61d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46626
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
As of https://github.com/gpuweb/gpuweb/pull/1352 the spec indicates that
GPURenderPassColorAttachmentDescriptor and
GPURenderPassDepthStencilAttachmentDescriptor should use .view rather
than .attachment to indicate the TextureView associated with the
render pass attachment.
Bug: dawn:762
Change-Id: I70d615e19d8e7aae5b26aa5965c7109289ab868b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47902
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Tint now sorts struct members with entry point IO attributes.
Bug: tint:710
Change-Id: I7bb37cab2f101fbcf55dd8b42ee3b3af1250bf1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47840
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
This reverts commit 5c9b6a8f81.
The issue has now been fixed in Tint and rolled into Dawn.
Fixed: dawn:758
Change-Id: Id7deb6cea9f22ee8c5f345a28d2d37499b47d692
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48080
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Matches most recent spec changes. setBlendColor has been marked as
deprecated.
Bug: chromium:1199057
Change-Id: I4584ce789bd7d14401244509d5ada62a46236a5d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47901
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Several of the enum names have changed recently. Update them to match
the spec and mark the older ones as deprecated.
BUG: chromium:1199057
Change-Id: I7a29588dd18b8fb738773c2478b173093f2aa834
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47860
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
A Dawn CL landed at the same time as a Tint roll in Dawn, causing
failures in a large number of D3D12 use_tint_generator. Disable testing
of that configuration entirely while we investigate the issue and fix
it.
Bug: dawn:758
Change-Id: I6c897efc637821a20281c91668889ae95c1c2b1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47774
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Changes I/O to use function parameters and return values, removes
unnecessary "-> void" return types, and changes "const" to "let".
BUG: dawn:755
Change-Id: Iabbfcc280fae37d73cba6a2f7e2215ed579a04e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47700
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Fixes issues with OpenGL when using the newer style of WGSL I/O that
relies on function parameters and return values. Also added several
end2end tests to cover different variants of that style of I/O.
BUG: dawn:755
Change-Id: I73b4b07ce924ce22e917bf399be705dc67519037
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47701
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Refactors support for toggle control flags, --enable-toggles= &
--disable-toggles, from the end2end tests into a utility class to make
them available elsewhere. The unittests now uses this utility class to
parse toggle control flags.
For some toggles, like 'use_tint_generator', the unittests are known to
be broken with them turned on. They will be fixed in subsequent CLs.
BUG=dawn:756
Change-Id: Ic283e8a82bedcbf255258cca3e62f58c79d3857b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47740
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Use the same pattern for all conditionals: single-call, then row-by-row,
2D case, then 3D.
Bug: dawn:684
Change-Id: I410183815299e9ec2d90790809a056dd578771e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47320
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
We augment the DoTexSubImage() call for the desktop GL fast path
for compressed textures (upload in a single call where possible).
Bug: dawn:684
Change-Id: Id67c39b1efbc8b435b58064cad66a55c153ce675
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47240
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Also drive-by fixes some other deprecated constructs (const -> let, and
a disabled test having ancient WGSL).
Bug: dawn:755
Change-Id: I924dfbcbd0a7d0478f3e9b3766585751a0392499
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47620
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Depth/stencil formats are invalid for 1D and 3D texture.
This change adds this validation rule, and adds a validation
test for it.
Bug: dawn:730
Change-Id: Idac6d1bf7b8c7261eb7b4b59504de10e13d049cc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47200
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This will help experiment using dawn_wire for remoting WebGPU to render
on the screen.
Bug: None
Change-Id: I9a60ff8c3889ec917f6fd56e4cbb1ffef639748d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47621
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Move texture uploads into CommandBufferGL::DoTexSubImage() and use it
for both CommandBuffer CopyBufferToTexture and
QueueGL::WriteTextureImpl(). On the CB side, For now this is only used
for compressed ES textures. Desktop GL has a fast-path for compressed
textures that isn't currently implemented.
Bug: dawn:684
Change-Id: I4da02e9c96c13fd71d133778168a5597efa7b59a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47123
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
The HLSL writer issue is now fixed.
Fixed: tint:686
Change-Id: I6d4709652d1ca46971a4ad2d150b21ad954ec055
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46450
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Replace TODOs for those tests that now fail with another issue.
Fixed: tint:682
Change-Id: I2665f0d4f495e4efc5adef4cf46a965df7c8936c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46451
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Now that we have a real extension type (PrimitiveDepthClampingState),
we can replace the dummy extensions used in the WireExtensionTests
with the real deal.
Change-Id: I43dfa66f2cc909b5fc95b55382d3cb53ce022a0f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47300
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
Tint diagnostics hold a raw pointer to the tint::Source::File, so that source snippets can be printed.
The tint::Source::File pointer was taken from a stack allocation, and the diagnostics were left with a dead pointer.
Have the ShaderModuleParseResult keep the tint::Source::File alive with a PIMPL unique_ptr.
Change-Id: I80d77516afd4012e15992821e060ef3038eba1c1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47422
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Constructing a float2x2 from a float4 in a ConstantBuffer by extracting individual scalars with the array-index operator appears to produce invalid DXBC.
Tweak the test so that we use .xy, .zw swizzles instead.
Bug: tint:681
Change-Id: I027f8df96f2a5fda355668b35773d79f4fcdc08b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47421
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Tint only reflects the bindings that are statically used so before this
fix it would produce an empty pipeline layout. Fix this by statically
referencing the sampler binding in the shader.
Fixed: dawn:754
Change-Id: I381acd9adb7d1e80ccf0642b5189750a5a43de25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47420
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Validation is now automatically performed, and the Validator class is
now redundant and will soon be removed from Tint.
Bug: tint:642
Change-Id: I9ddbe523d85e2a4dfeff6d08324a6ca368d6cc74
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47124
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
The various backends hit UNREACHABLE() during pipeline creation if
depthStencil.depthCompare (or likewise for stencil) are set to
undefined.
Bug: chromium:1195694
Change-Id: Ibf4d8d47b4c98343dce3caccdf79ee90c0de899f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46863
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This change also marks 3D view creation as Unsafe API.
BUG: dawn:547
Change-Id: Icdb7b48f19054d70258363f6d58ded957be72b70
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46723
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Test is flaky on the NV bot so it's being disabled
as I investigate.
BUG=dawn:733
Change-Id: I9b721f05665cefe8a6eee53fe691f83071484965
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47260
Reviewed-by: Corentin Wallez <cwallez@google.com>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
After we applied __VA_ARGS__ in macros and use {x, y} and {w, h}
to replace (x, y) and (w, h) in EXPECT_TEXTURE_RGBA8_EQ and
EXPECT_TEXTURE_FLOAT_EQ, we can use the more general macro
EXPECT_TEXTURE_EQ. Then these two macros can be removed. Austin
has already put a TODO for this change but didn't do that.
utils::MakeOrigin and utils::MakeExtent are removed because they
are not needed.
In addition, this change removes 0 in callers for parameter level,
because level's default values is 0 in helpers implementation.
BUG: dawn:748
Change-Id: Iece4db7a8ed1d47b57988412f1c897205e7403d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47100
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
The previous CL had no way of communicating disagnostic messages from
Tint to the ShaderModule in the event that it failed to validate. This
change ensures that messages generated during validation aren't dropped
on the floor and can be queried from the failed modules CompilationInfo.
BUG: dawn:746
Change-Id: Ic2551654ca30baab0fb5124a148eb4fcdf4b0f22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46960
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch refactors the implementation of APICreateComputePipelineAsync
as a preparation of the async path of the creation of compute pipeline.
Now the code path of APICreateComputePipelineAsync() includes the following
3 parts:
- When an error occurs in the front-end validations, the callback will be
called at once in the main thread.
- When we can find a proper compute pipeline object in the cache, the
callback will be called at once in the main thread.
- When we cannot find the proper comptue pipeline object in the cache, the
newly-created pipeline object, the callback and userdata will be saved
into the CreatePipelineAsyncTracker, and the callback will be called in
device.Tick(). All the logic mentioned in this section has been put into
one function CreateComputePipelineAsyncImpl(), which will be overrided
by its asynchronous version on all the backends that support creating
pipeline objects asynchronously.
Note that APICreateRenderPipelineAsync is not changed in this patch because
it is now under refactoring to match the current updates in WebGPU SPEC.
BUG=dawn:529
TEST=dawn_end2end_tests
Change-Id: Ie1cf2f9fc8e18c3e6ad723c6a0cefce29a0eb69c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45842
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Most tests pass, those that don't are skipped.
Change-Id: Ia08373551a48382aceffbbc0e23bd15828ebe219
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46452
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
If a texture format supports multisample, it should be renderable.
This change adds this validation rule to fix a bug. It also adds a
validation test in dawn_unittests.
BUG: dawn:731
Change-Id: I33a06cb16367e4e379b29b223ef6b69128baf30f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46840
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This change removes layer and use origin.z in MACROs
EXPECT_TEXTURE_FLOAT_EQ and EXPECT_TEXTURE_EQ.
It also removes parameter layer in MACROs' implementation
functions AddTextureExpectation and AddTextureExpectationImpl
and use origin.z instead in these functions.
BUG: dawn:747
Change-Id: I0103524074c6c250fa2f85bf9c3abda8c8cd2197
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
We do query resetting for each query commands outside render pass,
whether they're rewritten or not, so no longer need to track their
availability on command encoder. The availability on query set is enough
for resolving sparse queries.
But we still need to track query availability on render pass for query
rewrite checking and query resetting per render pass. Because reset
command must be called outside render pass, we need to reset them
together before the beginning render pass based that. Add availability
tracking on pass resource usage tracker (we only need it on render pass
) to facilitate use it in Vulkan backend.
Bug: dawn:434
Change-Id: Ie1b413ff54f62f3b84fe612e4abe45872c387e81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This change implements 3D texture copy on D3D12 for texture to
buffer and texture to texture copy for full copy upon the entire
3D texture.
It also uses a function named CopyBufferToTexture to wrap
CopyBufferTo3DTexture and CopyBufferTo2DTextureWithCopySplits.
Likewise, it uses another function named CopyTextureToBuffer to
wrap Copy3DTextureToBuffer and Copy2DTextureToBufferWithCopySplits.
BUG: dawn:547
Change-Id: I4293f6ca4d37f604e6f1c10827686d17469a07ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46820
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Dawn uses objects with move semantics like Ref<> that feel like they
need to be std::moved in a bunch of places. This warning triggers when
std::move() is used when it has no effect, keep the code less verbose.
Bug: None
Change-Id: I2b11f709e943e7b16024bfde07910577b983aa34
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46441
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Implements the GPUCompilationInfo and GPUCompilationMessage interfaces,
adds the GPUCompilationMessageType enum, and adds the compilationInfo
method to GPUShaderModule.
BUG: dawn:746
Change-Id: Ied70cbbfedbf4890916ec076993714e5042f70e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46600
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The attribute was just in the wrong place, I shouldn't have removed it
completely.
Bug: chromium:1195827
Change-Id: Iad2a5fdcc2e8bd76ddb82cc09cde62c3a57e3c54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46800
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL adds depth clamping support to Metal by invoking
MTLRenderCommandEncoder::setDepthClipMode. I only implemented the
feature for the new-style of RenderPipelineDescriptor since the
old one seems to be deprecated.
Bug: dawn:716
Change-Id: Icd63c72294546042ae452360863a7f9c16b40f95
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45640
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL support subrect copy. Use scale/offset to copy from subrect of
source texture and viewport for copy to subrect of dstTexture.
BUG=dawn:465
Change-Id: Ice43c0da15f6d9526912879e2e734f6570f2d673
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46422
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Converts each of the native API backends to use RPD2 natively, started
converting the old format to the new one in the deprecated entry point,
removed all other handling and validation of the old format, and turned
on the deprecation warning.
BUG: dawn:642
Change-Id: I20b671960a83f65ecb4ce6ce1165a563025983cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46726
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Refactors the existing general reflection code to either use Tint or
SPIRV-Cross, depending on the backend being used and provided flags.
Tint is used when UseTintGenerator is enabled, otherwise SPIRV-Cross is
used.
For OpenGL, when Tint is used, additional reflection is performed using
SPIRV-Cross to support GLSL generation.
There still exists backend specific reflection that needs to be
implemented in Tint for the complete removal of SPIRV-Cross for
non-OpenGL when UseTintGenerator is enabled.
BUG=dawn:743
Change-Id: Ie77afa83a2c960b3c87a3419997a16f8392991fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46480
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
This ends up incorrectly reporting live objects from previous CTS tests.
We should find a better way to call ReportLiveObjects, but doing so on
backend initialization is probably not the right time.
Bug: dawn:745
Change-Id: I9d0beb5f8b20af9c83f5e78f19630d5c78ef4da2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46721
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is the first patch to implement 3D texture copy. It starts with
implementation for 3D texture copy on D3D12 backend with the simplest
case: copy to the entire 3D texture. And texture's width is aligned
with 256 bytes.
The implementation for 3d texture copy might be inaccurate/incorrect
in some functions for complicated cases. But don't panic. The previous
implementation is also incorrect because many functions assumes that
we are copying to/from 2D textures only. And I will incrementally fix
the incorrect functions via upcoming tests for 3d texture copy.
BUG: dawn:547
Change-Id: I588b09fc8d0f0398e0798573415ba3a6a3f576fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45980
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
We are going to send another PSA about new APIs in Dawn/Chromium and
want developers to be able to use CreatePipelineAsync. The
implementation is safe, it just doesn't offload the work to a different
thread yet.
Bug: dawn:529
Change-Id: Ia093e46f8c3d389fd42eb5c1ad6b94ab8e64957b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46448
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Adds GPUExternalTexture-related types, as well as
Device::ImportExternalTexture. Adds a basic unit and end2end test.
Bug: dawn:728
Change-Id: Iee9533eb872c493a089cccd500748f1a61457407
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46060
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Each quadrant now uses a unique color so
a test result failure can better indiciate any
unexpected sampling behavior.
BUG=dawn:733
Change-Id: If0e814956c1d686bdddcfb6de4dbf24f05d5a027
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46540
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This fixes a failure when use_tint_generator on D3D12, but also preps
the code for the future where WGSL requires that return values from
functions are used.
Bug: None
Change-Id: I6b8a5e0aef6550ef39d2972cdc510e05e4be3662
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46620
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This is another incremental change towards using the new render
pipeline descriptor throughout the entire stack. Creates blueprints for
hashing with the new descriptor when provided before then converting it
to the old format for the native backend creation.
BUG: dawn:642
Change-Id: I1927b12fd02b2fedf25ef4428f07e339fa666715
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46541
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is a preparation CL for 3D texture copy. It refactors texture
result comparison MACROs and their implementations, in order to
add texture result comparison for 3D texture. Prior to this change,
texture result comparison supports 1D/2D texture only.
BUG: dawn:547
Change-Id: Ia242356e05f4762e33a8278ec0d038b8580f7aa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
It was used to avoid requiring the dependency on Tint so it isn't needed
anymore now that Dawn unconditionally dependent on Tint.
Bug: dawn:686
Bug: dawn:706
Change-Id: Ifd12c2f94fcaaa70120ae7ef72bcdc34f970fbea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46004
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This is in preparation for a change that will change all the
CreateFooInternal to be CreateFoo so they can be called in a
reentrant manner without special refcounting.
This also standardizes all the backends (except OpenGL and Null)
to use Object::Create that returns a Ref<T> or ResultOrError<Ref<T>>,
something we wanted to do for a long time.
Bug: dawn:723
Change-Id: I9e0baced333ffeb0affbc6a276c9bd9de082263a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46440
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL propagates errors from reentrant WriteBuffer calls and makes
procy methods on BufferBase to show that it is safe to call
GetMappedRange and Unmap without handling errors.
Bug: dawn:723
Change-Id: I4ea43adc4844505314bf84e2357b2d928f1d1f8c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46003
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
In the service of keeping these changes incremental and easier to
review this change only validates the RenderPipelineDescriptor2
before converting it back to a RenderPipelineDescriptor.
BUG: dawn:642
Change-Id: Ie24c999756fa74f7d3cd10662a6bc95649602b14
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46120
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This case is failed weirdly on Intel TGL (Window Vulkan) which says the
destination buffer keep sentinel value in the second case, it cannot be
reproduced with any debug actions including Vulkan validation layers
enabled, and takes time to find out if the WriteBuffer and
ResolveQuerySet are not executed in order or the ResolveQuerySet does
not copy the results to the buffer. In order to integrate end2end tests
to Intel driver CL without unknown issues, skip it until we find the
root cause.
Bug:dawn:434
Change-Id: Ibdba667cb662ba69c8468d5b2ac2e84bcd3df5bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46321
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Using the new tint::transform::BindingRemapper.
Provides symmetry with TranslateToHLSLWithSPIRVCross().
Bug: tint:621
Bug: tint:671
Change-Id: I1a26c8cac236ac1133c688cf84bb810e15e30978
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46341
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
BUG=dawn:700
Change-Id: I5234d48867b500aece79b82515818afdfc3a6d9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45100
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
https://gpuweb.github.io/gpuweb/wgsl.html#variables:
> "Variables in the storage storage class and variables with a storage texture type must have an access attribute applied to the store type."
Bug: tint:692
Change-Id: I61774bb6bda9a7d31e3a85c24fcdb6e2fc25e7b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46378
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
An async callback which calls Queue::Submit will cause
reentrance in QueueBase::Tick and CreatePipelineAsyncTracker::Tick,
which invalidates the task queue being used by the original call,
and leads to a crash from an invalid pointer.
The Tick functions should remove the tasks from the queues before
the callbacks are called, so invalidation doesn't cause a crash.
Bug: dawn:729
Change-Id: I0d952d51040a3d1a475767400de3333a8b9b0821
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45900
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Otherwise errors in Tick could cause the device to be lost and further
processing in Queue::SubmitImpl to fail in interesting ways.
Bug: dawn:723
Bug: chromium:1191777
Change-Id: I586c6b0f97c89938b9e7deeb6f31231ec19e826c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46002
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Previously various places in dawn_native were using Device::GetQueue to
get the queue for some operations, and were inadvertently adding a
reference to the queue. Fix this by adding a getter that doesn't add a
ref.
Bug: dawn:723
Bug: chromium:1185070
Change-Id: Iba127dbd631305762f4cc6c37816407056c52cff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46001
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This means that calling wgpu::Object::DoStuff will translate to a call
to dawn_native::ObjectBase::APIDoStuff. This will clarify the
difference between reentrant calls and internal calls in dawn_native.
Avoiding issues in the future.
This CL only changes the code generator to prefix with "API", performs
renames needed to make the code compile, and adds TODOs for things that
should be fixed in follow-up CLs.
Bug: dawn:723
Change-Id: Ie24471fa093adc4179d33d13323429847d076ecb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45921
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
DeviceBase implemented its own Reference / Release methods for
historical reasons. Replace them with RefCounted's version that are
similar, just more thread safe.
Bug: dawn:723
Change-Id: Ib26f3e231eb12fe09612c8b5639576e2f26a3cfd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46000
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Raises any ICE errors reported by Tint during shader validation as uncaptured
validation errors. This allows them to show up in Chrome's dev tools console, for
example.
BUG: dawn:718
Change-Id: I85741787103e6c1174b7c73be6b9860b988d6130
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45840
Reviewed-by: Ben Clayton <headlessclayton@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
BUG=dawn:504
Change-Id: If09b12d4df9c7aedcb28b4640557cc3cae6e989d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45700
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
With all tests converted to WGSL we only use shaderc to assemble SPIRV
assembly to binary. shaderc requires glslang but we don't use it at all.
By using SPIRV-Tools directly to assemble SPIR-V, we can remove both the
shaderc and glslang dependencies.
Bug: dawn:572
Bug: chromium:1150045
Change-Id: I1588428dfb9478e7b724478bec662d002ee920e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45765
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
And rename CreateShaderModuleFromWGSL to CreateShaderModule.
Bug: dawn:572
Change-Id: I80dab401078b2001d738b87d6e24437f93b690d1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45764
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This was silently failing for me, resuling in a crash somewhere completely different.
Change-Id: Iba9dfba8bb4c9e51a947a1337fc9718437ad5254
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45766
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tint/WGSL don't support 16bit floats yet, so use SPIRV assembly to
remove the dependency on glslang, instead of WGSL.
Bug: dawn:572
Change-Id: I6dd209e62f0550e7aecd18626b8807f7f1414b19
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45605
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Skia changed to only use -Weverything for Skia files so we no longer
need to suppress this warning.
Bug: dawn:706
Change-Id: Ifcb2421abd24ec514396b8033057a62abd312e16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45608
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It required storageBarrier() to be implemented in Tint.
Bug: dawn:572
Change-Id: I62e8d89ef7a049044f3381dc66163466d62c839d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45604
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This also removes the ability for the fuzzer to perform error
injection to generate testcases. The preferred method is to
use one of the Dawn test binaries to produce the trace directly.
Bug: dawn:629
Change-Id: If7295f9e6da5618be8f44e9301aa12dc56fcdfef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40301
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This is a reland of f84daa070f
Eliminate static initializer(disallowed in Chromium) by replacing
shader string living in anonymous namespace from type "std::string"
to char array.
Original change's description:
> CopyTextureForBrowser: Support color format conversion
>
> This CL enables blit from RGBA8Unorm soruce texture to dst texture that
> |CopyImageBitmapToTexture| supported dst format.
>
> BUG=dawn:465
>
> Change-Id: I99846cf8dc37bc89e0c168a3d86193bb3a0c0ebb
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44020
> Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
Bug: dawn:465
Change-Id: Ic3a156f5a20b217fd2aa5f86b01bad8ce77dc41c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45443
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Still leave deprecated `depth` functional as there are some references in
other clients. Using `depth` and `depthOrArrayLayers` at the same time is
invalid. Add DeprecatedAPITests.
Bug: chromium:1176969
Change-Id: Ia06645e4f3c17588323dd36b11f9f3988b2e3aba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44640
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Destroying the adapter without the debug layer installed
would crash the process upon access of the debug filters.
Bug: dawn:460
Change-Id: I04819c5136af780fd3b981857bd87d69d4abc9c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45560
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This is in preparation of removing all the DAWN_ENABLE_WGSL logic: the
ShaderModuleBase will have either mSpirv or mTintProgram set based on
UseTintGenerator.
Also improves the constness of some functions.
Also simplifies a bit ShaderModuleBase::Initialize.
Bug: dawn:706
Change-Id: Ib879e2aec8a004aeb8ac5dc6e1176b1667fc227d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45422
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Since it isn't used by anyone yet we can make a breaking change to
CreateRenderPipelineAsync to immediately start using
RenderPipelineDescriptor2.
Bug: dawn:1177501
Change-Id: I9f88c6fc1b325b7a9356536e2a071d4f17abd6ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45280
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Converts var<storage_buffer> to var<storage>
Adds in [[access(read_write)]] when no access qualifier was supplied.
BUG=dawn:699
Change-Id: I9da95366d0bb8734f1d134ee2dc764a7c16ef0cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45300
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The CL that fixed deprecation warning expectations landed at the same
time as the CL which added this expectation and broke CQ.
We shouldn't check deprecation warnings here now because the warnings
for CreateRenderPipeline are temporarily disabled.
Bug: none
Change-Id: I99a8b6643e64f87b2354058dbac9a236c51a2afd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45180
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
The WGSL spec has been updated with 'Default Struct Layouts':
https://github.com/gpuweb/gpuweb/pull/1447
This removes the `[[offset(n)]]` decoration, and replaces it with two optional decorations: `[[size(n)]]` and `[[align(n)]]`, and a sensible set of sizes and alignments for each type.
Most `[[stride(n)]]` decorations have also been removed from arrays.
Bug: tint:626
Bug: tint:629
Change-Id: Ib0d2741f61ea943e6fb99d00cbb5cab2f97ae7be
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44280
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch fixes a bug in the computation of temporary buffer size in
the implementation of the workaround for the T2T copy issue on Intel
GPUs.
With this tests all the T2T operation tests in WebGPU CTS will be able
to pass on Intel Gen9 and Gen9.5 GPUs.
BUG=chromium:1161355
TEST=dawn_end2end_tests
Change-Id: Ic4fb0c0056cf7b01720e47cc91c37a9f293cd194
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44840
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
BUG=dawn:714
Change-Id: Ic9c478ae708d48cf78228edf831badb7c401d131
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44924
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
BUG=dawn:712
Change-Id: Ie8b504a3566fae18a35029b63cf74f55dbe93b0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44922
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
BUG=dawn:711
Change-Id: I566f2631721d10374027cf3959fce7eaf20a85c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44921
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
BUG=dawn:710
Change-Id: I47dac524f66f84e2d5e3aa966935bd2ca9d03144
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44920
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
BUG=dawn:709
Change-Id: Ib829a834546588a2948179f487fc75b1bf09cf06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44901
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Constructor arguments need to match the vector element type.
Tint has new validation that now checks for this.
Bug: tint:632
Change-Id: Ifcb994260c167e326ce5c0776915d44954dd8aa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44767
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Integer literals need to be suffixed with `u` in order to be unsigned. This also includes 0.
Tint has new validation that now checks for this.
Bug: tint:632
Change-Id: I1af07590d93620561df1a0084521eb071d4af7ed
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44766
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
It was causing issues building Dawn in Skia. The error message helpfully
suggests using WideCharToMultiByte instead.
Bug: dawn:706
Change-Id: I87dee1192123f49cc8e7243a29df446389454df4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44560
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
BUG=dawn:702
Change-Id: I1a75929bbb91411c10dac5a5408e8fc57d67102b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44460
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Remove usage of the depth offset in TextureCopySplitter. Because there
is no slice pitch alignment requirement, it is simpler to express the
subresource footprint with just width and height. Fixes incorrect copies
when using WriteTexture on a texture with 64 or less width.
Bug: dawn:573
Change-Id: I51cb73b522a443b8b42d9ba290c69541211be4bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39200
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 a workaround for a compile error when calling
std::begin on C-style arrays when rolling Dawn to Skia.
BUG=chromium:1161355
Change-Id: I6b697c383c0f76866e1d35f75bd1f64b96c5d6c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44520
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Allow external images to specify all allowed texture usages which will
be checked by ProduceTexture. This avoids needing to assume the usage
between multiple calls to ProduceTexture is always the same.
Bug=dawn:625
Change-Id: I9fdb59af23e6c160e939ab1c51de03542248c0c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44260
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Currently normalizes anything using the new layout to the old one for
the sake of getting things working as quickly as possible. Follow up
changes will gradually push the new layout through more of the stack.
Bug: dawn:642
Change-Id: Ie92fa9dde21174f62ceba1a1f4866cbc24c5fc6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38600
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
On Intel Gen9 (SKL) and Gen9.5 (KBL, CFL, CML) GPUs with latest
Intel D3D12 driver (27.20.100.9316), there is a bug in the command
CopyTextureRegion() when we want to do the texture-to-texture copy
with the formats whose texel block size < 4 bytes and source mipmap
level > destination mipmap level.
This patch adds a workaround for this driver bug by implementing
the functionality of the T2T copy with one T2B copy and one B2T
copy.
BUG=chromium:1161355
TEST=dawn_end2end_tests
Change-Id: I688bb8bae277832aaba1be2680012040ee8e1160
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43860
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
For sanitizing symbols.
Replaces use of Inspector::GetRemappedNameForEntryPoint()
Change-Id: I1e20f719e0e80c04c5c4e4ae52bdb47f8d0572f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43884
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This is to follow the renames in the upstream WebGPU specification.
Typedef are left in places to make a smooth deprecation period.
Bug: dawn:22
Change-Id: I5134b897930c1fa883c49dd80d2665d6684ec022
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43882
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
This allows us to enable white_box tests that use Tint. It
fixes linking with symbols from both dawn_native statically
and dynamically.
Bug: dawn:696
Change-Id: I6a002ae5ec55a27b6bf7329c9ba301ce8014d521
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43840
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Calling Texture::DestroyImpl will cause a crash when passing a
nullptr D3D12 resource to the Present method of
ID3D12SharingContract.
Protect against crashes by checking whether the allocation we're
destroying is valid before proceeding.
Change-Id: Ifb68c1f85383db5027006cf435f43c84d1a463d9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42580
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com>
Bug: dawn:447 dawn:667
Change-Id: I66d5a33febeee6a5ea4efd7c4e97461accce22ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43580
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Caught by the bots running SwiftShader
BUG=tint:516
Change-Id: I4e93c2f73cf48242b49c8aea1f5f29a21ac6b8e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43600
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
CopyTextureForBrowserTests will cover incoming color format conversion
cases. While it is OK for |unorm| formats to compare their pixel values
on the CPU side, we cannot do such comparisons for the |float| formats
because we may meet the precision issues when comparing a value
generated at the CPU side to the one from the GPU side.
Refactor this test suites by using compute shader and do bit-by-bit
comparison from source texture and destination texture.
BUG=dawn:465
Change-Id: I979fcf1a1d96bbe9f8a4cf2f1a305d488e88b257
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36140
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch uses RecordCopyBufferToTextureFromTextureCopySplit() to
record the D3D12 commands in Texture::ClearTexture() so that we can
remove some redundant code in that function.
BUG=dawn:145, dawn:693
Change-Id: Ifd0ba319c335fdf13e60bf748163451d71dad962
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42760
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Replaces use of EXPECT_EQ with ASSERT_EQ and allows
ASSERT_EQ to propagate to caller so the test returns
early.
BUG=dawn:625
Change-Id: I6c12aad201f1821fa8c7c1f9a9b735910049cdcf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42940
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
The level-less variants have been removed from the WGSL spec, so will
be removed from Tint soon.
BUG=tint:516
Change-Id: Ic09ffadc2902ca9cdb3198b91f8ad694887258d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42704
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This patch adds a regression test to dawn_end2end_tests for an
Intel D3D12 driver bug about the T2T copies with specific texture
formats when the source mipmap level is greater than 0.
This patch also does several clean-ups in CopyTests.cpp to support
testing arbitrary texture formats:
1. Initialize the source textures with device.WriteTexture().
2. Set default values for TextureSpec.copyLevel (0),
TextureSpec.levelCount (1) and TextureSpec.copyOrigin ({0, 0, 0}).
3. Add TextureSpec.format and set the default value for it (RGBA8Unorm).
4. Support initializing and comparing the texture data with arbitrary
texture format instead of RGBA8Unorm only in CopyTests_T2T.
5. Check all the texels in the related destination texture subresources
instead of only the copied texels.
BUG=chromium:1161355
TEST=dawn_end2end_tests
Change-Id: Ib32aac57dc7bdc9a4c2edc96093afa945aa08a5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42240
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This change allows multiple Dawn textures to be created from the same
D3D11 resource. This avoids re-opening the shared handle by caching the
D3D12 resource outside of the Dawn texture.
Re-opening the handle costs 5-10% of CPU cycles per frame, which far
exceeded syncronization costs.
In a future change, WrapSharedHandle will be depreciated.
BUG=dawn:625
Change-Id: If0d2dc9b7445ec3ae718bc5305164db88057c4ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42140
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
tint::transform::Transform::Output::diagnostics is deprecated.
Diagnostics are now all in the Output::program.
Use the VertexPulling(const Config&) constructor instead of the setters. These are deprecated.
Change-Id: Icefb84719d4915550c1e554e6d0c6e06ebb05f5c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42266
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Although VkPhysicalDeviceVulkan11Features::storageBuffer16BitAccess is a subset
of VkPhysicalDeviceVulkan11Features::uniformAndStorageBuffer16BitAccess, when
the SPIR-V Capability (StorageBuffer16BitAccess) was declared, we must enable
the VkPhysicalDeviceVulkan11Features::storageBuffer16BitAccess feature
according to the requirements of the spec.
BUG=dawn:675
Change-Id: I99f9eb4c5f2fd6c6565a51063817efb8bc88216f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42620
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Hao Li <hao.x.li@intel.com>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Shifts the older enum values up by 30, but if anyone was using values
rather than the enums themselves they'd land on the right formats
anyway.
Bug: dawn:695
Change-Id: I92a177b427fb1bb14b60d9280f89d030c5941a38
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42561
Commit-Queue: Brandon Jones <bajones@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Async functions should fail by rejecting the callback instead of
generating a device error. This fixes a leak in the wire where
the allocation for the callback was never delete since it was
never called.
Fixed: chromium:1181627
Change-Id: I840073c1d1b5f1401aa8ed29d3c8f0e1e4fefd35
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42540
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Currently on D3D12 backend a device lost will occur when we do a T2T
copy under the following situations:
1. with Depth32Float
2. only copy one row
3. bufferCopyOffset == 256
This is because in current implementation it is possible for us to do
a copy with D3D12_SUBRESOURCE_FOOTPRINT.Depth > 1, which is not allowed
with DXGI_FORMAT_D32_FLOAT because this format is not supported to be
used as 3D textures.
This patch adds a regression test for this bug and we will fix it
later.
BUG=dawn:693
TEST=dawn_end2end_tests
Change-Id: Ib6fe70988b5b217d5f14d3f32999b3841e5d23b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42600
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
The are replaced by Queue::OnSubmittedWorkDone. Only Queue::CreateFence
is deprecated since all other fence-related calls require a fence to
work.
Also ports a number of uses of fences in test harness to use
Queue::OnSubmittedWorkDone instead.
Bug: chromium:1177476
Change-Id: I479415f72b08158a3484013e00db8facd11e6f33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42660
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Bug: none
Change-Id: Ic437dc7656613d9a8088dd51f1ed0713f1992415
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42720
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Bug: dawn:680
Change-Id: I6d57280ab11381649deef51ee7babf5ca73f359b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42340
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This is using the Tint -> SPIRV-Cross path, but Tint supports
the SPIR-V part now, so it works correctly in Dawn's tests.
Bug: tint:400
Change-Id: I6efd9447a9b454fb866467d65fda9350ec772f18
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42560
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This works for the SPIR-V tint backend.
Other backends need to be enabled seperately.
Bug: tint:463
Bug: dawn:571
Change-Id: I4c937eec381a05609b267d36d202844758b13547
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42641
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
It was being taken from the pre-transformed program, not the post-transformed program.
If we did get a transform error, the string would be empty.
Also change the signature of RunTransforms() to take a Transform* instead of a Manager*. There's nothing special about Manager anymore - it is just a transform that acts as a group of other transforms.
Change-Id: I4ea6cb022b5967b3c6b8c628517727dc3da3be8e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42640
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This is the replacement for Fence in the single-queue WebGPU world. To
keep this CL focused, it doesn't deprecate the fences yet.
Bug: chromium:1177476
Change-Id: I09d60732ec67bc1deb49f7a9d57699c049475acf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41723
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Adds dawn_native::ResetDeviceInternal, which allows us to destroy and
create a new ID3D12Device. The device should be reset after every test
when GPU-based validation is enabled in order to prevent GBV objects
from using a significant amount of memory over time.
Bug: dawn:623
Change-Id: I654d093d993ab0198c6c240bd0f3f843d2762680
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41340
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Rafael Cintron <rafael.cintron@microsoft.com>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
This reverts commit 9fdbb74072.
Reason for revert: The SPIRV-Cross GN files have a bug which is fixed upstream, but Skia is on an old version of SPIRV-Cross so they don't have the fix. So, the build fails when rolling Dawn into Skia complaining about unknown `-fno-exceptions` on the windows bots. Need Skia to either move to vulkan-deps, or roll their spirv-cross forward before this can re-land.
Original change's description:
> Use upstream SPIRV-Cross GN files.
>
> Previously spirv-cross didn't have its own sources files but this
> changed recently so we should use them. This will ultimately allow
> sharing targets between multiple components in Chromium.
>
> Bug: chromium:1179277
> Change-Id: Ib4bb1884b9ba9c4c3804e96d8adbb8905c60c9a3
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41725
> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Peng Huang <penghuang@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Bug: chromium:1179277
Change-Id: If1003bafa7b35f502c08b2dab91dd3d416aab077
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42420
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The new tint::transform::[Spirv,Hlsl,Msl] transforms sanitize the tint::Program for the given backend.
The tint::transform::Spirv transform handles edge cases for sample masks (crbug.com/tint/372). We can now enable these tests.
Rework dawn_native::[opengl,vulkan]::ShaderModule::Initialize() so that transforms are applied *before* calling ShaderModuleBase::InitializeBase(). This is done as InitializeBase() wants to validate the SPIR-V, which requires the pre-processing of tint::transform::Spirv.
InitializeBase() also performs shader reflection which needs to be performed on the post-transformed program for the information to be correct.
Bug: tint:372
Change-Id: I4c96ce89b6ae286972549d8c7efe59e77c469063
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42223
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Store index buffer size in CommandBufferStateTracker and skip
issuing drawIndexed call if it's out of bounds.
Bug: dawn:622
Change-Id: I8f4bd8ba03dea931815dc0db87ffacb9936a123d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
SwANGLE does not support GL_EXT_texture_compression_s3tc.
However, it does support GL_EXT_texture_compression_dxt1,
GL_ANGLE_texture_compression_dxt3 and GL_ANGLE_texture_compression_dxt5,
which should be sufficient for Dawn's purposes.
Note that sRGB formats may be problematic for OpenGL ES in general,
but ANGLE does support them, so we can satisfy the requirements for
Dawn's texture_compression_bc and exercise the codepaths on ES.
glPixelStorei is not only unsupported for CompressedTexSubImage*D()
but causes asserts in ANGLE and validation errors elsewhere. The fix
is to scope the glPixelStorei() calls to the non-compressed codepath.
Bug: dawn:580
Change-Id: I68fa019eda2aee37a097e697cfc87bcdc28c1f12
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42120
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This introduces a macro DAWN_TRY_WITH_CLEANUP which allows
some code to be run before the early return.
Bug: chromium:1177332
Change-Id: I529c9ca6f2b0cf6ffd4bf85719a4e2a1c2552d1b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42003
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
In upstream WebGPU, error scopes do not wait for queue operations or
async operations like create*PipelineAsync or mapAsync. This simplifies
the implementation so we don't need to track error scopes by parent
pointers but can instead have a simple stack.
Bug: dawn:22, chromium:1177107
Change-Id: Ic7344cbd96e257cbabc0f414934a5e42a4020a13
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41980
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Previously spirv-cross didn't have its own sources files but this
changed recently so we should use them. This will ultimately allow
sharing targets between multiple components in Chromium.
Bug: chromium:1179277
Change-Id: Ib4bb1884b9ba9c4c3804e96d8adbb8905c60c9a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41725
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Peng Huang <penghuang@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Compressed textures (BC formats) can support full or partial mip chains.
This tiny change adds a validation test to ensure it.
Bug: dawn:558
Change-Id: I584b65b7d049a3f188e3b56ca5c9ff36748151ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42004
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This makes the primitives in the serialized wire protocol
the same across platforms and architectures which is better
for both fuzzing and remoting Dawn.
Commands that used size_t are updated to use uint64_t, and
the server-side implementation checks if conversion to
size_t would narrow.
Bug: dawn:680
Change-Id: Icef9dc11a72699685ed7191c34d6a922b652c887
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41582
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
They were in QueueSubmitValidationTests which was confusing.
Bug: None
Change-Id: I58406149e9e71feafaf111c35aed255c78b9b642
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41726
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
BufferConsumer wraps a buffer pointer and size and exposes a
limited number of operations to get data while decrementing
the remaining available size. This makes it so that code
reading or writing into a buffer cannot easily consume more
bytes than available.
This CL guards against serialization overflows using
BufferConsumer, and it implements GetPtrFromBuffer
(for deserialization) on top of BufferConsumer. A future patch
will make the rest of the deserialization code use BufferConsumer.
Bug: dawn:680
Change-Id: Ic2bd6e7039e83ce70307c2ff47aaca9891c16d91
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41780
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This version renames HasBackendType() -> HasBackendTypeFilter() and
adds a test, similar to HasVendorIdFilter().
Bug: dawn:687
Change-Id: I444d3cb668eb7402ba45f14aaec290390f4c3944
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41900
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Bug: dawn:681
Change-Id: I5d9cd3636a656df1ba9d23964c18011b9cfcf5c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41440
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Removes special casing depth-stencil or multi-planar formats.
Like depth-stencil, NV12 views can be created but not sampled.
BUG=dawn:551
Change-Id: I3cd43d079253f4ee45660d0efd2723e1650f88d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41342
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Releasing this configuration is no longer part of the PoR, so no need
to fuzz it.
BUG=dawn:683,chromium:904410
Change-Id: Ic499c68d48b88240361f4ffa937c878b3e3c8526
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41760
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Some of these are skipped by lack of optional feature support,
but at least this brings them on the radar by increasing the
skip counts for the GL backends.
Bug: dawn:580
Change-Id: I3439f41584e70dd51f6d0f7826ef9da7c046020e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41401
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This is a reland of fb0bf70459
Reland after making libx11-xcb dynamically loaded since it isn't present
on all Linux deployment targets of Chromium. Also includes a couple of
additional cosmetic changes to d3d12/PlatformFunctions noticed while
looking at it for inspiration.
Original change's description:
> Vulkan: Fallback to XCB for Xlib surfaces
>
> Chromium builds the Vulkan loader without support Xlib (because it
> prefers XCB) which caused Xlib wgpu::SwapChain creation to fail on the
> Vulkan backend.
>
> This CL adds a fallback to use VK_KHR_xcb_surface if VK_KHR_xlib_surface
> isn't present.
>
> Bug: dawn:662
> Change-Id: I0e0128ee6b5c75da03998dbae231d17e48bacc81
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41180
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Bug: dawn:662
Change-Id: I617fcd1059dddfa05c29ac20d77f891ca6962342
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41380
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Tint automatically infers a storage class of `handle` for these types
of variable, as per the WGSL spec. Explicitly specifying a storage
class for them will soon become an error.
Bug: tint:332
Change-Id: Ib67e44a5afcdd364470488fd4b456a2b42304daa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41402
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This is to match the upstream WebGPU specification.
Also remove maxVertexAttributeEnd in favor maxVertexBufferStride.
Bug:dawn:678
Change-Id: Ia498ff522ba257d40e9ddd6e145a0ba77f6753ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41182
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Currently the queries availability info is only stored on the encoders
where they are written, and we need the info in the compute shader. If
resolving them from a different encoder, 0s are returned because the
queries are not written on resolving encoder.
Besides the encoders, we also need to add availability info to query
set, and use it in compute shader instead.
When resolving query set without any written, we need to reset queries
before resolveQuerySet based on the query set availability on Vulkan.
Added more end2end tests for these cases.
Bug: dawn:645
Change-Id: I09bf1230934aa885587fa4f671925940c1795cd9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39740
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Sample mask variables and all functionality introduced by GL_OES_sample_variables was not made core until ES 3.2.
Implement a toggle to disable the functionality if not supported by the backend.
Bug: dawn:673
Change-Id: I7a5ec61fb57da343f0f72ffd3b0c69031eaaff8f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41142
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Readback of stencil is not supported on vanilla ES, so we introduce a toggle to disable it. NVidia GLES drivers support NV_stencil_read and NV_depth_stencil_read extensions, so we use those where available.
It turns out ANGLE supports NV_stencil_read but not NV_depth_stencil_read (for reading from the packed depth/stencil buffers which Dawn uses), so that's the extension we check for.
Bug: dawn:667 dawn:634
Change-Id: I136674d3d47fecee2b8b390d5d219bab07e3bb64
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41141
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This reverts commit fb0bf70459.
Reason for revert: Failing build during roll:
https://chromium-review.googlesource.com/c/chromium/src/+/2686267/2
Original change's description:
> Vulkan: Fallback to XCB for Xlib surfaces
>
> Chromium builds the Vulkan loader without support Xlib (because it
> prefers XCB) which caused Xlib wgpu::SwapChain creation to fail on the
> Vulkan backend.
>
> This CL adds a fallback to use VK_KHR_xcb_surface if VK_KHR_xlib_surface
> isn't present.
>
> Bug: dawn:662
> Change-Id: I0e0128ee6b5c75da03998dbae231d17e48bacc81
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41180
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>
> Auto-Submit: Corentin Wallez <cwallez@chromium.org>
TBR=cwallez@chromium.org,jiawei.shao@intel.com,hao.x.li@intel.com,enga@chromium.org
Change-Id: Ia8d2ffb715260b1de490ca04cc76f41bb60b1f61
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:662
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41343
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This CL removes the use_tint_inspector toggle which was deprecated in
favour of the use_tint_generator toggle.
Change-Id: I0d48b0cef4605021e0fcf26b9035faf0da6668f1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41241
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Chromium builds the Vulkan loader without support Xlib (because it
prefers XCB) which caused Xlib wgpu::SwapChain creation to fail on the
Vulkan backend.
This CL adds a fallback to use VK_KHR_xcb_surface if VK_KHR_xlib_surface
isn't present.
Bug: dawn:662
Change-Id: I0e0128ee6b5c75da03998dbae231d17e48bacc81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41180
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
SNORM textures are non-renderable on vanilla ES, which means they're also
non-readable. Use the EXT_render_snorm extension where available, otherwise
skip the test for now.
Bug: dawn:624 dawn:636 dawn:647 dawn:667
Change-Id: Ic50368032d6168060b6b52889b4ba952ce662f02
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Previousl the VkPipelineShaderStageRequiredSubgroupSizeCreateInfoEXT was
chained on the VkComputePielineCreateInfo when instead it should be
chained on the VkPipelineShaderStageCreateInfo, causing Vulkan
Validation errors.
Fixed: dawn:671
Change-Id: I9cc803a4f9120cf81f4e143818c3be58b73635d8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40604
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Only set SwiftShader as the default ANGLE backend if the
ANGLE_DEFAULT_PLATFORM environment var is empty. This will allow
devs to set it.
Bug: dawn:447
Change-Id: I49aac4bcb4b0b7c56903eca68248ee22cdf1e6f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41140
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
The wire now supports more than one device, and Chrome is updated
to use the new code path. This fixes same-device validation for
createReadyPipeline.
Bug: dawn:565
Change-Id: Id05001ed1a7e535690c87f535da6f72a0e794c59
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40460
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This helper is no longer needed now that the descriptor has full
defaults and is even optional in CreateSampler.
Bug: dawn:599
Change-Id: I0d25233ebb1e817ad27f3ddaca988e01e2a5298c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40520
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Adds support for NV12 texture format and per plane view aspects.
Only allows planar sampling of imported DX11 textures. See usage
tests for examples and formats.h for rules.
Bug: dawn:551
Change-Id: I44b89d2c07bb9969638e77ce7c756ef367167f0c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38781
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Re-enables Intel D3D12 GPU-based validation bots. This comes after the
--enable-backend-validation=partial option was introduced and the bot
configurations were changed to make use of it.
Bug: dawn:598
Change-Id: I9f5c5111340aeefa729e0d2fd26f9f884813eb3a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40481
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Callbacks should all reject instead of waiting for the device
to idle on shutdown.
Bug: dawn:652
Change-Id: Id4a9ab2560aa34b8ea574271f61f8a499e15ab3a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40360
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Refactors DawnTest's backend validation options to use an enum, as well
as adds the 'partial' option enable backend validation with a
reduced performance overhead to address TDR issues on the bots.
Bug: dawn:598
Change-Id: I759eff03bd117f1f20ad82aa2b71a87834f42b1d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40000
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The tests should wait till the MapAsync operation is complete
before calling GetMappedRange.
Bug: dawn:651
Change-Id: Iec001efaa3c3b76704dc4d926e91d1b1c58901bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40303
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
- Add more end2end tests for direct and indirect dispatches, including
0x0x0, 0xNxM, Nx0xM, NxMx0
- For direct dispatch, they will cause system crash on Metal backend.
Bug: dawn:640
Change-Id: I77a4bee87df89857b05b713de8d78b0cb1f0ca50
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39520
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Workaround for Metal becuase system crashes on 0 dispatches.
Bug: dawn:640
Change-Id: I5bd33b22242ddc31816a16acb019ce2f552808bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39521
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Functions like CreateReadyRenderPipeline reserve an
ObjectId for the pipeline created but the Id can not be
used until the callback is called successfully.
Bug: chromium:1172774, chromium:1172775
Change-Id: I145c0f033a2bde7957d15da2da8b9b19c6520ceb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39840
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Issues with log2 on Metal/Intel were actually due to floating point
precision not being guaranteed and the tests not accounting to that.
This has been corrected.
BUG=dawn:663
Change-Id: I401d22898e69ea6b3f96f3d2c57a28b1dc682ed5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40243
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The fuzzers will be updated to always expect this format. If
the fuzzer doesn't do error injection, it will simply skip
these bytes.
Bug: dawn:629
Change-Id: I894e95ce9c1048eda81593219f7fc5d91e123392
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40121
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
OpenGL ES drivers (like OpenGL drivers) have DeviceType::Unknown.
We want to allow testing of unknown native GLES drivers,
as we do for GL drivers, so add them to the conditional.
NOTE: this change will enable the OpenGLES backend to run tests on
the CQ and waterfall bots.
Mark SwANGLE as a "CPU" adapter type, rather than unknown, since we
don't want to test it by default.
Difference from https://dawn-review.googlesource.com/c/dawn/+/39920:
Skip EntryPointTests.FragAndVertexSameModule on OpenGL ES.
Bug:dawn:580 dawn:447 dawn:661
Change-Id: I6eafbcf9c45cd8ba6c9c2b906fba7b1b147600df
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40260
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
BUG=chromium:1046622
Change-Id: Ic554190ed95efbd555472db95cbbd9aed66a950d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39961
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
This reverts commit 9bb02dbbc6.
Reason for revert: breaking the Dawn roll into Chrome: https://ci.chromium.org/ui/p/chromium/builders/try/dawn-linux-x64-deps-rel/12478/overview
Original change's description:
> Fix SwANGLE DeviceType and OpenGL ES DeviceType checking.
>
> OpenGL ES drivers (like OpenGL drivers) have DeviceType::Unknown.
> We want to allow testing of unknown native GLES drivers,
> as we do for GL drivers, so add them to the conditional.
>
> NOTE: this change will enable the OpenGLES backend to run tests on
> the CQ and waterfall bots.
>
> Mark SwANGLE as a "CPU" adapter type, rather than unknown, since we
> don't want to test it by default.
>
> Bug:dawn:580 dawn:447 dawn:661
> Change-Id: I21577cb9d1fdec53704433a5db1fe2603bdbeb6d
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39920
> Reviewed-by: Austin Eng <enga@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Stephen White <senorblanco@chromium.org>
TBR=cwallez@chromium.org,senorblanco@chromium.org,enga@chromium.org
Change-Id: I7e454f1da23faa4cfa0cfe737c0d318ecca2bcd8
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:580 dawn:447 dawn:661
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40240
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
OpenGL ES drivers (like OpenGL drivers) have DeviceType::Unknown.
We want to allow testing of unknown native GLES drivers,
as we do for GL drivers, so add them to the conditional.
NOTE: this change will enable the OpenGLES backend to run tests on
the CQ and waterfall bots.
Mark SwANGLE as a "CPU" adapter type, rather than unknown, since we
don't want to test it by default.
Bug:dawn:580 dawn:447 dawn:661
Change-Id: I21577cb9d1fdec53704433a5db1fe2603bdbeb6d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39920
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Tint now produces SPIRV that is sufficient for these tests to pass, so
re-enabling them.
The multiple entry point problem for HLSL mentioned in one of the other
skip statements appears to still be a KI, so not removing it.
Change-Id: I47005c815dc3cb9093d293e71caa3152c11bf0ac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39100
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This change also adds a very simple end2end test to verify that
we can create 3D textures and views. But we can't do anything
with them (like copy, sampling, rendering, etc) currently.
I will implement 3d textures and views creation on other backend
in one patch if the simple end2end test is OK.
Bug: dawn:547
Change-Id: I1662458de563cc4b47040a8bc3e94d7a8e0109e5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39843
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
A whole lot of public API tint changes have been made to simplify usage of the library.
Big changes include:
* Type determination is now implicit
* Generators no longer take ownership of programs, so they don't need to be cloned.
Change-Id: Icac0956ae120ae4e6a9d0290b2478c0fbc3bcf22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39341
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This reverts commit 1b5526457f.
Reason for revert: Tint issue was fixed.
Original change's description:
> Suppress RenderPipelineValidationTest.VertexAttribCorrectEntryPoint
>
> This is failing in the roll of Tint in Dawn because Tint generates
> invalid SPIR-V. This CL suppresses the failure so as to unblock the
> roll.
>
> TBR=enga@chromium.org
> Bug: tint:468
> Change-Id: I2a66fc9a6a9e37098651a0f5cd72d41ecf993a72
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39761
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
TBR=cwallez@chromium.org,enga@chromium.org,bclayton@google.com
Change-Id: I6da08abf44ca9967f51ae535561e8101c31de8f7
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: tint:468
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40060
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
- Add occlusionQuerySet to BeginRenderPassCmd
- Implement BeginOcclusionQuery/EndOcclusionQuery on Metal
- Enable occlusion end2end tests on Metal
Bug: dawn:434
Change-Id: I6c6ed74c77eb7e66f21fc5b8aa97b80eddb1111f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38784
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This allows deserialization to fail if the buffer is not large enough.
Before, we simply assumed the buffer was at least the size of
WGPUDeviceProperties.
Bug: none
Change-Id: I24e1f84c583f48d4e32c35276e5508e257e9f530
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39861
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
The use_tint_inspector and use_tint_generator flags are being merged.
Remove new usages of use_tint_inspector.
Change-Id: I6837d18c0ee79dc8f81ed6949666c3b7e93dcaf2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39960
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This CL enables the GLES backend on most the remaining tests for which
the desktop OpenGL backend is enabled.
Skip tests which require glTextureView().
Don't enable NonzeroTextureCreationTests; all are failing.
Skip ANGLE failures on NonRenderableTextureClear*.
Bug: dawn:580, dawn:447
Change-Id: Iac24a3ff89712c0d3bb2ae41455a6e55a6c3a2c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39921
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
3D texture view's baseArrayLayer must be 0, and its arrayLayerCount
must be 1. In addition, 2D/2DArray/Cube/CubeArray (and 1D) views
upon 3D textures are not allowed.
Other behaviors for 3D texture views like default values are similar
to 2D/2DArray views.
This change also adds a test for aspect test against color format for
completeness, in addition to the existing depth/stencil formats.
Bug: dawn:558
Change-Id: I4f5d095b85c9b81e6f41497f1c8a54b569c210bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39600
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This CL makes the wire gracefully handle all invalid and unknown
sTypes. All unknown sType structs are serialized and deserialized
as the base WGPUChainedStruct with sType Invalid.
Bug: dawn:369, dawn:654
Change-Id: Ia2571df81fc96e2c672d3ea13c03237a2d5fa5c1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39460
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This is failing in the roll of Tint in Dawn because Tint generates
invalid SPIR-V. This CL suppresses the failure so as to unblock the
roll.
TBR=enga@chromium.org
Bug: tint:468
Change-Id: I2a66fc9a6a9e37098651a0f5cd72d41ecf993a72
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39761
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This will apply to the bots (once they're running the ES backend) as well as developer builds.
Bug: dawn:580 dawn:447
Change-Id: I0cb7864c094d6bbd636f91734ca299de51a9f0e5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39420
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Bug: dawn:22
Change-Id: Ifce24a0b19fb8d3acb6ac8ab32f3f3e22a248b3b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39340
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
BindingInfo is declared in BindingInfo.h. However,
ShaderModule.h declares an alias BindingInfo in EntryPointMetadata.
This confuses GCC. Rename the alias to BindingInfoArray.
Bug: chromium:819294
Change-Id: Ia43c9eb8d793a3078faa6340980017236a6adbb3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39502
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This reverts commit 7bfb3ed2c6.
Reason for revert: Still failing some zero init tests
Original change's description:
> Moar testing on OpenGL ES backend.
>
> This CL enables the GLES backend on all the remaining tests for which
> the desktop OpenGL backend is enabled.
>
> Bug: dawn:580
> Change-Id: Iab0d13299d58d17749a3405d25d27da7ba4077fa
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39320
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Stephen White <senorblanco@chromium.org>
TBR=cwallez@chromium.org,senorblanco@chromium.org,enga@chromium.org
Change-Id: I37bb1438107151f11617e67287fe9f5e0e22fd21
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:580
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39361
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
In order to support 3D texture, new validation rules are added:
- to say that multisample 3D texture is not supported.
- to distinguish 3D texture from 2D array texture via texture type,
and its impact on max values of size.depth, mipmap levels,
array layer count, etc.
- to say that 3D compressed texture is not supported.
This change also adds validation tests for zero-sized textures,
in addition to validation tests for the validation rules above.
Bug: dawn:558
Change-Id: Ib7d398fdab49a702eaa798f6353639d3721747e6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34922
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL enables the GLES backend on all the remaining tests for which
the desktop OpenGL backend is enabled.
Bug: dawn:580
Change-Id: Iab0d13299d58d17749a3405d25d27da7ba4077fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This enum is unsupported in OpenGL ES. If this is actually a problem
for WebGPU, we may need to add validation for WebGPU-compat to prevent
reading from a texture to a buffer with a different image stride. I'm not sure
if that's currently possible, and it doesn't seem to be covered by tests.
Change-Id: Ia39d0dae122acfba3c663ae5956a981a0acb5e07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38740
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
arrayLength is well enough supported in Tint that these tests now
pass.
BUG=tint:252
Change-Id: I5d8f00d8ae651a2e075ef33b88a8c4df56895ce8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39140
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
This enum value is not supported, but the functionality is implied.
Silences a GL error from ANGLE.
Change-Id: Ib3eb242c53d548f7b9648f7037c3178705cbaecd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38800
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This CL combines the use tint inspector and use tint generator toggles.
Change-Id: Idcfe0ffa1ddbdf0e240dd8d502d0a164018a6e1b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39142
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
This is the last piece of validation that was done in a separate
validation pass so the validation pass is removed.
Bug: dawn:635
Change-Id: I91ce5d5a512ac188f3dd56c90db9e69aee518844
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38845
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Previously, resolve was not performed if storeOp was "clear".
Resolve should occur iff a resolveTarget is provided, regardless of
storeOp - storeOp only controls the regular render target.
Test: webgpu:api,operation,render_pass,resolve:render_pass_resolve:*
Test: MultisampledRenderingTest.ResolveInto2DTexture
Bug: dawn:650
Change-Id: Ibeae984be7f82680f182246fabc6ca9a4e1af176
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38880
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Bug: dawn:634
Change-Id: I30f0c1496e5443bda9bee1905162eae39ce2461c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38940
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This enables running the validation uses using the wire with
the command line flag --use-wire
Bug: dawn:654
Change-Id: I17a642a132c8b6321195ec6869e5f86aebdd1c51
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38620
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
The blocking issue in Tint has been resolved.
BUG=tint:398
Change-Id: I388b0f818ccba6300c52064a2374d7dde1e72a42
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39141
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This utility will be used to run tests on the wire in both the
end2end tests and the unit tests.
Bug: dawn:654
Change-Id: I5ac0b2385efe32ee1c4af033b01198f890c0f7dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38500
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
One test has the blocking issue updated to what is currently causing
the failure, and another is passing now, so can be fully enabled.
BUG=tint:114,tint:398
Change-Id: I1735349bdff6f0c36990358b43b17df9c2175970
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39180
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The blocking issues in Tint for the tests in this file have been
resolved, so they can be re-enabled.
There is one outstanding TODO related to Tint in the file about
re-writting one of the shaders, which the root issue for is still
open.
BUG=tint:398
Change-Id: Ia173a33d7ea88b6355dff8b02fd8394f2fa61fd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39120
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This CL updates more #'s to //'s and a missing set to group.
Change-Id: If417ed019319ed760e3b672770397857c6dfc40c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39065
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
These tests now pass, since their blocking issue in Tint has been
resolved.
BUG=tint:398
Change-Id: I628bf2be132d2a671ef832951a4798c3c6fef9cb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39066
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The blocking issue in Tint for these tests has been fixed.
BUG=tint:398
Change-Id: I54715730bdac0de01c5aab47a6559257987943e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39080
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Enables a number of tests that were disabled, due to lack of support
in Tint.
Updates the guards on others to be more accurate.
BUG=tint:398,tint:375
Change-Id: I29d56e53862b6274a2d8a19cbf8315c3a687e16a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39063
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This was changed in WebGPU to make the behavior more consistent. See
https://github.com/gpuweb/gpuweb/pull/1373
Bug:
Change-Id: Icd5f6964a8bc58fdebe7c1a79d4353e6a1a52231
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38844
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Bug=tint:463
Change-Id: I6d8787b9bac726e1a987581dc8e9268be70d6e98
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39060
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It's annoying to have four windows pop up during end2end test runs
(and potentially steal focus). It would be nice to hide them.
Bug: dawn:656
Change-Id: Ifcee65373e00d703bef308aecf1f85d696caa9dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38640
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
The overarching goal with this CL is to do validation at encoding time
which will help produce SyncScopeResourceUsage in the frontend for
dispatch() calls so that they can be reused by the backends.
Bug: dawn:635
Change-Id: Ifb8b7883abe18089dc3d632baebbcc79b3f324f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38843
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This also adds missing coverage for push/pop debug group in render
bundles. The RenderBundleEncoder didn't validate itself on Finish, so
add a regression test for that too.
The overarching goal with this CL is to do validation at encoding time
which will help produce SyncScopeResourceUsage in the frontend for
dispatch() calls so that they can be reused by the backends.
Bug: dawn:635
Change-Id: Ie5a2d987fda3854b3145ba4b7a34994ea605e820
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38842
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This is more in line with what happens in dawn_wire and Blink's WebGPU
implementation. It also allows fixing the Fence-related DeviceLost tests
to destroy the mock fence callback on destruction, which in turns fixes
a crash on dawn_end2end_tests exit on MSVC x64 debug.
Bug: dawn:602
Change-Id: I277e7fa284a573854ed46576602d5f6819db1357
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38526
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This test is attempting to confirm that behaviour from the SPIR-V
WebGPU execution environment will occur. Given that the implementation
of this spec has been removed from SPIRV-Tools and Tint handles this
gracefully, the test will never succeed.
Bug=dawn:57
Change-Id: I0ee071c87a79947cbb63bcc816a7ab1314419b5e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38900
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL updates the sampled texture to use the shorter name variant.
Change-Id: Ifb945638ce5ea7db4a23640bd9e79b010d15a1fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38827
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Same underlying failure as SwiftShader.
Bug: dawn:580 dawn:147
Change-Id: I57c88ce6afaf7014f3cd4487b04ddab93b248d15
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38783
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
We shouldn't be using glFramebufferTextureLayer on 2D textures.
Also, the "attachment" was wrong (GL_COLOR vs GL_COLOR_ATTACHMENT0).
BUG: dawn:447
Change-Id: I1e47dfc4e8e88d70d9a1e6585b5d138b82ed3cfe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38782
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Use default SamplerDescriptor if not descriptor is passed in.
Change some createSampler calls to pass nothing in for testing.
The default values for SamplerDescriptor and that from
utils::GetDefaultSamplerDescriptor are different so we may still want to
keep it.
Bug: dawn:599
Change-Id: Ie75d9e1fde608cb19049b50f4613be63802c8719
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38621
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
Also cache the boolean for IsValidationEnabled in the
ProgrammablePassEncoder.
Bug: dawn:635
Change-Id: I5f095d003d28b84eacbc488a7f8f3c346c646187
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38521
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The global resource usage was used for two things:
- Validating that the texture had the required usage, but this was
removed in a previous commit in favor of checking the texture's usage at
the encoding entrypoint.
- Skipping laz-clearing of the texture if it was used as
RenderAttachment. This was incorrect and would skip clearing of all of
the texture's subresource as long as one of them was used as
RenderAttachment.
This commit make PassTextureUsage exactly a
SubresourceStorage<TextureUsage> and fixes the logic for skipping
the clearing or RenderAttachment. It also adds a regression test for the
lazy clearing fix.
Bug: dawn:635
Change-Id: I5d984febb3e5a5f9ae15b632cac68e294555c4e6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38382
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
The CL doing the renaming didn't handle comments and the one string
where "output attachment" appeared.
Bug: None
Change-Id: Ie57159da8278970097271fa5706573444bcdaf61
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38383
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
The VertexState tests were failing on MSVC debug x64 because the
ComboVertexStateDescriptor was copied but internal pointer to
itself weren't updated. This commit makes the structure non-movable and
non-copyable so the problem doesn't happen in the future and fixes
compilation errors.
Bug: dawn:602
Change-Id: Idd3a68933920eb47939217362e9e137dd7581014
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38400
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
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>
Validation of resource destroy state does not happen on bind group
creation. It happens on queue submit. This means the Vulkan and D3D12
backends need to gracefully handle BindGroup creation with destroyed
resources by skipping the descriptor creation if the resource has
been destroyed.
Bug: dawn:319
Change-Id: I270afba86d1a961e1e4c39f2419d8c34ff889e46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38440
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
In a future CL the PassResourceUsage structure will become a
SyncScopeResourceUsage and will be used to validate at each
synchronization scope. For separation of concerns, the validation that
resource have the correct usage shouldn't be done at the sync scope
level but at each entrypoint that uses the resource.
The validation tests had missing coverage of usage validation for
BeginRenderPass so validation tests are added. (Storage and Sampled
are validated at bindgroup creation and already had validation tests)
Bug: dawn:635
Change-Id: I36488c2d0222c4799476adf06c1c734989b1a158
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38381
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This issue has been fixed in the Mesa version that's on the bots.
TBR=enga@chromium.org
Bug: chromium:980737
Change-Id: I5e6ec58344fb065c12ba0ca6a3cad1468dd7df11
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38520
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
In a future CL the PassResourceUsage structure will become a
SyncScopeResourceUsage and will be used to validate at each
synchronization scope. For separation of concerns, the validation that
resource have the correct usage shouldn't be done at the sync scope
level but at each entrypoint that uses the resource.
The validation tests had no coverage of usage validation for pass usage
so validation tests are added for Indirct/Index/Vertex usages. (Uniform
and Storage are validated at bindgroup creation and already had
validation tests)
Bug: dawn:635
Change-Id: I5058ad30eb041809f0f60d9403f3cc2d5d7e7c96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38380
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This patch allows the use of DepthOnly as the parameter 'aspect' in the
command CopyTextureToTexture() on the depth-only formats (Depth24Plus
and Depth32Float) to match the latest WebGPU SPEC.
BUG=dawn:439
TEST=dawn_unittests
Change-Id: I73c4055bb0a90bed2b5751ce9dff5b319787efca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38340
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Dawn Wire has a way to reserve an ID and generation on the client side,
but if these reservations are never injected on the server, then
it will be impossible to reclaim the in-use ObjectIDs.
Bug: dawn:565
Change-Id: I751fce237c881e8cbdeaba18ad0ec1e124bd7ac2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38281
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Device child objects were storing an *unstable* pointer to device
specific tracking information. Fix this by moving the tracking
information to a stable heap allocation.
Bug: dawn:565
Change-Id: I00ad72563ac66e29314603e77698718953fcbf15
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38280
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This Cl updates the `vertex_idx` to the new `vertex_index` decoration
name.
Change-Id: Ic3688e1af87ed0d570b00ccb72d0e84ac920831b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38142
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This found a couple issues with readonly storage textures and buffers
and will prevent regression in the correctness of barriers in the Vulkan
backend.
Bug: dawn:635
Change-Id: I99f77134eff62c466d010c4f301f7e79de0b4977
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38021
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
GetColorTextureComponent[GLSL,WGSL]TypePrefix() are no longer used.
And also move the two remaining WGSL functions together, and rename for consistency's sake.
Change-Id: If70f195b7185fca9337ec5c12c74efa25ae6ce4c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37901
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This commit generalizes the way layers are handled to be more like
extensions, and adds support for gathering and enabling layer
extensions.
This is in preparation for using the VK_EXT_validation_features
extension to enable barrier validation.
Also adds logic to use the Fuchsia swapchain layer when it is available.
It seems to have been removed by mistake some time ago.
Bug: dawn:635
Change-Id: I8e5776d546ddd7940238465c7b0f187d8dd3c5bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38104
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Vulkan requires that storage images be in the GENERAL layout, and requires
that we choose a layout at VkDescriptorSet creation. This means that
since Sampled+ROStorage texture may sometimes be used as both usages in
the same pass, they must always be in the GENERAL layout even for
SampledTexture bindings.
Fix this by looking at the texture's creation usage in VulkanImageLayout
for wgpu::TextureUsage::Sampled.
Also add a regression test that triggers a Vulkan Validation Layer error
without this fix.
Bug: dawn:635
Change-Id: I4a5b94e1af20839b3b8cc080d36fca59d79f09bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38107
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
ityp::bitset allows the creation of a bitset indexed by enums. Use this
instead of our custom wrapper around bitset that only supports .Set and
.Has.
Bug: dawn:635
Change-Id: I6680feb9b1741648d974cf1cef48cb1863aa20af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38103
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Using this container is a small performance regression in the simple
cases where all subresources are the same, or when the texture has few
subrsources. However it give better performance in the hard subresource
tracking cases of textures with many subresources.
Using SubresourceStorage also makes it easier to work with compressed
storage since the compression is mostly transparent. It reduces code
duplication and prevent bugs from appearing when a developer would
forget to handle compression.
This fixes a state tracking issue in ValidatePassResourceUsage where the
function didn't correctly handle the case where the PassResourceUsage
was compressed.
Also removes the unused vulkan::Texture::TransitionFullUsage.
Also makes SubresourceStorage<T> only require operator== on T and not
operator !=.
Also fixes the texture format's aspect being used to create pipeline
barriers instead of the range's aspects.
Bug: dawn:441
Change-Id: I234b8191f39a09b541c1c63a60cccd6cee970550
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37706
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This will catch errors when someone updates an enum used with
EnumMaskIterator without updating EnumBitmaskSize. Previously it would
just ignore the extra bits, which produced super confusing bugs.
Bug: dawn:635
Change-Id: Ib0bf3f252db317a1bfdeb687b2426801a79b524d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38260
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
When trying to use ityp_array with an enum class whose underlying
type is int, warnings were fired because of a comparison between signed
and unsigned integers. Fix this by explicitly casting Size to `I` using
a constructor cast.
Bug: dawn:635
Change-Id: I5ee0101684e5847ec5ec6f71a9657fcce839a2a5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38106
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
One of the helper methods to compute texture barriers didn't handle the
kReadOnlyStorage usage, which made barriers issued too small.
Issue was caught by running
StorageTextureZeroInitTests.ReadonlyStorageTextureClearsToZeroInRenderPass
with the Vulkan barrier validation enabled.
Also renames kReadonlyStorageTexture to kReadOnlyStorageTexture for
consistency.
Bug: dawn:635
Change-Id: I6e6027c380672dcdaea789c811665536b446003e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38101
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Some of the helper methods to compute buffer barriers didn't handle the
kReadOnlyStorage usage, which made barriers issued too small.
Issue was caught by running the GpuMemorySynchronizationTests with the
Vulkan barrier validation enabled.
Bug: dawn:635
Change-Id: Ice76edd21b2fa1c25cf9922418f65cfa7d802bdb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38100
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
The previous VK_EXT_debug_report and VK_EXT_debug_marker extensions were
both deprecated in favor of VK_EXT_debug_utils. This commit makes Dawn
follow the ecosystem and also adds more detailed reporting of why
vkCreateInstance fails that's now supported in VK_EXT_debug_utils.
Bug: dawn:635
Change-Id: I61c89da1fd55f26d7ccf91723feedfb354efbc16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38020
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This implementation uses glBlitFramebuffer().
Bug: dawn:638
Change-Id: I4ff62967c815a7e4b04348930539b27bddf44580
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38145
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This patch adds the basic implementation of WaitableEvent and
WorkerTaskPool for multi-threaded tasks in Dawn (for example, the
multi-threaded implementation of CreateReady*Pipeline()).
BUG=dawn:529
TEST=dawn_unittests
Change-Id: Ibf84348f4c0f0d26badc19ae94cd536cef89d084
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36360
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Added root constants to emulate the behavior of other APIs under D3D12.
This patch only fixed Draw and DrawIndexed.
Bug: dawn:548
Change-Id: Ic759c22e0db1092f890d45c5db489697b1583827
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37620
Commit-Queue: Enrico Galli <enrico.galli@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>