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>