Commit Graph

2690 Commits

Author SHA1 Message Date
Ben Clayton 7fe018c065 ShaderModule: Use transform::Renamer
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>
2021-03-09 13:58:07 +00:00
Ben Clayton 95034f6528 Enable the BoundArrayAccessors tint transform
Change-Id: I44cbfbeb09dadcf22ae77a85cef0aff3bc79b16b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42860
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-03-05 01:51:28 +00:00
Corentin Wallez 80915849ce Rename Buffer/TextureCopyView to ImageCopyBuffer/Texture.
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>
2021-03-04 18:13:45 +00:00
Austin Eng 6e62183aa5 Statically link the dawn_end2end_tests
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>
2021-03-04 16:49:35 +00:00
Ben Clayton 3b1a0c6e14 ShaderModule: Use tint::diag::List::str()
Cuts down on the noise

Change-Id: I3904b170a61e5884b4fb1479b885f188b5ea4a24
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43883
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-04 14:18:37 +00:00
Rafael Cintron c36a9e8579 Protect Texture::DestroyImpl against multiple calls for D3D12
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>
2021-03-03 18:42:34 +00:00
Austin Eng 9b5f442c78 Add XlibXcbFunctions to the CMake build
Bug: none
Change-Id: I6987e99822d5a417c1ceac2f0a1f939d1c85cfb8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43720
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-03 08:21:47 +00:00
Stephen White 9b9e7b293e Skip SNORM formats on unsupported platforms.
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>
2021-03-02 17:54:19 +00:00
Ryan Harrison b9eec93172 Add missed level value to textureLoad
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>
2021-03-02 17:53:39 +00:00
Yan, Shaobo fbda46da44 Refactor CopyTextureForBrowserTests to use compute shader
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>
2021-03-02 03:00:27 +00:00
Jiawei Shao 642ec1c30e D3D12: Clear texture with RecordCopyBufferToTextureFromTextureCopySplit
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>
2021-03-02 02:02:21 +00:00
Bryan Bernhart ec3f482422 D3D12: Fix ASSERT for external image tests
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>
2021-03-02 00:56:51 +00:00
Ryan Harrison 8ed0630d35 Add level value to textureLoad
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>
2021-03-01 20:29:20 +00:00
Stephan Hartmann 6e5edc9a69 IWYU: add missing type_traits for std::is_unsigned
Bug: None
Change-Id: Ib39829c39e800534510afb2fb0651d77ba29a2a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43440
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
2021-03-01 20:24:11 +00:00
Jiawei Shao 60d6d0acd6 Add regression test for the Intel D3D12 driver bug about T2T copy
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>
2021-03-01 01:23:30 +00:00
Bryan Bernhart 9c3aefa4bd D3D12: Enable external texture reuse
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>
2021-02-26 22:44:48 +00:00
Ben Clayton 4d9f2ca07d tint: Move to new transform API
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>
2021-02-26 20:25:38 +00:00
Xinghua Cao 6cbef93c73 Vulkan: fix validation failure when using fp16 feature
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>
2021-02-26 03:03:36 +00:00
Brandon Jones e3f10e3d8e Updated VertexFormat enums
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>
2021-02-26 02:20:25 +00:00
Austin Eng 87649ff09d Reject createPipelineAsync callback if unsafe APIs are disabled
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>
2021-02-25 22:06:55 +00:00
Jiawei Shao 7564ae1def D3D12: Add test for the crash issue about T2T copy with Depth32Float
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>
2021-02-25 22:03:55 +00:00
Corentin Wallez 4165c1cd9c Deprecate fences.
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>
2021-02-25 21:47:15 +00:00
Austin Eng 7124cc4e5d Log a warning if unrecognized args are passed to the test binary
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>
2021-02-25 20:38:45 +00:00
Austin Eng bd3f58612f dawn_wire: Move BufferConsumer to it's own file. Unify WIRE_TRY
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>
2021-02-25 20:21:25 +00:00
Austin Eng 12827fb805 Skip QueryInternalShaderTests.TimestampComputeShader with Tint
Partial revert of https://dawn-review.googlesource.com/c/dawn/+/42560

Change-Id: Iec7ad3bcb56d38726e9464784dec9c3ba57b87ab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42740
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-02-25 19:34:15 +00:00
Austin Eng 36dcb1a51a Un-skip use_tint_generator tests using runtime arrays
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>
2021-02-25 16:17:31 +00:00
Austin Eng 584ba432e9 Update ComputeCopyStorageBufferTests to use WGSL
Bug: dawn:572
Change-Id: If5cce116540bd4298824e3801ee48b2197269cd4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32505
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-02-25 16:14:01 +00:00
Ben Clayton 84fae3d9da Enable BindGroupTests.ReusedUBO for tint generation
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>
2021-02-25 14:09:51 +00:00
Ben Clayton 3b201d122f ShaderModule: Fix transform error message
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>
2021-02-25 13:56:31 +00:00
Corentin Wallez c093db250e Implement Queue::OnSubmittedWorkDone
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>
2021-02-25 13:17:01 +00:00
Brandon Jones 0a295c027d Reset Internal D3D12 Device After Test Shutdown
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>
2021-02-24 22:09:30 +00:00
dan sinclair 4e6b52a21b Revert "Use upstream SPIRV-Cross GN files."
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>
2021-02-24 18:34:21 +00:00
Ben Clayton bbc235425b Use tint::transform::Spirv
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>
2021-02-24 12:50:00 +00:00
shrekshao 232f4d183c No-ops for out of bounds drawIndexed
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>
2021-02-23 16:37:29 +00:00
Jiawei Shao 76a94b17be Remove some useless #include files and forward declarations
BUG=chromium:1161355

Change-Id: Ie4d0e5da22f4b7a66591265d101f2fbe75a2e00a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42180
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-02-23 01:51:06 +00:00
Corentin Wallez 423e3f6896 Mark Create*PipelineAsync as unsafe because it is WIP
Bug: dawn:529
Change-Id: I31c8571d327d1d2b198357eb365706bc8097b12a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41721
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-02-22 19:43:56 +00:00
Corentin Wallez 2d3c2e3553 Rename CreateReady*Pipeline to Create*PipelineAsync
This follows the name change in the upstream WebGPU specification.

Bug: dawn:529
Change-Id: I6d940dcc89f6b75136c642b578cb01bb8e40d681
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41720
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-02-22 18:27:36 +00:00
Stephen White 7e79207ae9 OpenGL ES: implement compressed texture support.
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>
2021-02-19 18:38:32 +00:00
Austin Eng eea1209b12 Fix Vulkan leak if vkMapMemory fails
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>
2021-02-19 18:31:02 +00:00
Austin Eng ef9e4412f5 Simplify ErrorScopes
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>
2021-02-19 18:17:22 +00:00
Corentin Wallez 9fdbb74072 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>
2021-02-19 10:06:42 +00:00
Austin Eng 76d0e38bd7 Fix the Windows build
Bug: none
Tbr: cwallez@chromium.org
Change-Id: I56e1e5da072e960102db891fe3f11a86f1ffe972
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42005
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-02-19 05:43:57 +00:00
Yunchao He e9e9ee64f6 Add a validation test for compressed texture with mipmaps
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>
2021-02-19 05:15:47 +00:00
Austin Eng f104fea367 Remove size_t from wire transfer structs
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>
2021-02-18 22:36:19 +00:00
Adrian McCarthy f0f6d2f8e1 Remove obsolete `-Wreturn-std-move-in-c++11`
Clang has retired this diagnostic.

Bug: 1179351
Change-Id: Ie0d5f7b2da88b82deb98e09921c5659ab9366961
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42002
Reviewed-by: Nico Weber <thakis@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-02-18 22:34:59 +00:00
Corentin Wallez 8c82acd778 Add a Toggle that can be disallowed for timestamp tick->ns conversion.
Bug: dawn:686
Change-Id: If017922ece2d98e95dedc922994807b85ca07397
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41940
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-02-18 18:06:28 +00:00
Austin Eng da70024b08 Fix implicitly deleted default copy assignment operator
Dawn roll broke the Chromium build. See
https://ci.chromium.org/ui/p/chromium/builders/ci/win32-archive-rel/20453/overview

Bug: dawn:680
Change-Id: Id2ebd6a00a80d95f8de163ee71428dda0a327450
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42001
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
2021-02-18 18:06:09 +00:00
Corentin Wallez 16ca1588d1 Move QueueWriteBufferValidationTests to their own file.
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>
2021-02-18 15:56:48 +00:00
Austin Eng 1b31dc0bb2 Add a BufferConsumer primitive for wire [de]serialization
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>
2021-02-17 22:14:56 +00:00
Stephen White eb71aaf689 Implement a --backend= flag for DawnTest.
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>
2021-02-17 17:07:08 +00:00
Austin Eng 0b17eb8e19 Update more Dawn tests to use WGSL
Bug: dawn:572
Change-Id: I0f567da883005d909d498a7a88e9b73137201919
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41820
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-02-17 15:49:07 +00:00
Stephen White a5ba2827f5 GL: Implement WriteTexture for compressed textures.
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>
2021-02-16 22:07:22 +00:00
Bryan Bernhart 536c7aea7d Generalize multi-aspect formats
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>
2021-02-16 19:55:09 +00:00
Ryan Harrison 6dd34f7e34 Remove GLSL SPIRV-Cross fuzzer
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>
2021-02-16 19:19:58 +00:00
Stephen White e9f42997b2 Enable more tests on OpenGL and OpenGL ES backends.
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>
2021-02-11 13:09:14 +00:00
Corentin Wallez aa0e1be0e8 Reland "Vulkan: Fallback to XCB for Xlib surfaces"
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>
2021-02-11 08:26:38 +00:00
James Price 7e80cce1a9 Remove explicit storage class from samplers/textures
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>
2021-02-10 20:17:14 +00:00
Corentin Wallez fb3991e7d2 Lower the maxVertexBuffer limit to 8.
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>
2021-02-10 19:47:13 +00:00
Stephen White 725e03b0c9 Fix bug ID in a couple comments.
Bug: dawn:672 dawn:673
Change-Id: Iabbbc47c93d2ab7ab2ffd8cdf6dd65a3dfdfd9db
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41400
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Stephen White <senorblanco@chromium.org>
2021-02-10 15:14:05 +00:00
Hao Li e0a588752c Fix timestamp writing and resolving from different encoders
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>
2021-02-10 14:01:36 +00:00
Stephen White 02fd17c754 Implement a toggle to disable sample variables.
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>
2021-02-10 02:28:17 +00:00
Stephen White 39b478df0c Skip testing of stencil textures where non-readable.
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>
2021-02-10 02:10:08 +00:00
Kai Ninomiya b6b0090b50 Revert "Vulkan: Fallback to XCB for Xlib surfaces"
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>
2021-02-09 23:21:26 +00:00
Austin Eng 4f93a8d47e Dawn wire fuzzer: Fix nullptr dereference
Bug: chromium:1175535, chromium:1175448
Change-Id: I0a13412b43c8d285cf76c774befc98613aedd748
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41243
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-02-09 20:29:23 +00:00
dan sinclair 52e2b90919 Remove the use_tint_inspector toggle.
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>
2021-02-09 20:26:24 +00:00
Corentin Wallez fb0bf70459 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>
2021-02-09 20:24:42 +00:00
Stephen White b0ca30280a Skip testing of SNORM formats where non-readable.
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>
2021-02-09 20:24:04 +00:00
Corentin Wallez 42f28d6914 Fix compilation using CMake on Linux
Bug: None
Change-Id: Ib5049d976eb16c0231516c48c52cde4b0968fd6e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41181
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-02-09 16:13:51 +00:00
Corentin Wallez ab8e7e5006 Vulkan: VK_EXT_subgroup_size_control should be chained on the stage
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>
2021-02-09 11:08:48 +00:00
Stephen White e7e42ebbed Only default ANGLE to swiftshader if envvar empty.
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>
2021-02-08 21:30:44 +00:00
Bryan Bernhart 2831f05840 D3D12: Log warning if missing SDK layers
Log warning (vs ASSERT) if SDK layers are not installed.

Bug: dawn:460
Change-Id: Idd5266b3d0781b09bda903fa0bc843f6600b2447
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40580
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2021-02-06 03:23:05 +00:00
Austin Eng 7fe5aa2eac Remove deprecated Wire APIs
Bug: dawn:565
Change-Id: I577532347c79e64b418a93551027e89910c3ce68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40480
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-02-05 23:36:30 +00:00
Austin Eng 05d9e2cde2 Nuke the ClientMatches hack for same-device validation
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>
2021-02-05 21:08:44 +00:00
Corentin Wallez fb2e77106a Remove utils::GetDefaultSamplerDescriptor
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>
2021-02-05 20:26:54 +00:00
Bryan Bernhart 14a2398e71 D3D12: Support per plane views with NV12 textures
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>
2021-02-05 20:11:24 +00:00
Brandon Jones 2b9707d336 Re-enable Intel D3D12 Validation Tests
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>
2021-02-05 00:14:42 +00:00
Stephen White 4846281d36 Don't call glUniform for Storage Texture on OpenGL ES.
Change-Id: I8595fb2c89e45819995748e502b800fb88605f44
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40341
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-02-04 22:17:52 +00:00
Austin Eng a75b230acf Reject callbacks if the device is destroyed before completion
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>
2021-02-04 20:38:02 +00:00
Brandon Jones bdbf98afca Add Backend Validation Levels Option to Dawn Tests
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>
2021-02-04 19:32:12 +00:00
Austin Eng ef369b9ffc Fix GetMappedRange unittests on the wire
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>
2021-02-04 16:10:52 +00:00
Corentin Wallez 6d315daa5d Device: Deprecated GetDefaultQueue in favor of ::GetQueue()
Bug: dawn:22

Change-Id: I103ea933ca5b93f20d8bf11c6671bd9f603d8ff3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40061
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-02-04 15:33:42 +00:00
Hao Li d5a0728b67 Add end2end tests for noop direct and indirect dispatches
- 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>
2021-02-04 03:57:31 +00:00
Hao Li 5ab1ed7e1e Skip noop dispatch in front-end
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>
2021-02-04 03:10:03 +00:00
Austin Eng 623d80899b Add a Reserved state for dawn_wire ObjectId allocations
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>
2021-02-03 23:29:43 +00:00
Ryan Harrison 59024a62f6 Re-enable Mac ShaderTests
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>
2021-02-03 20:26:13 +00:00
Ryan Harrison 88f0ba4e26 Update ComputeLog2 to be more valid
Per https://bugs.chromium.org/p/dawn/issues/detail?id=663#c6 and
https://bugs.chromium.org/p/dawn/issues/detail?id=663#c7

BUG=dawn:663

Change-Id: Id2c0dbd4b029be30691f450af0454b442856c2ed
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40242
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2021-02-03 19:42:07 +00:00
Austin Eng c00bc90b7c Always output the wire trace with the injected error format
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>
2021-02-03 19:25:02 +00:00
Stephen White 040f140e5f 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.

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>
2021-02-03 17:36:29 +00:00
Ryan Harrison 474680c5c6 Add ComputeLog2 test
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>
2021-02-03 16:57:19 +00:00
Yunchao He 1b9bcfc47d Implement 3D textures and views creation on Vulkan/Metal/GL
Bug: dawn:547
Change-Id: I1f800f69d8ecfef5a7cfe9c19c320ea78296c58d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40120
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-02-03 16:36:59 +00:00
Stephen White f2a003d4e9 Revert "Fix SwANGLE DeviceType and OpenGL ES DeviceType checking."
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>
2021-02-03 15:06:30 +00:00
Stephen White 9bb02dbbc6 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>
2021-02-03 13:02:09 +00:00
Ryan Harrison fd5fd05db0 Enable EntryPointTests
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>
2021-02-02 22:01:40 +00:00
Yunchao He 04242a063e Implement 3D textures and views creation on D3D12 backend
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>
2021-02-02 18:45:50 +00:00
Ben Clayton 401aad5878 Simplify tint API usage
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>
2021-02-02 15:38:39 +00:00
Corentin Wallez 199ba447c5 Revert "Suppress RenderPipelineValidationTest.VertexAttribCorrectEntryPoint"
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>
2021-02-02 11:06:11 +00:00
Hao Li d11f4c3d05 Query API: Non-precise occlusion query on Metal
- 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>
2021-02-02 05:30:50 +00:00
Austin Eng 9a2174a37c Pass the buffer size into DeserializeWGPUDeviceProperties
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>
2021-02-02 04:20:09 +00:00
Hao Li 387a597154 Query API: Non-precise occlusion query on Vulkan
- Implement BeginOcclusionQuery/EndOcclusionQuery on Vulkan
- Add compute pipeline to convert non-zero values to 1.

Bug: dawn:434
Change-Id: Ie0238078dfd26334caf36d23ded1d7742dd829a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38221
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-02-02 02:38:59 +00:00
Stephen White 71b811b4c9 SkipOpArrayLength.Vertex on all GLES.
This is also failing on Intel (see
https://ci.chromium.org/ui/p/chromium/builders/try/linux-dawn-rel/6628/overview);
generalizing to all GLES.

Bug: dawn:197 dawn:447
Change-Id: I0d26c0fbbccff0da3639df0473f515355775e480
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39922
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-02-01 21:40:28 +00:00
dan sinclair 9023389969 Remove use_tint_inspector flag usage.
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>
2021-02-01 21:07:48 +00:00
Stephen White 91e737b8f1 Moar testing on OpenGL ES backend.
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>
2021-02-01 20:00:28 +00:00
Yunchao He a32954a4d2 Add validation rules for 3D texture view
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>
2021-02-01 19:55:58 +00:00
Stephen White fbaa306056 Skip OpArrayLengthTest.Vertex on ANGLE.
Bug: dawn:197 dawn:447
Change-Id: I75e13530d6568e03df97b032517c3fe56d84f0fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39941
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-02-01 19:17:28 +00:00
Austin Eng 65a903bf75 dawn_wire: Gracefully handle all invalid and unknown sTypes
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>
2021-02-01 16:48:18 +00:00
Corentin Wallez 07987ede36 dawn_native: Turn the DisallowUnsafeAPIs toggle on by default.
Bug: chromium:1138528
Change-Id: Iaad55e6776f3e6abcc0983ad05a1f76b0482e14c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39504
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-02-01 16:22:08 +00:00
Corentin Wallez 1b5526457f 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>
2021-02-01 16:20:58 +00:00
Stephen White d7aacdda11 Set the default ANGLE backend to SwiftShader for dawn tests.
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>
2021-01-29 22:39:45 +00:00
Corentin Wallez fc441f97fc Make wgpu::BindGroupLayoutEntry extensible
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>
2021-01-29 19:08:15 +00:00
Stephan Hartmann ec53444839 GCC: fix name clash cause of multiple BindingInfo definitions
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>
2021-01-29 14:42:54 +00:00
Corentin Wallez 0859e6b1d2 Add missing include for MSVC
std::replace used in WireHelper is in <algorithm>

TBR=enga@chromium.org
Bug: dawn:602
Change-Id: Id618a19e72d5b54701c913470d0f584ce0fa2bec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39501
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-01-29 12:50:36 +00:00
Austin Eng 7aba08e69b Skip validation tests failing with the wire
Bug: dawn:654
Change-Id: Ieeb9a34f3a6ff354107fa65ca496204bb0775129
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/39400
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-28 21:20:36 +00:00
Stephen White 1b42ad94ba Revert "Moar testing on OpenGL ES backend."
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>
2021-01-28 21:11:17 +00:00
Yunchao He 54d0d43e58 Add texture creation validation rules for 3D texture
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>
2021-01-28 20:37:01 +00:00
Stephen White 7bfb3ed2c6 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>
2021-01-28 19:19:36 +00:00
Stephen White f1e81a87c8 Remove glPixelStore GL_PACK_IMAGE_HEIGHT calls.
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>
2021-01-28 19:15:55 +00:00
Ryan Harrison 0228625411 Enable OpArrayLengthTests
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>
2021-01-28 18:05:46 +00:00
Stephen White 44fef9a928 Don't enable GL_FRAMEBUFFER_SRGB on OpenGL ES.
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>
2021-01-28 15:21:15 +00:00
dan sinclair dc25c98727 Combine tint toggles.
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>
2021-01-28 15:02:35 +00:00
Corentin Wallez 05045e0ad8 dawn_native: Do CommandBufferStateTracker validation at encoding time
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>
2021-01-28 14:44:15 +00:00
Kai Ninomiya 57fcd17625 Fix translation of storeOp "clear" on Metal
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>
2021-01-28 07:03:45 +00:00
Stephen White a194a48ba2 Implement depth/stencil texture-to-texture copies for OpenGL ES 3.1.
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>
2021-01-27 23:58:35 +00:00
Austin Eng 78440d66f3 Update the validation tests to use utils::WireHelper
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>
2021-01-27 23:02:24 +00:00
Ryan Harrison e37a4b067a Enable ViewportOrientationTests
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>
2021-01-27 22:56:54 +00:00
Austin Eng e58d5a36e1 Factor utils::WireHelper out of DawnTest
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>
2021-01-27 22:54:04 +00:00
Ryan Harrison d7451857dd Update/enable tests in VertexStateTests
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>
2021-01-27 22:20:04 +00:00
Ryan Harrison b033c9da8e Enable tests in GpuMemorySynchronizationTests.cpp
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>
2021-01-27 22:15:14 +00:00
dan sinclair aae37c2ea3 More WGSL syntax updates
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>
2021-01-27 21:27:54 +00:00
Ryan Harrison e6f58411a9 Enable DepthStencilSamplingTest tests
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>
2021-01-27 21:08:04 +00:00
Ryan Harrison 947adcbaaa Enable CreateReadyPipelineTests that now pass
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>
2021-01-27 20:02:54 +00:00
Ryan Harrison f3744fb4e7 Update BufferZeroInitTests for Tint current status
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>
2021-01-27 19:19:54 +00:00
Corentin Wallez c57be50d9c dawn_native: Make executeBundle of 0 bundles clear state
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>
2021-01-27 18:41:44 +00:00
Ryan Harrison a28c44bf36 Add comment about another KI with BindGroupTests.ReusedUBO
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>
2021-01-27 18:37:54 +00:00
Stephen White eb7108c059 Make the OpenGL and OpenGL ES test windows invisible.
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>
2021-01-27 17:22:44 +00:00
Corentin Wallez 95ff834028 dawn_native: Do attachment state validation at encoding time.
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>
2021-01-27 17:20:16 +00:00
Corentin Wallez 7ffaa219cb dawn_native: Do debug marker validation at encoding time.
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>
2021-01-27 16:03:32 +00:00
Corentin Wallez c1d3a66bd2 Immediately call fence and map callbacks on device loss.
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>
2021-01-27 15:54:12 +00:00
Ryan Harrison 2df77f4325 Removing old WebGPU SPIR-V behaviour test
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>
2021-01-26 21:52:45 +00:00
dan sinclair 0768cca229 Fixup texture type name.
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>
2021-01-26 21:10:35 +00:00
Stephen White 9806dc6de9 Skip StorageTextureTests.WriteonlyStorageTextureIn*Shader on OpenGL ES.
Bug: dawn:647 dawn:580
Change-Id: I0e31482eba31409711c2465943f8a41f33096ada
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38821
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-26 18:03:01 +00:00
Stephen White 8f0e6ce926 Skip SamplerFilterAnisotropicTest.SlantedPlaneMipmap on OpenGL ES.
Bug: dawn:648
Change-Id: I2f9c110bbe0041c881362cb2a40c4cdcf9b7b6af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38822
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-26 15:45:11 +00:00
Stephen White 032500baa3 Skip failing MultipleWriteThenMultipleReadTests.OneBuffer on OpenGL ES.
Bug: dawn:580 dawn:646
Change-Id: Id8238ab041b6bd969945d6581a1fd2808daf2cdc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38820
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-26 15:01:18 +00:00
Stephen White f9582c8aa5 Skip failing TextureFormat tests on SwANGLE.
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>
2021-01-26 13:05:14 +00:00
Stephen White d27ed11d0b Fix glFramebufferTextureLayer warnings generated by ANGLE
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>
2021-01-26 12:57:58 +00:00
Stephen White 0315c43517 Skip failing multisampling tests on SwANGLE.
Bug: dawn:580, dawn:644
Change-Id: I46d0baa308e2362f1c3c439b941138448c9f02a3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38780
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-26 12:53:38 +00:00
Ben Clayton e0feccacaf Migrate from tint::ast::Module to tint::Program
Depends on: https://dawn-review.googlesource.com/c/tint/+/38556

Bug: tint:390
Change-Id: I12104d80370ddc1a3277770ca051cbd0992b758e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38522
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-01-26 12:24:48 +00:00
shrekshao b3177d418e Make SamplerDescriptor optional in CreateSampler
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>
2021-01-26 02:22:58 +00:00
Stephen White 2a799fe3bf Enable all the tests which were blocked on WriteTexture.
Bug: dawn:483 dawn:643
Change-Id: Id6b6f0d1ff039eda3156bc371e6c722b3c72ac96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38580
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-25 19:42:18 +00:00
Stephen White 988f3daf6e Implement WriteTexture for OpenGL and OpenGL ES.
Bug: dawn:483, dawn:580
Change-Id: I83434211f25372f96b0babe6fbb851d7f114065c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37981
Commit-Queue: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-25 18:16:48 +00:00
Austin Eng 4d66fb2d61 dawn_wire: Implement device-related callbacks for multiple devices
Bug: dawn:565
Change-Id: Ic80a3bc1bbfd479af04e77afa0eb3f4ca3387ecd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38282
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-01-25 08:38:47 +00:00
Corentin Wallez f1f8394de0 dawn_native: Skip more validation if it is disabled.
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>
2021-01-23 00:07:46 +00:00
Corentin Wallez 045bb95973 Do not track global texture usage in PassResourceUsage.
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>
2021-01-22 19:53:46 +00:00
Corentin Wallez 49a1f72a4f Rename leftover references of output attachment to render attachment.
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>
2021-01-22 19:51:37 +00:00
Corentin Wallez 2c32fa6476 Make ComboVertexStateDescriptor non-copyable non-movable.
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>
2021-01-22 17:51:45 +00:00
Austin Eng db1572102b d3d12/vulkan: Skip descriptor update/creation if resource is destroyed
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>
2021-01-22 17:10:36 +00:00
Corentin Wallez 72cd1a5e89 dawn_native: Move beginRenderPass texture usage validation into the encoder
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>
2021-01-22 11:31:08 +00:00
Corentin Wallez 7479128589 Remove QueueWriteBufferTests.ManyWriteBuffer on Intel Vulkan
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>
2021-01-22 10:13:07 +00:00
Corentin Wallez 310d86f4a0 dawn_native: Move pass validation of buffer usages into the encoder.
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>
2021-01-22 09:57:38 +00:00
Jiawei Shao db383498c5 Allow using DepthOnly aspect on the depth-only formats in T2T copies
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>
2021-01-22 01:36:43 +00:00
Austin Eng 45ce1fda88 dawn_wire: Add an API to reclaim reserved devices and textures
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>
2021-01-22 00:25:05 +00:00
Austin Eng cef68bc8b7 dawn_wire: Fix a bug with multiple injected devices
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>
2021-01-21 23:15:43 +00:00
Ryan Harrison 001b499275 Adding stage input/output reflection to inspector path
BUG=dawn:578

Change-Id: I15d0c9df81c606ea0def1a2d3fc550224f7dcfd8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2021-01-21 16:17:31 +00:00
dan sinclair c2032ea637 Update vertex index decoration names.
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>
2021-01-21 15:41:20 +00:00
Corentin Wallez 534517ca63 Vulkan: Enable barrier validation using VK_EXT_validation_features.
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>
2021-01-21 14:44:20 +00:00
Ben Clayton 7b615af00c TextureFormatUtils: Remove unused functions
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>
2021-01-21 14:18:19 +00:00
Ben Clayton 88f7f580bc Convert StorageTextureValidationTests to WGSL
Bug: tint:140
Bug: tint:368
Change-Id: I6593e40db5db4058bf6fdf3303ec7e99c0a3df12
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37900
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-21 14:16:09 +00:00
Corentin Wallez 2231fcda56 Vulkan: Add support for layer extensions.
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>
2021-01-21 13:47:19 +00:00
Corentin Wallez e10e6b0db8 Vulkan: Fix layout of Sampled+ROStorage texture.
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>
2021-01-21 12:44:09 +00:00
Corentin Wallez f091fb71f7 Vulkan: Use ityp::bitset for Instance/DeviceExtSet
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>
2021-01-21 12:12:59 +00:00
Corentin Wallez ef869c2d01 Use SubresourceStorage to track per-subresource state.
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>
2021-01-21 11:07:44 +00:00
Corentin Wallez 738aa17493 EnumMaskIterator: ASSERT when the mask is too big.
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>
2021-01-21 10:11:54 +00:00
Corentin Wallez 762814bd92 ityp_array: Allow using a T whose underlying type is signed.
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>
2021-01-20 20:01:08 +00:00
Corentin Wallez 25dc10cee7 Vulkan: Fix texture barriers for readonly storage.
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>
2021-01-20 19:39:28 +00:00
Corentin Wallez 40422659d4 Vulkan: Fix buffer barriers for readonly storage.
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>
2021-01-20 19:29:38 +00:00
Corentin Wallez f83df90fae Vulkan: use VK_EXT_debug_utils instead of deprecated extensions.
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>
2021-01-20 19:19:08 +00:00
Stephen White 55af59b47f Implement a glCopyImageSubData() workaround for OpenGL ES 3.1
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>
2021-01-20 17:27:27 +00:00
Jiawei Shao 064f33e441 Implement WaitableEvent and WorkerTaskPool for multi-threaded tasks
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>
2021-01-20 08:56:07 +00:00
Enrico Galli 311a17a8fe D3D12: Add firstVertex/Instance to vertex/instance_index
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>
2021-01-19 20:29:22 +00:00
Austin Eng 8bcde8e394 dawn_wire: Add Reserve/InjectDevice
Now that the wire does enough tracking to prevent a malicious client
from freeing a device before its child objects, and the device is no
longer a "special" object with regard to reference/release, it is
safe to support multiple devices on the wire. The simplest way to
use this in WebGPU (to fix createReadyRenderPipeline validation)
is to add a reserve/inject device API similar to the one we use for
swapchain textures.

Bug: dawn:565
Change-Id: Ie956aff528c5610c9ecc5c189dab2d22185cb572
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-19 19:27:52 +00:00
Stephen White c053b905b5 Open GL ES: implement a fallback path for glClearTexSubImage().
Also enable the CopyTests on OpenGL ES, since they now pass on 3.2.
Enable all tests that are no longer failing due to crbug.com/dawn/581
and update bug references for bugs which are still failing.

Bug: dawn:581, dawn:636
Change-Id: I6b74143f11dd4e1824551720024be174f2eaa003
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38140
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-19 18:34:22 +00:00
Ryan Harrison 1dee9164bf Use Tint to extract local workgroup size
BUG=dawn:578

Change-Id: I7526fdcc3ee96099d1487cd159a7bea9210f2b4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38143
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-19 18:09:31 +00:00
dan sinclair 0f9c2d7b78 Update Dawn tests to use group instead of set.
This Cl updates the WGSL used by Dawn to use the new `group` decoration
instead of the deprecated `set` decoration.

Change-Id: I145aaff7721dfafff986ddc429c9cdc9389c2110
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38141
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-01-19 14:18:51 +00:00
Stephen White f09a67061e Suppress depth/stencil copy tests failing on ANGLE.
Also implement a way to check for ANGLE.

Bug: dawn:634, dawn:580
Change-Id: I4b361d02247f91250f1ce31cfbfdd0d74b3b3060
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-01-18 17:47:07 +00:00
Corentin Wallez 5c20f1ec9c Add the SubresourceTrackingPerf perf test.
This is a performance test in preparation of using SubresourceStorage
in dawn_native. On the Vulkan backend with Swiftshader it shows that
SubresourceStorage will bring a small perf regression for simple cases
(<= 10%) but it that complex cases are improved significantly (up to
twice faster).

Also renames a variable to follow the mMemberName convention.

Bug: dawn:441

Change-Id: I3fec80cba39b7d2aaba08fc8fbd8ea913ed5501c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37041
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-01-18 09:28:27 +00:00
Carl Woffenden 1c84a6b160 Missing header for VS1029 (for commit 8c58491d)
This recently broke in VS2019 (weak_ptr and shared_ptr aren't included).

Change-Id: I88edffa3e965c02d0db83e2efd0977cf86c96800
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38023
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-15 18:44:19 +00:00
Ben Clayton 8268dc3e43 StorageTextureTests: Use textureNumLayers()
Instead of hardcoding the number of array layers

Bug: tint:140
Bug: tint:437
Change-Id: Ic9ea6a0e2853d8dbc29a840deff0e6938ff5e4d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37849
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-15 17:36:39 +00:00
Ben Clayton be28fe6d99 StorageTextureTests: Use new access qualifiers
Instead of the old style texture_storage_[r,w]o_* forms.

Bug: tint:140
Bug: tint:368
Change-Id: If33733d1a45f106c052698b37ca6e4deca6b3c26
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37850
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2021-01-15 17:32:59 +00:00
Stephen White 54449966dd Workaround ANGLE hang with a glFlush().
Change-Id: Idce1b71bdb132a1b96836d270eb2ab53fd0086f8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36700
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-15 16:35:49 +00:00
Ben Clayton 331b78a739 Convert StorageTextureTests to WGSL
Bug: tint:140
Fixed: tint:368
Change-Id: I339ff9546d21ea236a14dce9815d08fd13bbbbdb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37080
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-14 17:07:06 +00:00
dan sinclair 1c6082149a Update texture storage syntax.
This CL updates the WGSL texture storage syntax to use the access
decoration.

Bug: tint:286
Change-Id: I0024a0682c6a6479eb7a8436f8df4c9a76ec5e2a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37880
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-14 14:50:16 +00:00
Hao Li 6f833b7f78 Add internal compute pipeline in ResolveQuerySet for Timestamp Query
- Enable internal compute pipeline in ResolveQuerySet for Timestamp
  Query.
- Known issue:
  The user-provided resolve buffer cannot be used as binding resources
  due to missing STORAGE usage. Currently implictly add STORAGE usage
  if the buffer is created with QUERY_RESOLVE usage as a workaround.
  Next we will add STORAGE_INTERNAL usage instead.

Bug: dawn:434
Change-Id: Ie66090de38bc3a04a58986669cd2a128b528f960
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36222
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-01-14 03:26:08 +00:00
Austin Eng 8c58491d25 dawn_wire: Skip device inject error if the client drops the device
If the client drops the last reference to the device, it would
dereference an invalid pointer upon calling InjectError. So, skip the
call. We can't keep the device alive if the Buffer is still alive
because we intend to make all objects internally null if you delete
their device.

It is ok to skip error injection because if the client deletes the
device, it should not expect to receive any more error callbacks.

Bug: dawn:384
Change-Id: I4c694310e4395b06cd49603fc5d4cd846799decb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37580
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-14 00:51:58 +00:00
Ben Clayton 3639186e7e ShaderModule: Include extra information in shader errors
If the SPIR-V fails to validate, include the SPIR-V disassembly in the error.
If the shader fails to compile, include the shader source in the error.

Change-Id: I05f93b5dec7985c42ddf9cd14621af2a855ee640
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37282
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-13 22:27:08 +00:00
Brandon Jones 2f1278e68b Enabled BindGroupLayout deprecation warning and fixed tests it broke.
This should be the last change BindGroupLayout change needed to complete
the conversion to the new structure aside from removing the deprecated
code paths in the future.

Bug: dawn:527
Change-Id: I44f67de80f1b4e1b7b32909d70d74610f7a06d8d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37560
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-01-13 22:25:58 +00:00
Austin Eng 8ba0a01d1e Ensure all wire child objects are destroyed before their device
Destroying a device will implicit destroy all its child objects.
Attempting to use a child object after results in a fatal error.

Bug: dawn:384
Change-Id: I43c27c92cacde759be83cca79ac890f41bac3927
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37002
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2021-01-13 20:58:18 +00:00
Ben Clayton cd9dc36d2e [wgsl]: s/texture_sampled_/texture_
These texture types were renamed in October 2020:
https://github.com/gpuweb/gpuweb/pull/1180

Tint has supported both forms since November 2020:
https://dawn-review.googlesource.com/c/tint/+/31380

Finally migrate to the new form so we can drop support for the old.

Bug: tint:286
Change-Id: Id19b79be28152b3de163f9cce75eefff1ae31d76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37702
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2021-01-13 20:29:08 +00:00
Austin Eng 5ad5557667 Remove special-casing of device reference/release in the wire
The wire's device is externally owned so reference/release were no-ops.
To unify the code paths, remove the special casing and instead
take an extra ref on the device the wire server is created with. This
is functionally equivalent and will allow both the current wire code,
and the incoming change to allow multiple device/adapter creation to
both work.

This CL also makes it possible for the client to destroy the device
before child objects.
A follow-up CL will mitigate this on the server side.

Bug: dawn:384
Change-Id: Ic5427074469012dccf8689ec95a848e6ba2c1fc2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37001
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-13 19:23:48 +00:00
Austin Eng f0d7cc4f5a dawn_wire: Make all objects owned by the client
This removes the logic where the Client owns the Device and the
Device owns all other objects. Ownership should be tracked in
dawn_native either with refcounting or validation to disallow
operations after an object's parent has been destroyed.

This simplifies the wire client code in that the client only
tracks allocated handles and does not manage parent/child lifetimes.
This is an important simplification so we can support multiple WebGPU
instances, adapters, and devices on a single wire.

Bug: dawn:384
Change-Id: I8ecc7c368130b8917202150c467b5f0e7d4b753e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37000
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-13 18:31:47 +00:00
Austin Eng f6ef7530ab Make the Device ref the Instance
This is needed before supporting instances, adapters, and devices on
the wire so that the client cannot free the instance before the device.

In Dawn native, the developer still needs to make sure the device is not
freed before all child objects.

Bug: dawn:384
Change-Id: I863d44c6a8acecc7b8ea0cc0ac483f7a864162fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37003
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-13 17:54:37 +00:00
Austin Eng 8ef94f1684 Don't forward device lost errors to the uncaptured error callback
This issue was discovered in http://crrev.com/c/2613517 where a
device lost error on page teardown was bubbling up to the Renderer's
uncaptured error callback.

Bug: chromium:1160459
Change-Id: I64b8c7779f4808d5a4b87c131aaf2e041c512bb9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36960
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-13 17:53:29 +00:00
Carl Woffenden 558599fc9a Further fixes to build with with VS2019 (end2end tests)
These fix the tests so that the entire of Dawn can now be built with
VS2019. Some details:

Multiples of "error C3493: 'X' cannot be implicitly captured because no
default capture mode has been specified" in BufferTests.cpp. This
appears to be a bug in VS whereby the constexprs need capturing; the
workaround, rather than explicitly name them and change the function
signature, is to make the vars also static.

In DepthStencilSamplingTests.cpp we get "warning C4310: cast truncates
constant value" for uint8_t(256). Rather than try to silence the
warning the test was removed, since the cast will *always* result in
zero, which is also the first in the test values.

To successfully build two further third-party dependencies also require
updating:

https://dawn-review.googlesource.com/c/tint/+/37700
https://chromium-review.googlesource.com/c/angle/angle/+/2624888

Note: whilst this now builds the entire of Dawn with VS not yet all of
the build arguments are supported. Yet to investigate is turning on
optimisations (with is_official_build=true) which attempts to combine
"/INCREMENTAL" with "/OPT:REF" and fails (to be addressed next).

Bug: dawn:602
Change-Id: I37202992f16b999d5627022eeeb6b9fff0d4b60b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37701
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
2021-01-13 12:25:45 +00:00
Corentin Wallez 111ba65a5e D3D12: Use Texture::Create pattern for swapchain textures
Bug: dawn:269
Change-Id: Ia4b48126c153ddff2feefc1bf04dcc9adc783bd1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37421
Auto-Submit: 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>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-01-13 08:53:34 +00:00
Mark Sibly 9f9a9785f2 Reset scissor reset before presenting in opengl
The opengl backend uses glBlitFramebuffer to present frames which
is affected by the opengl scissor rect.

Bug: dawn:616
Change-Id: I0b8c3eb7139ab22a98eeb60e3ad16678e3afad5d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37101
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Mark Sibly <marksibly@gmail.com>
2021-01-13 05:09:24 +00:00
Austin Eng 424fd82889 Update DepthStencilStateTests to use WGSL
Bug: dawn:572
Change-Id: Ia0bc64304cfa91e3c5f0179781eeef0eab21323a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33761
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-13 03:10:54 +00:00
shrekshao 7faa362ea9 Fix SamplerFilterAnisotropicTests mipmap
Fix a bug about mipmap level in SamplerFilterAnisotropicTests.
Sizes of the 3 miplevels should be 4,2,1.
The old code allocates 8,4,2 (which don't have a 1x1 level)
Expected rendered pixel values have to change.
The render result now fits the webgl demo at https://jsfiddle.net/t8k7c95o/5/
(Thanks Kai for the enlarged pixelated canvas)

ComputeBoids.cpp and DawnTest.cpp change is due to git cl format

Bug: dawn:568
Change-Id: I9069732208a16be285be13b8cd1ab19b211995a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37380
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2021-01-12 23:56:54 +00:00
dan sinclair e6ca254c72 Convert WGSL comments to //
This CL updates the tests with WGSL sources to use // for comments
instead of #. This matches the current WGSL spec.

Change-Id: I04e1a18630a16b794955cace7e55a89221c964fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37520
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-12 22:11:14 +00:00
Carl Woffenden 22eff1eb8c Fixes to build with MSVC 2019
When building with MSVC (using 'is_clang=false') various errors are
encountered. This fixes:

- multiple tests/end2end/ColorStateTests.cpp(309): error C2039:
  'transform': is not a member of 'std'

- dawn_wire/server/Server.h(171): error C2248:
  'dawn_wire::server::MapUserdata::MapUserdata': cannot access private
  member declared in class 'dawn_wire::server::MapUserdata'

- variants of the above in Server.h for all the other CallbackUserdata
  subclasses

Bug: dawn:602

Change-Id: I01b1db3fbf67ae170b21a7d890af6162b82a1725
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37420
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-12 19:47:13 +00:00
Corentin Wallez 4b30f93762 Add the correct rpath to use Swiftshader / Vulkan on macOS
Previously the @executable_path rpath was only added when doing
component builds and non-component builds failed to find Vulkan and
Swiftshader on macOS.

Bug: None
Change-Id: I0277566e4bf181703dff26bb1bf3e57858864009
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37442
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
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>
2021-01-12 19:01:04 +00:00
Bryan Bernhart f600666866 D3D12: Add HLSL compiler version to key
BUG=dawn:529

Change-Id: I84d8edc6022564cda084a0f0de384a4e15e0e1a1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35480
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2021-01-12 18:21:33 +00:00
Ben Clayton 64275742e0 ShaderModule: Enable the prettier tint diagnostic formatter
Includes code snippits and squiggles of the offending line(s)

Bug: none
Change-Id: If704b5d1118d0246c16f6e729a10d16363a1169b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37281
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2021-01-12 08:55:57 +00:00
Carl Woffenden ede229f313 Minor fix to build with MSVC: Removes switch with only default case
Fixes warning C4065: switch statement contains 'default' but no 'case' labels

Change-Id: If9a8f20eaeb2499f71bc25a69e545b3e8b21be4d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36081
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
2021-01-12 08:55:27 +00:00
Ben Clayton 4c5ab90452 ShaderModule: Refactor ParseWGSL() to take a File*
The tint::ast::Module holds a diagnostic list (tint::diag::List) which references the source tint::Source::File.
If you try to enable any of the more pretty diagnostic printing functionality, and attempt to print these after ParseWGSL() has returned, you'll then dereference a pointer to the now stack unwound `tint::Source::File`.
Promote the file up one callstack level to fix this.

Bug: none. Only exposed when using pretty printing.
Change-Id: I9432dd9d668fd1d92efa228bb5ed31278fd3ddfc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37280
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2021-01-12 08:50:31 +00:00
Hao Li 9ff83f6c95 Query API: Non-precise occlusion query on D3D12
- Implement begin/endOcclusionQuery on D3D12, the query result is binary
  (0/1), so we don't need compute shader on D3D12.
- Add end2end tests with depth/stencil/scissor tests enable/disable

Bug: dawn:434
Change-Id: I7b58987a9bc3e7f9cbcdee83f630aaa166582f5f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36860
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-01-12 01:44:01 +00:00
Carl Woffenden e650b38aa6 Minor fix to build with MSVC: Gets content address instead of iterator
Fixes error C2679: binary '-': no operator found which takes a right-hand operand of type 'std::_Array_iterator<_Ty,23>' (or there is no acceptable conversion)

Change-Id: I566b05032da5f68674156eae2901a3f3e7a8acbb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36082
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-11 20:02:21 +00:00
Yunchao He 0325e4503b Add more constants for max texture sizes
Currently we only implemented 2D and 2DArray texture. kMaxTextureSize
is actually for 2D texture only. This patch adds a few more constants
for texture size for 1D and 3D textures, and changes kMaxTextureSize
to kMaxTextureDimension2D.

Bug: dawn:558

Change-Id: I9088dd7c060dc096a65abea37c7fb01f760524e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36540
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-01-11 18:04:12 +00:00
Stephen White 77fcdf7eaa Add ANGLE to Dawn build.
Bug: dawn:447, dawn:580
Change-Id: I77726651ca00d64768bddc0bb476fd920e11851f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35081
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-11 15:52:12 +00:00
Stephan Hartmann 1670c5184b IWYU: add missing include for size_t
Bug: None
Change-Id: Idbb024aa136da5327caae796876ee80222d46a39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37140
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-11 08:20:02 +00:00
Hao Li c9a22bcb93 Disable timestamp query extension on Metal
Currently it's not clear how to convert timestamps to nanoseconds on
Metal, disable timestamp query extension on Metal until we know how to
do that. WebGPU issue: https://github.com/gpuweb/gpuweb/issues/1325

Bug: dawn:434
Change-Id: If63bd5fe9dccc1fff16a42cddf63e9d8265e65c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37020
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-08 22:56:05 +00:00
Corentin Wallez a2e02836a2 Suppress EntryPointTests.FragAndVertexSameModule on GL
The test is failing because it seems that SPIRV-Cross is outputing some
of the builtins for the vertex in the fragment shader and vice-versa.

Bug: chromium:1163767
TBR=senorblanco@chromium.org

Change-Id: Iefbc1beb9065a92f1d61776d12c903d4e80648d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-01-08 12:26:05 +00:00
Corentin Wallez 00fcab636a Fix default viewDimension in deprecated BGLEntry path.
The handling of the default view dimension in the deprecated bind group
layout entry path was checking the viewDimension of the new
sub-descriptor instead of the deprecated viewDimension member. This
meant that viewDimension was always defaulted and "2D".

This commit fixes the issue by looking at the correct viewDimension member
and adds a regression deprecation test.

Bug: dawn:620

Change-Id: Icc133b6d80ba3d88bae30dc9138f1d74e14d12c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36841
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-01-07 17:33:44 +00:00
Ben Clayton 3f5c01ae92 Reland "Update PrimitiveTopologyTests to use WGSL"
This reverts commit ad0bec6c96.

Reason for revert: The change was incorrectly blamed for a autoroll failure and reverted unnecessarily.

Original change's description:
> Revert "Update PrimitiveTopologyTests to use WGSL"
>
> This reverts commit b9641b8225.
>
> Reason for revert: Suspect causing Dawn roll to fail
>
> Original change's description:
> > Update PrimitiveTopologyTests to use WGSL
> >
> > A rebased fork of https://dawn-review.googlesource.com/c/dawn/+/33774
> >
> > Bug: dawn:572
> > Change-Id: Icb24ac5b62984e9b093e61077155b9a1eafb344b
> > Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35801
> > Commit-Queue: Ben Clayton <bclayton@google.com>
> > Auto-Submit: Ben Clayton <bclayton@google.com>
> > Reviewed-by: Austin Eng <enga@chromium.org>
> > Reviewed-by: Corentin Wallez <cwallez@chromium.org>
>
> TBR=cwallez@chromium.org,enga@chromium.org,bclayton@google.com
>
> Change-Id: Ib6fe527f28cf17f8f8e817c59121e357b9b65cd1
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: dawn:572
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36520
> Reviewed-by: Austin Eng <enga@chromium.org>
> Commit-Queue: Austin Eng <enga@chromium.org>

TBR=cwallez@chromium.org,enga@chromium.org,bclayton@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug: dawn:572
Change-Id: I2e8859c9b9f12c005bef1309c7bad98f61af2ac7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36842
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-01-07 16:04:24 +00:00
Ryan Harrison fac169113d Remove HLSL & MSL SPIRV-Cross Fuzzers
The plan of record is to use Tint for back end generation on these
platforms for launch, so there is no need to fuzz SPIRV-Cross on them.

The GLSL fuzzer will remain for now, since the PoR has native support
for GLSL using SPRIV-Cross.

Change-Id: I8d6bf76b2b81e9bbc158fa8c5a63b119060abbe5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36701
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2021-01-07 01:36:11 +00:00
Jiawei Shao a84acc4fcc Enable CompressedTextureZeroInitTest on Win/Intel/Vulkan
This patch enables all the tests in CompressedTextureZeroInitTest
on Windows/Intel/Vulkan after the upgrade of Dawn try bots.

BUG=dawn:601
TEST=dawn_end2end_tests

Change-Id: Ida4278ae50ef45b2347462be986e5490a921f988
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36560
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-01-06 02:30:09 +00:00
Austin Eng ad0bec6c96 Revert "Update PrimitiveTopologyTests to use WGSL"
This reverts commit b9641b8225.

Reason for revert: Suspect causing Dawn roll to fail

Original change's description:
> Update PrimitiveTopologyTests to use WGSL
>
> A rebased fork of https://dawn-review.googlesource.com/c/dawn/+/33774
>
> Bug: dawn:572
> Change-Id: Icb24ac5b62984e9b093e61077155b9a1eafb344b
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35801
> Commit-Queue: Ben Clayton <bclayton@google.com>
> Auto-Submit: Ben Clayton <bclayton@google.com>
> Reviewed-by: Austin Eng <enga@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>

TBR=cwallez@chromium.org,enga@chromium.org,bclayton@google.com

Change-Id: Ib6fe527f28cf17f8f8e817c59121e357b9b65cd1
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:572
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36520
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-06 00:07:21 +00:00
Austin Eng b9641b8225 Update PrimitiveTopologyTests to use WGSL
A rebased fork of https://dawn-review.googlesource.com/c/dawn/+/33774

Bug: dawn:572
Change-Id: Icb24ac5b62984e9b093e61077155b9a1eafb344b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35801
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-05 15:24:29 +00:00
Austin Eng 200941c797 dawn_wire: Return early in callbacks after the server is destroyed
After the server is destroyed, the server's can't do anything like
forward callbacks to the client. Track this with a weak_ptr and
return early if it has expired.

It also updates device destruction in dawn_native so the lost
callback is always called, even on graceful destruction. This
is consistent with the rest of WebGPU where all callbacks are
guaranteed to be called in finite time.

Bug: chromium:1147416, chromium:1161943
Change-Id: Ib80dea36517401a2b8eafb01ded255ebbe757aef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35840
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2021-01-05 08:37:08 +00:00
Austin Eng e3fd026108 Use a common helper for std::nothrow
It's come up multiple times that ASAN doesn't support
std::nothrow which leads to OOM bugs filed by the fuzzers.
Use a common helper to avoid this and return nullptr for large
allocations when ASAN is enabled.

Bug: none
Change-Id: I492b4ff4e498cf82d4ca08ba849671d3d16b9cfb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36280
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-05 07:40:48 +00:00
Hao Li c120b02dbe Remove internal resolve buffer from Timestamp compute shader
In timestamp compute shader, we will create an internal buffer for
resolving QuerySet and use it as input buffer in compute shader,
the user-provided resolve buffer is used as output buffer.

This will cause the buffer zero initialization to be called twice,
one is the internal buffer is zero initialized in ResolveQuerySet,
antoher is the user-provided buffer is tracked as pass resource
and need to be initialized. But for ResolveQuerySet(), we expect
there is only once.

We have no special requirements to have an internal buffer. It is
possible to directly use the user-provided buffer for read and
write becuase it will get STORAGE_INTERNAL usage.

Bug: dawn:434
Change-Id: Ia8c8ac6e9ba23fea31468a6d9b4580eece189be2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36201
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-01-05 04:49:08 +00:00
Hao Li cdbd295cc6 Get timestamp period from device
- Get timestamp period on each backend
  D3D12: Get GPU frequency(HZ) from queue and calculate the period in ns
  Vulkan: Get timestampPeriod from device properties
  Metal and others: don't need the period

Bug: dawn:434
Change-Id: Ia5588a3dccadfe92d7384b9fdf1e6848c6e5c6e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36220
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-01-05 02:39:18 +00:00
Jiawei Shao 4110684aa0 Vulkan: Fix a bug in the impl of T2T copy with 2D array textures
This patch fixes a bug in the implementation of the toggle
UseTemporaryBufferInCompressedTextureToTextureCopy on Vulkan backend.
The previous implementation only considered the T2T one-layer copies,
which will cause the validation error by Vulkan validation layer. This
patch fixes this issue by adding the missing support of multi-layer
copies.

This patch also fixes the failures in the WebGPU CTS tests
color_textures,compressed,array,* on the Linux/Vulkan backends with
Vulkan validation layer enabled.

BUG=dawn:42, chromium:1161355
TEST=dawn_end2end_tests

Change-Id: Ic437919a843b8439d267b8d75b27ade3a9e7bcae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36260
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-01-05 00:40:30 +00:00
Corentin Wallez da2d927bb1 Add TypeTraits.h for Dawn's additional type traits.
Adds the first type trait that checks that the equality operator is
defined for two types.

Bug: dawn:441
Change-Id: Ied80c5d876739272c07d513727a3ee709a721eab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35522
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-01-04 15:05:29 +00:00
Carl Woffenden 9f0b827df1 Minor fix to build with MSVC: Removes constructor ambiguity
Fixes error C2440: 'return': cannot convert from 'dawn_native::Aspect' to 'Result<dawn_native::Aspect,dawn_native::ErrorData>'

Change-Id: Ia63ced7fe9582c88a4173db008226733bdd06cac
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36080
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Carl Woffenden <cwoffenden@gmail.com>
2021-01-04 13:28:29 +00:00
shrekshao 86980018b3 Invalidate sampler with maxAnisotropy = 0
Bug: dawn:568
Change-Id: Ic0eee693a91153e2447c8f9830919f74c08fde48
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2020-12-30 19:47:33 +00:00
Austin Eng 9a38e5b60d Make HLSL cache key guard comment ASSERT more specific
SPIRV-Cross still emits some comments, so for now, just check that
the specific guard comments Dawn uses are not contained in the HLSL
output.

Bug: dawn:549
Change-Id: Ia6d32befa5ef983e56494542d46e9c3592b6480a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36300
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-29 22:22:22 +00:00
Jiawei Shao 0eb61724c8 Enable CompressedTextureFormatTests on Win/Intel/Vulkan
This patch enables CompressedTextureFormatTests on Win/Intel/Vulkan
after the upgrade of Windows try bots.

BUG=dawn:42

Change-Id: Ifad6634973ef30af7f416798973325a5fa7cbe67
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35920
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-28 18:31:10 +00:00
Stephan Hartmann c8d5277e86 IWYU: add missing include for ceil
Bug: None
Change-Id: I345750e63c1d81d85c722055e193abe4625a2603
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36083
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2020-12-24 03:20:37 +00:00
shrekshao f8c5e4ab74 Add maxAnisotropy to GPUSamplerDescriptor
Adds some maxAnisotropy implementation.
Adds an end2end test, drawing a slanted plane with a texture of which each mipmap has a different color, with different maxAnisotropy values.
You can get an idea of what it does at https://jsfiddle.net/t64kpu81/85/
Needs further CTS.

Bug: dawn:568
Change-Id: I89ac56d8cf0fbb655358bf6effa016ddc1f8426f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35143
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2020-12-24 03:11:17 +00:00
Hao Li c08276644f Add maximum limitation for query count in CreateQuerySet
- Limit the maximum query count to 8192 to fit Metal restriction.
- Add unittest tests of query count and remove the test of buffer
size overflow validation on 32-bits.

Bug: dawn:434
Change-Id: Ie573b715cc3f67ec158996119a8b4a49e493680a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36021
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-24 02:57:07 +00:00
Austin Eng 700809a7f7 Update BindGroupTests to use WGSL
Bug: dawn:572
Change-Id: I1e7cd05ff184f7d26a75006d10b216aea28abb04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32513
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-23 19:54:30 +00:00
Austin Eng b3ab21e1e2 Update GpuMemorySynchronizationTests to use WGSL
Bug: dawn:572
Change-Id: Ie16558bc104557603df99c9976b744a685592247
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33765
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-23 19:42:00 +00:00
Jiawei Shao a4fb42ac92 Enable two dawn_end2end_tests on Win/Intel/Vulkan after bot upgrades
BUG=dawn:491

Change-Id: I94aef91200ad1a9f96abd19b00a04000b0595e2d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36240
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-23 19:07:30 +00:00
Austin Eng 33bf309c1d Update OpArrayLengthTests to use WGSL
Bug: dawn:572
Change-Id: Iba92adda4758fc91294f7c6d8b0be3065c786f71
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33773
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 20:11:48 +00:00
Austin Eng 04e3078a64 Update DepthStencilSamplingTests to use WGSL
Bug: dawn:572
Change-Id: I8e90175e2201250ca7e67ec955226871bdb70a97
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32514
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 20:03:48 +00:00
Austin Eng 600798bdb1 Update BufferZeroInitTests to use WGSL
Bug: dawn:572
Change-Id: Id194127831e54623df135b415ec2619016c6c6cb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32512
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 19:56:49 +00:00
Austin Eng 84997c5ee9 Update ViewportOrientationTests to use WGSL
Bug: dawn:572
Change-Id: Ifef4f75dcfd0077e3361ea0854cddf3e78e84a02
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33887
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 19:56:48 +00:00
Austin Eng 65ae78ef52 Update ViewportTests to use WGSL
Bug: dawn:572
Change-Id: I08672a402205d4bcac278a1bdcf5d1befa46015c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33771
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 19:50:18 +00:00
Austin Eng 6442400bdd Update CreateReadyPipelineTests to use WGSL
Bug: dawn:572
Change-Id: If9c35023a62a1506fe968b30d822ced86c8a1465
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32507
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 19:49:48 +00:00
Austin Eng 241cd0cd8e Update PrimitiveTopologyTests to use WGSL
Bug: dawn:572
Change-Id: I9275ad78e6222b33372f5640b07801b815670fa6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33774
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-22 19:24:28 +00:00
Ben Clayton 58ce2745cd dawn_native/vulkan: Use EmitVertexPointSize transform
Fixes validation errors when drawing with point topologies, and without explicitly writing to the PointSize builtin.

Fixed: tint:321
Change-Id: I3c00c5ee56966a82d9e3024cb277eae8921a9af2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35800
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-22 18:10:58 +00:00
Jiawei Shao 03d0309255 Vulkan: Fix a typo in SwapChainVk.cpp
BUG=dawn:269

Change-Id: Iacda4d222a81a4ed9e4c623a73e59019cfd6a2c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36180
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-22 17:35:18 +00:00
Hao Li afcef3ee90 Query API: Test the accuracy of timestamp compute shader
Because the uint64 is not supported on all GPU drivers, we use uint32
and float to simulate the multiplication of uint64, but there is
accuracy loss between the results and the expected results computed by
uint64. This test checks that the accuracy loss is less than 0.2%.

Bug: dawn:434
Change-Id: I6f5c842b6915f101441886bdfa4f9feb2827d174
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34120
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-22 06:55:36 +00:00
Jiawei Shao 3272f9da37 GLES: Fix a bug in the impl of CopyBufferToTexture() with compressed formats
In OpenGL ES glPixelStorei() doesn't affect the execution of
glCompressedTexSubImage*D(), and GL_UNPACK_COMPRESSED_BLOCK_* is not
defined in OpenGL ES, so on the OpenGL ES backends, to implement
CopyBufferToTexture() with compressed texture formats, we can only copy
the compressed texture data once per compressed block row.

With this patch CompressedTextureBCFormatTest/* can pass on Intel Mesa
OpenGL ES driver.

BUG=dawn:42, dawn:580
TEST=dawn_end2end_tests

Change-Id: Ied84a187beaf9105d3664c4e874b3b7ddda4e4b0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36020
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2020-12-22 00:38:56 +00:00
Brandon Jones 3af532b8a8 Update BindingInfo to reflect new BindGroupLayoutEntry structure
Changes the internal BindingInfo structure and any references to it. The
BindGroupLayoutEntry information is normalized when converting it into
the internal representation, but still accepted as either the old or
new layout. A "bindingType" member is added to the BindingInfo that's
not present in the BindGroupLayoutEntry itself to indicate which of
buffer, sampler, texture, or storageTexture is populated. This proves
useful for a myriad of switch statements in the various backends.

Bug: dawn:527
Change-Id: I6ae65adae61d0005fc50ed6d1bc2ec9b2a1295ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35862
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Brandon Jones <bajones@chromium.org>
2020-12-21 20:14:26 +00:00
Jiawei Shao ec56b90cea Skip all the dawn_end2end_tests using glTextureView() on GLES
This patch skips all the dawn_end2end_tests using glTextureView() on the
OpenGL ES backend as glTextureView() is not available in OpenGL ES.

With this patch all the dawn_end2end_tests will be able to run on Intel
Mesa OpenGL ES drivers with no crash.

BUG=dawn:580

Change-Id: I420eebfd699edf745bd08cb941f3143aad2fbd06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36040
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-21 18:36:16 +00:00
Austin Eng 64c5d601f8 Update ComputeStorageBufferBarrierTests to use WGSL
Bug: dawn:572
Change-Id: I42e971b843807602ba91f5df0aa692569ec31521
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32511
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 19:44:07 +00:00
Austin Eng d10774c42f Update DynamicBufferOffsetTests to use WGSL
Bug: dawn:572
Change-Id: I73d987e8ab09120014d2d5c802bd08f08c33bdbd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33775
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 19:41:57 +00:00
Austin Eng ee977a0df8 Update MultisampledSamplingTests to use WGSL
Bug: dawn:572
Change-Id: Id488b3e08c57036508f4f0a5120d6bf020b4a782
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33884
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 19:23:27 +00:00
Austin Eng 02436022ae Update DepthStencilCopyTests to use WGSL - FragDepth
Bug: dawn:572
Change-Id: If21d9b7d85394d56f38b079370d9333d342c0b44
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33885
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 19:20:27 +00:00
Austin Eng 8d38c0164c Autogenerate all of the wire callback mocks
This makes it less manual code and less error prone to
add new callbacks to the wire.

Bug: dawn:384
Change-Id: I8547af2dba8289d1badd41e53dd732c776fb5d06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35600
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-17 17:59:37 +00:00
Corentin Wallez 5ca12a825c Introduce SubresourceStorage (3/N): Inline data
This CL changes SubresourceStorage to have an inline storage for the
per-aspect compressed data and allocate the storage for decompressed
data lazily. This will avoid the large performance cost of allocations
in the happy case.

Bug: dawn:441

Change-Id: Iae1cab87b699cb0e60031abe7306cdff92fbd049
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35521
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-12-17 15:56:27 +00:00
Brandon Jones b31cd871ad Update majority of tests to use new BindGroupLayoutEntry format
Converts most of the tests to use the new layout, with the exception
of a few that are dependent on additional Dawn changes before the
conversion can happen. The deprecation warning is not enabled yet
due to these remaining changes.

Bug: dawn:527
Change-Id: Idcfd9fc873756f5a9f88de2ce9ab65c66b79bf39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35582
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-17 00:19:34 +00:00
Ben Clayton 307ece1630 end2end: Enable textureLoad() tint tests
These are fixed by:
https://dawn-review.googlesource.com/c/tint/+/35423

Fixed: tint:399
Change-Id: I81d6e88083afa07b31d4b4b750a221d2be31d942
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35722
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2020-12-16 18:37:10 +00:00
Kai Ninomiya cf820d79ef Rename STRIDE_UNDEFINED to COPY_STRIDE_UNDEFINED
Per https://github.com/webgpu-native/webgpu-headers/pull/71

Keeps but deprecates WGPU_STRIDE_UNDEFINED/wgpu::kStrideUndefined.

Bug: dawn:520
Change-Id: Ied162ec39454fac3d16a3782c9ed6d2f68c1d41d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34926
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Kai Ninomiya <kainino@chromium.org>
2020-12-16 07:53:30 +00:00
Ryan Harrison fea4c14580 Fix missing include that causes Skia builds to fail
One of the issues blocking Dawn->Skia rolls

Change-Id: Ia3c68edd2c2745586dfb6a778e3a493df20aa66d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35820
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>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-15 19:59:59 +00:00
Brandon Jones b35ae00239 Fix erroneous validation logic for BindGroupLayoutEntry
https://dawn-review.googlesource.com/c/dawn/+/34921 introduced a couple
of bugs. This CL fixes them and tests to ensure that the new validation
logic is working correctly.

BUG=dawn:527

Change-Id: Ief01dfda0b97a202bf12ff6aeb0e7a3b84b4b81c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35700
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-15 17:32:59 +00:00
Corentin Wallez e0a4d8f209 Fix comment that says "control case" when it isn't.
Bug:
Change-Id: I414bdabeeb12ed53c0620ead80d54a1448bb95bb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35720
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-15 16:49:29 +00:00
Ben Clayton 56996023fe end2end: Enable DepthReplacing tint tests
These are fixed by:
https://dawn-review.googlesource.com/c/tint/+/35500

Fixed: tint:329
Change-Id: I33105e392c6dfbe75a4d716fe98805dbe696c2ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35721
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@google.com>
Reviewed-by: Corentin Wallez <cwallez@google.com>
2020-12-15 16:33:19 +00:00
Corentin Wallez 0faa66ab2b Introduce SubresourceStorage (2/N): Merge
This CL adds the Merge() operation to SubresourceStorage() that allows
modifying the content of a storage with another storage.

Bug: dawn:441

Change-Id: I28e3cd7bc967056eda2c387b2b6e164eb370a241
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35520
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-15 13:10:08 +00:00
Ryan Harrison 43c39a1ba4 Re-enable disabled unit tests
The issues causing these tests to fail with the Inspector enabled have
been resolved.

BUG=dawn:578

Change-Id: Ie0b7b4d6b2d1a3b432f4eed7542c64e31bf44fdb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35680
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>
2020-12-14 20:45:08 +00:00
Brandon Jones 9c52c2997c Updating BindGroupLayoutEntry interface to match latest spec
Updates BindGroupLayoutEntry to allow for the newly split-up descriptors
that define each binding type in it's own member (buffer, texture, etc.)
The previous style of descriptor is still supported but is deprecated.

For the sake of keeping the scope reasonable, this change does not alter
the BindingInfo structure that's used internally by the various
backends. That will come as a followup.

Bug: dawn:527
Change-Id: I2f301f5f36fa2ce7ff15126ac90dc4c19d5e32ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34921
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-12 02:09:56 +00:00
Corentin Wallez 9229175811 Introduce SubresourceStorage (1/N)
This CL adds the start of the implementation of a SubresourceStorage<T>
container class that stores per-subresource state in a compressed
fashion. Only the getter methods and Update() modifying methods are
added because they are the first step necessary to test the behavior of
SubresourceStorage.

Subsequent CLs will:
 - add the Merge() operation
 - move the per-aspect storage to be inlined and avoid allocation of
mData and mLayerCompressed if possible
 - use the container where applicable in dawn_native
 - (maybe) move clear-state tracking in the backends as part of barrier
tracking

Bug: dawn:441

Change-Id: Ic93e5af16dd705b260424f05e4dc3e0c9f6fbd0a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34464
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-12-09 15:38:27 +00:00
Austin Eng 30805557e6 Enable use_tint_generator w/ test suppressions for SPIR-V based backends
This runs dawn_end2end_tests both with/without use_tint_generator on
Vulkan, OpenGL, and OpenGL ES backends. This is a temporary solution
until we add an dawn_end2end_use_tint_generator_tests suite in the
bot configuration after all backends can support use_tint_generator or
have the appropriate test suppressions.

Bug: dawn:571
Change-Id: I44ab0ba7261160e34dbad512d98602427dc7e966
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35044
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-08 16:49:34 +00:00
Ryan Harrison 0824188672 Fix issues with roll into Skia
Specifically there are build failures due to size_t not being defined
in CachedObject.h, as well as unused functions in ShaderModule.cpp

Change-Id: Ie9bd903660e3563fdf797e716bf55f6fa8627e84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35103
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-08 16:32:34 +00:00
Corentin Wallez 2093157afe Rename TryConvertAspect to better reflect what it does.
Bug: dawn:441
Change-Id: I51d28102926fb00a7c6225bc3b84324fe8f1f6fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34902
Reviewed-by: 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>
2020-12-08 15:56:44 +00:00
Stephan Hartmann 0b0e6e0579 use cstring instead of string.h
dawn codebase uses c-prefixed headers.
Follow up for https://dawn-review.googlesource.com/c/dawn/+/35001

Bug: None
Change-Id: I65b18f3ec8b2222f9a683c2cf81b710435dcf55c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35017
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-08 14:14:53 +00:00
Stephan Hartmann 36cd254bbd GCC: fix template specialization in ObjectContentHasher
GCC complains that explicit specialization in non-namespace scope
is happening for ObjectContentHasher.

In file included from
../../third_party/dawn/src/dawn_native/ShaderModule.cpp:19:
../../third_party/dawn/src/dawn_native/ObjectContentHasher.h:56:19:
error: explicit specialization in non-namespace scope 'class
dawn_native::ObjectContentHasher'
   56 |         template <>
      |                   ^

Additionally make RecordIterable constexpr, because it is called
from constexpr methods. GCC complains about this as well:

../../third_party/dawn/src/dawn_native/ObjectContentHasher.h:76:50:

error: call to non-'constexpr' function 'void
dawn_native::ObjectContentHasher::RecordIterable(const IteratorT&) [with
IteratorT = std::__cxx11::basic_string<char>]'
   76 |             recorder->RecordIterable<std::string>(str);
      |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

Bug: None
Change-Id: I535f5f5e0beded09f105f9871759b617c7384ae0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35003
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
2020-12-08 13:52:03 +00:00
Corentin Wallez 61355d416d Change SubresourceRange to be hierarchical.
Initializing SubresourceRange with {x, y, z} type of constructor
was error prone because it was going from the smallest concept
to the larger one instead of being hierarchical.

This CL changes the order of the structure and more importantly
adds a constructor that's in hierarchical order and groups related
members together. For example:

  SubresourceRange range(Aspect::Color, {layerStart, layerCount}, {0, mipCount});

It also adds a rename of SingleMipAndLayer in hierarchical order as
SubresourceRange::Single and a helper that gives a full range as
SubresourceRange::Full (it will be used in follow-up CLs).

Bug: dawn:441

Change-Id: I8e71bae1129a96222f7779014575b24b31f5ef7a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-08 12:39:03 +00:00
Austin Eng 8a73e1876d Add MSL support for UseTintGenerator toggle
Turns on Tint generation of MSL if UseTintGenerator is on

Bug: dawn:571
Change-Id: Icfa523c36a509baf5da3b2a54152a7fb462c86f4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32303
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-07 22:04:23 +00:00
Stephen White 042184128e Widen color state support on ES.
Indexed draw buffer (color state) support on ES is not core until 3.2.
Previously, we were failing (asserting) if color state was changed for
a non-zero attachment. This CL compares the state, and only asserts if the
color state actually differs per-attachment.

It also implements a disable_indexed_draw_buffers toggle, which allows a
test to check for the functionality in a platform-independent manner.

BUG=dawn:580, dawn:582

Change-Id: I11c67b0dd72f73e7302c06cad24e8a268fb37a76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34981
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-07 19:31:03 +00:00
Austin Eng 1ae024ce56 Add SPIR-V support for UseTintGenerator toggle
Turns on Tint generation of SPIR-V if UseTintGenerator is on.
This affects SPIR-V generation for Vulkan, and SPIR-V passed
into SPIRV-Cross to produce GLSL.

It enables DrawTests use_tint_generator for Vulkan/GL where it
should have at least basic support.

Bug: dawn:571
Change-Id: I5df1435bee17572259f5aa3605c4bf19c0136cbc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32302
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-07 19:05:33 +00:00
Austin Eng 0d948f7752 Produce tint::ast::Module in the frontend if UseTintGenerator
This factors code to move parsing of tint::ast::Module to the
frontend. All backends will use this code path when
UseTintGenerator is enabled for both SPIR-V and WGSL ingestion.

To avoid too much code explosion, parsing and validating the
shader is moved into ValidateShaderModuleDescriptor which
returns a result struct that gets passed into creation.

Bug: dawn:571
Change-Id: I598693ef36954fd0056a0744a2a0ebd7cc7d40a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32301
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
2020-12-07 18:12:13 +00:00
Brandon Jones 224a3a4ab5 Fix Emulated OOB Index In Primitive Restart Tests
Recognizes an OOB vertex index to show consistent behavior when trying
to emulate an OOB index across backends.

Bug: dawn:575
Change-Id: Ie06d6706614843c75c217f7b3b144dc25996cd0b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34924
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
2020-12-07 17:29:43 +00:00
Stephan Hartmann d63d562d1b IWYU: include string.h for memcpy
Bug: None
Change-Id: I978f49febf7e9e9e961957f62efd3ff9a166b81b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35001
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-05 20:37:01 +00:00
Natasha Lee c532048062 Add testing and implementation for lazy init compressed textures
Bug: dawn:145
Change-Id: I176ac2fb4c7db708bb147e2ad0118538907b43d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33040
Commit-Queue: Natasha Lee <natlee@microsoft.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-04 19:31:40 +00:00
Stephen White 8c813311f0 Fix base vertex toggle.
Use the correct toggle when checking for support.

Also disable a test which tests it unconditionally.

Change-Id: I5f98004865df5e1f4dd6cf6eaa4769444b90e9c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34980
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-04 19:24:00 +00:00
Stephen White f31b78e90e Enable all remaining end2end tests on OpenGL ES backend.
This enables all the tests which pass on ES 3.2.

BUG=dawn:580

Change-Id: I56fde768a917d74f24e53cd2f7367aa165c4ac4f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34720
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-04 15:59:29 +00:00
Ben Clayton 5816894706 Remove legacy tint::transform API codepaths
https://dawn-review.googlesource.com/c/tint/+/34800 has been merged, and rolled into Dawn and Chromium.

Bug: tint:390
Bug: tint:389
Change-Id: Ibbbb7f664b2c0e132c5ac25f24bc8f7cb24fc460
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34900
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-12-04 12:55:09 +00:00
Austin Eng f731a81c74 Fix DawnTest HasToggleEnabled referencing the wrong device
It should reference the backendDevice as the |device| points to
the wire client device when the wire is used.

Bug: none
Change-Id: Iac6399df96ea0226d8b9ba8f6196185e43c41adb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34923
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-04 02:07:20 +00:00
Brandon Jones 3a915a67f5 Set D3D12 IBStripCutValue
Sets IBStripCutValue on the D3D12 render pipeline to the appropriate
value when an index buffer is used. Revises primitive restart tests to
catch when IBStripCutValue is not set.

Bug: dawn:575
Change-Id: I77058d8fe62a52c09641b82d3383a404b7ac6d4a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34340
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-03 21:45:09 +00:00
Ben Clayton 80baa39ffc Add codepaths for new tint::transform API
These are guarded by `#if DAWN_USE_NEW_TINT_TRANSFORM_API` preprocessor conditionals, this define will be added to the tint `transform.h` file, atomically switching code paths when the new API lands.

See https://dawn-review.googlesource.com/c/tint/+/34800 for the tint change.

Bug: tint:390
Bug: tint:389
Change-Id: I0f397550f921a46c5bb29b1e71aacfee19ec5dd3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34880
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2020-12-03 21:25:59 +00:00
Stephen White 00cda4f719 OpenGL ES: enable StorageTextureTests.
Disable 32-bit-per-component RG* format tests, since those formats are
unsupported on OpenGL ES.

BUG=dawn:580, dawn:595

Change-Id: I0bc3b03c65bbf15c7c38937ed84629c61201ff76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34780
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-03 19:07:33 +00:00
Austin Eng 1229110f9c Update TextureFormatTests to use WGSL
Bug: dawn:572
Change-Id: I104465bfaf3056e0546cdf08b0aebfb43d84b488
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33886
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-03 18:51:53 +00:00
Bryan Bernhart 24bf7a4fbb Pipeline caching: refactor object hashing
Dawn's object-based cache creates keys from memory
addresses. These keys cannot be used in a persistent
cache. This change modifies the keys to only
use hashes so they can be re-used for caching
pipelines.

BUG=dawn:549

Change-Id: Ica64d58ae6a3c6266435cfc3f776c820190f7895
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30740
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2020-12-03 18:42:13 +00:00
Corentin Wallez fe129405cf Move Subresource-related datatypes to their own file.
Aspect and SubresourceRange will be used by the SubresourceStorage
container that will itself be used by TextureBase. Avoid cyclic header
dependencies by moving SubresourceRange and Aspect to their own header.

Also refactors the handling of Aspect to aspect index in preparation for
using it in SubresourceStorage (each Aspect will have a fixed index).

Bug: dawn:441

Change-Id: I66c60f899d236a233ef30a287227610f8b469f88
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34463
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-03 17:55:03 +00:00
Stephen White c34bb0c3c4 Enable viewport tests on OpenGL ES.
Also implement a workaround for missing glViewportIndexedf().

BUG=dawn:580,dawn:597

Change-Id: I618161ae9750925c1c892123607db84563f0869c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34721
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-03 17:00:33 +00:00
Austin Eng 600f6f55db Specify mip level and array layer in TextureMTL lazy clear
These were accidentally left out in the original code and fixes
WebGPU CTS zero init tests with renderable formats on Mac.

Bug: dawn:145
Change-Id: Ied886098408a749c094addb2ceaeb7e8c14938d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34726
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-03 16:55:53 +00:00
Ryan Harrison 10cb17e079 Disable unit tests with KI when Tint Inspector is being used
dawn_unittests --enable-toggles=use_tint_inspector now passes.

Bug: tint:578
Change-Id: I1e764fd99a145542fe6b7c6e651b0dec1fb4785f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34722
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2020-12-03 16:34:27 +00:00
dan sinclair 0d1c17363d Remove tint context.
This CL removes all references to the tint context object which is going
away.

Bug: None
Change-Id: I3b74a8a65b89ba2236cfa71e7551756c8624e2a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34725
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-03 15:46:17 +00:00
Corentin Wallez 5d8a071433 Suppress all end2end tests on Intel D3D12 with validation layers
After a driver upgrade a lot of these tests started hanging, to unblock
the CQ and fix various builder, we skip all the tests on this
configuration.

Bug: dawn:598
TBR=enga@chromium.org

Change-Id: Ic5e47bb6e84be1104e8a511c087d3386bf025c90
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34468
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-03 11:21:57 +00:00
Bryan Bernhart a0ca2cc7ef Fix WindowsDebugLogger hang on release builds
Removes ASSERT checking the status of the exit
handle so it cannot ever be optimized out.

BUG=dawn:592

Change-Id: Ib88a058abd0597668ba3c272cf0e304f4aa19c4e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34761
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-03 10:53:04 +00:00
Ryan Harrison b17fe99e8b Do not assert in work thread during tests
If there is an issue with the shader, i.e. validation failing, the
former ASSERT_EQs will kill the thread that is running the lambda.

Since the main thread is waiting for a state change, if this assert
kills the thread, the test will hang forever.

This change allows the test to complete and fail correctly in the case
that the test condition fails.

Bug: tint:578
Change-Id: I6f5cc636193bf01c2d5e5d77a883fab7ec591c3e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34700
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-02 18:06:30 +00:00
Austin Eng 2395ff5be1 OpenGL: Bind a dummy sampler for OpImageFetch if not present
In WGSL, textureLoad translates to an OpImageFetch without the
combined sampler. In OpenGL, we need to use SPIRV-Cross to insert
a dummy nearest filtering sampler and bind that in the backend.

Bug: dawn:585
Change-Id: I92ae6ad35263d3720e59fa93688ca914a9495a81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34401
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2020-12-02 16:51:19 +00:00
Corentin Wallez 0bc6128d4b Reenable BufferMappedAtCreationOOM on Windows
It was suppressed because PartitionAlloc didn't support new
(std::nothrow). Reenable the test now that ParitionAlloc
supports it.

Fixed: dawn:579
Change-Id: I4d3879ae78ee869d08bb249857af7782a6f7f443
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34465
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2020-12-02 16:22:29 +00:00
Yan, Shaobo bb913a94da CopyTextureForBrowser: Support flipY option
This CL enable CopyTextureForBrowser to accept options. The first
supported option is flipY, which can be implemented through scale and
offset uniforms.

BUG=dawn:465

Change-Id: Ia90153ee63a50e0e40beb1c13c63764d19a0b809
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34402
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-02 08:13:09 +00:00
Stephen White 6f5151f657 Enable D* end-to-end tests on OpenGL ES backend.
This is mostly the set of tests which are enabled on Desktop GL,
with the exception of tests which use glTextureView() (unsupported
on GLES).

BUG=dawn:580

Change-Id: I1dbefa394298f7dd31d65e920f1f4efeaebe90ec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34520
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-12-01 21:52:37 +00:00
Stephen White 26ea8b728c Disable some further C* end2end tests on GLES.
BUG=dawn:580

Change-Id: Ie5d58ebfa2773899d29ed4279478b9a44d8c266f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34540
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-01 20:35:27 +00:00
Stephen White ab59a10f2c Enable most C* end-to-end tests on OpenGL ES.
This enables all the C* tests which are also enabled on desktop GL.

BUG=dawn:580

Change-Id: I71cf500a19fc4f81e0de47483d9b1de49df9bf76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34500
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-01 18:37:19 +00:00
Stephen White f995e4adc1 Enable BufferTests on OpenGL ES.
Skip those which currently do not pass (same as GL backend).

BUG=dawn:580

Change-Id: Id307cfb998c981d65621eb98761c22d73e5b0f81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34403
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-01 18:33:27 +00:00
Stephen White 7bf553c467 Fix SSBO bindings in GLES backend.
OpenGL ES doesn't have the glShaderStorageBlockBinding() call, so we
modify the binding decorations set in the shader instead. This requires
plumbing through some more pipeline state at shader translation time.

BUG=dawn:584
Change-Id: Ib7fdb6a7ad1eff1a99d44d55e9d923214affe702
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34400
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-12-01 17:42:57 +00:00
Ryan Harrison c3830d436c Add support for using Tint Inspector
Adds in a toggle to control using Tint or SPIRV Cross for reflection.
The current implementation only gets name and stage information via Tint,
backfilling the rest from SPIRV Cross.
Future CLs will fill in the rest of the entry point metadata.

Bug: dawn:578
Change-Id: Iee16b9dbb9a17d4aaa68e5e52e4aa91ee0a62624
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33500
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-01 14:53:07 +00:00
Corentin Wallez a92f0d2b61 CommandBufferMTL: Address review comments
Renames indexTypeSize to indexFormatSize. I forgot to add the changes
prior to pushing the commit.

Bug: dawn:502
Change-Id: I38f19edc021141c5a5ab57c6220978b7c88b116e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33923
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-12-01 14:06:47 +00:00
Yan, Shaobo a6a7e46e54 Enable CopyTextureForBrowserTests on Vulkan/Metal Backend
CopyTextureForBrowser end2end tests had been skipped on Vulkan/Metal
backends due to crbug.com/tint/63.

Because this issue has been fixed, enable CopyTextureForBrowserTests on
Vulkan/Metal backends.

However, D3D12 backend with validation layer still stucks. Raise issue
crbug.com/dawn/592 and keep tests skip.

BUG=dawn:465

Change-Id: I819b3608d07ea7467b33263004e9e19158e73eff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34440
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-12-01 07:57:47 +00:00
Yan, Shaobo a827aa2c29 CopyTextureForBrowser: Use large triangle to avoid arithmetic precision
In previous internal shader, we draw a just fit-in rectangle to do the
copy. But there is arithmetic precision issues in border pixels when
copy from a large texture.

ANGLE handle the same issue by drawing a large triangle. Dawn adopte the
same idea here

BUG=dawn:465

Change-Id: I2366e28b1e96e7a33116a170023a5138d8c9f770
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33900
Reviewed-by: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
2020-12-01 03:37:37 +00:00
Austin Eng 70b9db3ffc Update RenderPassLoadOpTests to use WGSL
Bug: dawn:572
Change-Id: Ib955b4cff1a43dfa42a6cebfcbd88bf128e22644
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33770
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-30 20:48:21 +00:00
Austin Eng 564bea9da1 Update ScissorTests to use WGSL
Bug: dawn:572
Change-Id: Id083979bf24360d4db25eb5afa0e60eb0151d750
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33768
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-30 20:36:31 +00:00
Austin Eng 84e1dca464 Update DepthStencilCopyTests to use WGSL
Note: some shaders blocked on crbug.com/tint/329

Bug: dawn:572
Change-Id: I31e745fa5f0b5b698432442da0e6c00586fe062f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33760
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-30 20:33:50 +00:00
Austin Eng 054d85366a Update ObjectCachingTests to use WGSL
Bug: dawn:572
Change-Id: I64ebc3f0aabf806dd10b6b90cd7352707643ee58
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33880
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-30 20:06:50 +00:00
Jiawei Shao 5fc12c314a Use FilterMode::Nearest in TextureFormatSamplingTests
Currently TextureFormatTest.R8Uint fails on the Vulkan backend with
Vulkan validation layer enabled because we wrongly use a Linear filter
on a texture with R8Uint format.

This patch fixes this issue by using the Nearest filter in that test
instead.

BUG=dawn:588
TEST=dawn_end2end_tests/TextureFormatTest.R8Uint

Change-Id: I39714784c8f2db25923b50eb2e07b7aa111cb4c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34280
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2020-11-30 17:54:50 +00:00
Jiawei Shao 2fe7335d34 Skip two MultisampledRenderingTest tests on D3D12 with debug layer
This patch skips the following two dawn_end2end_tests on all D3D12
backends when the D3D12 debug layer is enabled as they started to fail
after the upgrade of Windows try bots.
- MultisampledRenderingTest.ResolveOneMultisampledTextureTwice
- MultisampledRenderingTest.ResolveInto2DArrayTexture

See dawn:462 for more details.

BUG=dawn:462

Change-Id: I99c65ce250ba5b405a2143e6f866fd21ae33d63a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34281
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-30 13:50:49 +00:00
Corentin Wallez e60f506bdd Roll spirv-headers right before the ray tracing breakage.
The next commit in spirv-headers contains breaking changes that removes
the provisional ray-tracing extension and add the final version of it.
To ease the roll past that, we first roll just before the breaking
changes.

It required a roll of SPIRV-Tools and SPIRV-Cross to handle
smaller-scale breaking changes.

Also fixes a compilation issue with spirv-headers and SPIRV-Cross having
conflictin SPV_VERSION macros.

Roll third_party/spirv-headers/ 060627f0b..5ab5c9619 (7 commits)

060627f0b0..5ab5c96198

$ git log 060627f0b..5ab5c9619 --date=short --no-merges --format='%ad %ae %s'
2020-11-04 michael.kinsner Reserve additional loop control bit for Intel extension (NoFusionINTEL) (#175)
2020-11-02 4464295+XAMPPRocky Add EmbarkStudios/rust-gpu to vendor list. (#174)
2020-10-23 john Bump revision to 4, for SPIR-V 1.5.
2020-10-19 TobyHector Add SPV_EXT_shader_image_int64 (#170)
2020-10-19 TobyHector Added SPV_KHR_fragment_shading_rate (#172)
2020-10-12 hwguy.siplus  Register the Xenia emulator as a generator (#171)
2020-09-27 atyuwen Register the Messiah SPIR-V CodeGen (#169)

Created with:
  roll-dep third_party/spirv-headers

Roll third_party/spirv-cross/ 8891bd351..be527632a (67 commits)

8891bd3512..be527632a6

$ git log 8891bd351..be527632a --date=short --no-merges --format='%ad %ae %s'
2020-11-25 comexk spirv_msl: Don't add fixup hooks for builtin variables if they're unused.
2020-11-23 cdavis MSL: Don't mask off inactive bits in ballot masks.
2020-11-20 cdavis MSL: Adjust FragCoord for sample-rate shading.
2020-11-23 post GLSL: Fix buffer_reference with aliased names.
2020-11-23 post GLSL: Emit storage qualifiers for buffer_reference.
2020-11-23 post HLSL: Fix validation with FXC for test.
2020-11-23 post Normalize all internal workaround methods to use spv prefix.
2020-11-21 scribam CMake: Set minimum required version to 3.0
2020-11-18 cdavis MSL: Expand subgroup support.
2020-11-12 git GLSL: Require GL_ARB_vertex_attrib_64bit for double input in pre-4.10
2020-11-14 cdavis MSL: Expose some more features on iOS.
2020-11-11 post MSL: Add missing reference file.
2020-11-11 post Fix switch fallthrough
2020-11-09 git GLSL: Legacy / extension fallbacks for textureSize and texelFetch
2020-10-29 jsikorski MSL: extract global variables from subgroup ballot operations
2020-11-08 post Run format_all.sh.
2020-11-08 post Update texture gather test result.
2020-11-07 git GLSL: Add error checking and extension fallback for textureGather
2020-11-07 git GLSL: Remove unused `lod` argument from legacy_tex_op()
2020-11-05 git GLSL: implement transpose() in GLSL 1.10 / ES 1.00
2020-11-06 git GLSL: Fix round/roundEven for legacy GLSL.
2020-11-05 git GLSL: Fix support for textureLod in legacy vertex shaders
2020-11-06 post MSL: Fix regression in image gather handling.
2020-11-02 cdavis MSL: Support pull-model interpolation on MSL 2.3+.
2020-11-03 git HLSL: Support roundEven() in HLSL SM 4.0 and above
2020-11-03 git HLSL: Add regression test for SM3.0 texture samplers
2020-10-31 git HLSL: Support depth comparison texture sampling in SM 2/3.
2020-11-03 post HLSL: Add option to flatten matrix vertex input semantics.
2020-11-03 post Parser: Don't assume OpTypePointer will always take a SPIRType.
2020-11-02 bill.hollings Syntax and format updates from code review.
2020-11-02 crisserpl2 Updated ref file for subgroups_basicvoteballot.vk.comp
2020-10-31 devsh.graphicsprogramming Fix some bad assumptions about emulating `subgroupBarrier`
2020-10-30 bill.hollings Minor format and typo updates from code review.
2020-10-27 cdavis MSL: Allow Bias and Grad arguments with comparison on Mac in MSL 2.3.
2020-10-30 post GLSL: Fix nonuniformEXT injection.
2020-10-30 atyuwen fixed compile error with -std=c++20
2020-10-30 atyuwen added metal keyworld: "level" (#1501)
2020-10-29 bill.hollings MSL: Support run-time sized image and sampler arrays (GL_EXT_nonuniform_qualifier/SPV_EXT_descriptor_indexing).
2020-10-27 cdavis MSL: Allow framebuffer fetch on Mac in MSL 2.3.
2020-10-27 cdavis MSL: Allow post-depth coverage on Mac in MSL 2.3.
2020-10-27 post Handle case where block is loop header, continue AND break block.
2020-10-14 post GLSL: Support a workaround for loading row-major matrices.
2020-10-20 cdavis MSL: For 2.1+, don't disable rasterization for vertex writes.
2020-10-26 post MSL: Do not use component::x gather for depth2d textures.
2020-10-26 post Update TravisCI python reference.
2020-10-21 cdavis MSL: Cast broadcast booleans to ushort.
2020-10-20 cdavis MSL: Mask ballots passed to Ballot bit ops.
2020-10-20 cdavis MSL: Support vectors with OpGroupNonUniformAllEqual.
2020-10-20 cdavis MSL: Correct definitions of subgroup ballot mask variables.
2020-10-20 cdavis MSL: Don't remove periods from swizzle buffer index exprs.
2020-10-14 cdavis MSL: Handle Offset and Grad operands for 1D-as-2D textures.
2020-10-14 cdavis MSL: Don't use a bitcast for tessellation levels in tesc shaders.
2020-10-14 post GLSL: Use need_transpose when checking for non-native matrix.
2020-10-14 post MSL: Support querying and modifying generated combined sampler suffix.
2020-10-13 cdavis MSL: Fix calculation of atomic image buffer address.
2020-10-13 cdavis MSL: Add missing interlock handling to atomic image buffers.
2020-10-13 cdavis MSL: Support atomic access to images from argument buffers.
2020-09-28 cdavis MSL: Support SPV_EXT_demote_to_helper_invocation for MSL 2.3.
2020-10-08 post Style nits for GL subgroup implementation.
2020-10-08 post Add missing VK variant of the test file.
2020-10-08 post Update GL subgroup test file.
2020-10-08 crisserpl2 Resolved issues 1350, 1351, 1352
2020-09-30 post GLSL: Add support for transform_feedback3 geometry streams.
2020-09-30 post GLSL: Use literal array size for cull/clip array sizes.
2020-09-28 post Work around MSVC warning.
2020-09-28 post Allow flip_vert_y in all relevant stages.
2020-09-22 dsinclair Roll dependencies.

Created with:
  roll-dep third_party/spirv-cross

Roll third_party/SPIRV-Tools/ 60ce96e2f..671914c28 (115 commits)

60ce96e2ff..671914c28e

$ git log 60ce96e2f..671914c28 --date=short --no-merges --format='%ad %ae %s'
2020-11-18 greg Fix buffer oob instrumentation for matrix refs (#4025)
2020-11-13 afdx spirv-opt: Set parent when adding basic block (#4021)
2020-11-13 jaebaek spirv-opt: properly preserve DebugValue indexes operand (#4022)
2020-11-11 dneto Use less stack space when validating Vulkan builtins (#4019)
2020-11-05 46493288+sfricke-samsung spirv-val: Fix SPV_KHR_fragment_shading_rate VUID label (#4014)
2020-11-05 46493288+sfricke-samsung spirv-val: Label Layer and ViewportIndex VUIDs (#4013)
2020-11-05 alanbaker Add dead function elimination to -O (#4015)
2020-11-04 jaebaek Add DebugValue for invisible store in single_store_elim (#4002)
2020-11-04 dnovillo Fix SSA re-writing in the presence of variable pointers. (#4010)
2020-11-04 afdx spirv-fuzz: Fixes to pass management (#4011)
2020-11-03 afdx spirv-fuzz: Add support for reining in rogue fuzzer passes (#3987)
2020-11-03 vasniktel spirv-fuzz: Fix assertion failure in FuzzerPassAddCompositeExtract (#3995)
2020-11-03 vasniktel spirv-fuzz: Fix invalid equation facts (#4009)
2020-11-03 vasniktel spirv-fuzz: Fix bugs in TransformationFlattenConditionalBranch (#4006)
2020-11-03 andreperezmaselco.developer spirv-fuzz: Fix bug related to transformation applicability (#3990)
2020-10-30 jaebaek Temporarily add EmptyPass to prevent glslang from failing (#4004)
2020-10-30 Junda.Liu spirv-opt: Add support to prevent functions from being inlined if they have DontInline flag (#3858)
2020-10-29 jaebaek Propagate OpLine to all applied instructions in spirv-opt (#3951)
2020-10-29 bclayton CMake: Add SPIRV_TOOLS_BUILD_STATIC flag (#3910)
2020-10-29 dneto Avoid copying a ref in a loop (#4000)
2020-10-28 justsid spirv-val: Allow the ViewportIndex and Layer built-ins on SPIR-V 1.5 (#3986)
2020-10-28 dnovillo Simplify logic to decide whether CCP modified the IR (#3997)
2020-10-27 jaebaek Add DebugValue for DebugDecl invisible to value assignment (#3973)
2020-10-26 greg Fix bounds check instrumentation to handle 16-bit values (#3983)
2020-10-23 andreperezmaselco.developer spirv-fuzz: Add expand vector reduction transformation (#3869)
2020-10-23 vasniktel spirv-fuzz: Don't replace irrelevant indices in OpAccessChain (#3988)
2020-10-23 vasniktel spirv-fuzz: Add FuzzerPassAddCompositeExtract (#3904)
2020-10-22 afdx spirv-fuzz: Fix mismatch with shrinker step limit (#3985)
2020-10-22 afdx spirv-fuzz: Fix off-by-one error in replayer (#3982)
2020-10-22 afdx spirv-fuzz: Get order right for OpSelect arguments (#3974)
2020-10-22 afdx spirv-fuzz: Do not add synonym-creating loops in dead blocks (#3975)
2020-10-22 afdx spirv-fuzz: Skip OpTypeSampledImage when propagating up (#3976)
2020-10-22 afdx spirv-fuzz: Pass OpUndef in function call if needed (#3978)
2020-10-22 afdx spirv-fuzz: Fix off-by-one in TransformationCompositeConstruct (#3979)
2020-10-22 afdx spirv-fuzz: Tolerate absent ids in data synonym fact management (#3966)
2020-10-21 afdx spirv-fuzz: Fix to id availability (#3971)
2020-10-21 afdx spirv-fuzz: Fix operand types (#3962)
2020-10-21 8729214+jonahryandavis Update SPIRV-Headers revision in DEPS file (#3961)
2020-10-21 afdx spirv-fuzz: Don't flatten conditional if condition is irrelevant (#3944)
2020-10-21 afdx spirv-fuzz: Do not produce OpPhis of type OpTypeSampledImage (#3964)
2020-10-21 afdx spirv-fuzz: Restrict fuzzer pass to reachable blocks (#3970)
2020-10-21 afdx spirv-fuzz: Handle more types when extending OpPhi instructions (#3969)
2020-10-21 afdx spirv-fuzz: Skip early terminator wrappers when merging returns (#3968)
2020-10-21 afdx spirv-fuzz: Avoid irrelevant constants in synonym-creating loops (#3967)
2020-10-21 afdx spirv-fuzz: Skip dead blocks in FuzzerPassAddOpPhiSynonyms (#3965)
2020-10-21 afdx spirv-fuzz: Avoid the type manager when looking for struct types (#3963)
2020-10-20 afdx spirv-fuzz: Fix to TransformationDuplicateRegionWithSelection (#3941)
2020-10-20 afdx spirv-fuzz: Skip OpFunction when replacing irrelevant ids (#3932)
2020-10-20 afdx spirv-fuzz: Use component-wise selectors when flattening conditional branches (#3921)
2020-10-20 TobyHector Add SPV_EXT_shader_image_int64 (#3852)
(...)
2020-10-13 afdx spirv-fuzz: Do not allow creation of constants of block-decorated structs (#3903)
2020-10-13 afdx spirv-fuzz: Fixes related to irrelevant ids (#3901)
2020-10-13 afdx spirv-fuzz: Fix to transformation that adds a synonym via a loop (#3898)
2020-10-13 afdx spirv-fuzz: Fix to duplicate region with selection (#3896)
2020-10-09 afdx spirv-fuzz: Do not expose synonym facts for non-existent ids (#3891)
2020-10-08 afdx spirv-fuzz: Do not add synonyms involving irrelevant ids (#3890)
2020-10-08 afdx spirv-fuzz: Do not replace irrelevant ids that are not in blocks (#3892)
2020-10-08 afdx spirv-fuzz: Wrap OpKill and similar in function calls (#3884)
2020-10-08 dj2 Update val to handle reversed instruction sections. (#3887)
2020-10-06 afdx spirv-fuzz: Replace dead-block terminators with OpKill etc. (#3882)
2020-10-06 vasniktel spirv-fuzz: TransformationPropagateInstructionDown (#3692)
2020-10-06 afdx spirv-fuzz: Transformation to add wrappers for OpKill and similar (#3881)
2020-10-06 afdx spirv-fuzz: Use overflow ids when duplicating regions (#3878)
2020-10-06 vasniktel spirv-fuzz: Fix rvalue references (#3883)
2020-10-02 afdx spirv-fuzz: Avoid using block-decorated structs in transformations (#3877)
2020-10-02 afdx spirv-fuzz: Use overflow ids when inlining functions (#3880)
2020-10-02 jaebaek Debug info preservation in convert-local-access-chains pass (#3835)
2020-10-02 vasniktel spirv-fuzz: Refactor fact manager tests (#3879)
2020-10-02 afdx spirv-fuzz: Integrate spirv-reduce with shrinker (#3849)
2020-10-02 afdx spirv-fuzz: Only recommend passes when a pass had an effect (#3863)
2020-10-02 stefano.milizia00 spirv-fuzz: Merge the return instructions in a function (#3838)
2020-10-01 jaebaek Debug info preservation in redundancy-elimination pass (#3839)
2020-10-01 jaebaek Debug info preservation in if-conversion pass (#3861)
2020-10-01 vasniktel spirv-fuzz: Refactor conditions in the fact manager (#3867)
2020-10-01 vasniktel spirv-fuzz: TransformationWrapRegionInSelection (#3674)
2020-10-01 afdx spirv-fuzz: Enable some passes with high probability (#3860)
2020-10-01 afdx spirv-fuzz: Do not add constants for Block-decorated structs (#3862)
2020-10-01 vasniktel spirv-fuzz: Fix to FuzzerPassFlattenConditionalBranches (#3865)
2020-09-30 vasniktel spirv-fuzz: Fix TransformationRecordSynonymousConstants (#3868)
2020-09-30 afdx spirv-fuzz: Fix flatten conditional branch transformation (#3859)
2020-09-29 afdx spirv-fuzz: Report fresh ids in transformations (#3856)
2020-09-28 dj2 [spirv-dis] Add some context comments to disassembly. (#3847)
2020-09-28 emaxx Fix use-after-move in val/validate.cpp (#3848)
2020-09-26 antonikarp spirv-fuzz: Fix bug in TransformationDuplicateRegionWithSelection (#3819)
2020-09-26 andreperezmaselco.developer spirv-fuzz: Support OpNot bit instruction case (#3841)
2020-09-25 afdx spirv-fuzz: Return IR and transformation context after replay (#3846)
2020-09-24 paulthomson spirv-fuzz: fix test (#3845)
2020-09-24 afdx spirv-fuzz: Use unique_ptr<FactManager> in TransformationContext (#3844)
2020-09-24 ehsannas Start SPIRV-Tools v2020.6
2020-09-24 ehsannas Finalize SPIRV-Tools v2020.5
2020-09-24 ehsannas Update CHANGES
2020-09-24 vasniktel spirv-fuzz: Support dead blocks in TransformationAddSynonym (#3832)
2020-09-24 vasniktel spirv-fuzz: Move IRContext parameter into constructor (#3837)
2020-09-24 Simran-B Add missing backticks around <result-id> (#3840)
2020-09-23 rharrison Validate SPIRV Version number when parsing binary header (#3834)
2020-09-23 stefanomil spirv-fuzz: Create synonym of int constant using a loop (#3790)
2020-09-22 58573781+richard-lunarg Fix compiler error on macOS with XCode12 (#3836)
2020-09-22 vasniktel spirv-fuzz: Handle OpPhis in TransformationInlineFunction (#3833)
2020-09-22 stevenperron Update CHANGES
2020-09-22 afdx spirv-fuzz: Refactor fuzzer, replayer and shrinker (#3818)

Created with:
  roll-dep third_party/SPIRV-Tools

Bug: chromium:1153258

Change-Id: I3502579aa3b334a7addaac148e6ec3a8e636150b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34141
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-27 15:36:57 +00:00
Austin Eng 303c5c2d29 Update RenderPassTests to use WGSL
Bug: dawn:572
Change-Id: I4a892249dfcb1b1badffd8fb7bd6e509eb654234
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33767
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 15:36:56 +00:00
Austin Eng d7f4e808e7 Update RenderBundleTests to use WGSL
Bug: dawn:572
Change-Id: Ide2ec5c70cc4f0abe8374bd9262ef9da02c9a4ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33881
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 15:36:26 +00:00
Austin Eng a3e7e69dd7 Update IndexFormatTests to use WGSL
Bug: dawn:572
Change-Id: I7d4647cd90416f07596e86dda71e43db43fffff4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33766
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 15:34:16 +00:00
Corentin Wallez fe22ba525d Port BindGroupValidationTests to WGSL
Bug: dawn:572
Change-Id: Ifccb349e756c5b2ca9f8ce2ab64f431d53856e6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33823
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2020-11-26 15:23:56 +00:00
Corentin Wallez 218a3d71c3 Port GetBindGroupLayoutValidationTests to WGSL
Bug: dawn:572
Change-Id: I132644a2dc9efecaacf7a7a23818d5eba8bc4ded
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33927
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 15:05:36 +00:00
Austin Eng b92c375560 Update DestroyTests to use WGSL
Bug: dawn:572
Change-Id: Ia4ffacad9740fc49aac4333a6e7a1a83a5002491
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33762
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:55:55 +00:00
Austin Eng 69afcb41e7 Update SamplerTests to use WGSL
Bug: dawn:572
Change-Id: I008d142c61a09e5453cb51e38b1dfaee17a4e81a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33882
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:41:55 +00:00
Corentin Wallez db197d7b6f Partially port StorageTextureValidationTests to WGSL
The rest of the port is blocked on support for the textureStore
intrinsic to write to storage textures.

Bug: dawn:572
Change-Id: I6b719642522080842cc1ae297546ffc4fda86a11
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33935
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:33:15 +00:00
Corentin Wallez 419f102f4d Port RenderPipelineValidationTests to WGSL
Bug: dawn:572
Change-Id: I0306c51c1e141f9e1452d2c1e8d688c014af2d78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33929
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 13:28:45 +00:00
Corentin Wallez de56b07e61 Port VertexBufferValidationTests to WGSL
Bug: dawn:572
Change-Id: I5e626b4e8784cd87f2e29c0cb232f21447958865
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33934
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 13:24:36 +00:00
Austin Eng 21c1e5f623 Update DeviceLostTests to use WGSL
Bug: dawn:572
Change-Id: I0555f88baa42c6fdd236478ab2ad4d7ba59448ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33763
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:23:55 +00:00
Austin Eng 225074a74a Update TextureSubresourceTests to use WGSL
Bug: dawn:572
Change-Id: I7a008c4c52c7e42cd73c4591854f8910d1a04dc7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33769
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:22:15 +00:00
Austin Eng 4f5cfd2319 Update IOSurfaceWrappingTests to use WGSL
Bug: dawn:572
Change-Id: I806873e1b2af2c5582e49c47592f891ec69146e6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33772
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:10:16 +00:00
Austin Eng 1dc64736c4 Update Draw(Indexed)?(Indirect)?Tests to use WGSL
Bug: dawn:572
Change-Id: I8c5e89588d0794e7716d0e8db76634ffa477bf78
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33764
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 13:05:35 +00:00
Corentin Wallez e433709e6e Port ComputeIndirectValidationTests to WGSL
Bug: dawn:572
Change-Id: I0db11c2416ca430b026cd2293061e99d35b18973
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33924
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 12:57:45 +00:00
Corentin Wallez 261d261fd1 Port ResourceUsageTrackingTests to WGSL
Bug: dawn:572
Change-Id: I945aa6720a4dd1cacb4b2a74d40482ffadde5b55
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33930
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:56:45 +00:00
Austin Eng 6edd993c47 Update SwapChainValidationTests to use WGSL
Bug: dawn:572
Change-Id: I30fbe6930bee0badc9ce36d16f3fc43f4d4f6731
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33883
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2020-11-26 12:43:15 +00:00
Corentin Wallez 435da1c2dc Port VertexStateValidationTests to WGSL
Bug: dawn:572
Change-Id: I904f032125797de53d4e85f8670ea36887749ac8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33933
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:30:37 +00:00
Corentin Wallez 7e8c35df46 Port DrawIndirectValidationTests to WGSL
Bug: dawn:572
Change-Id: Ifb434a262c8ccc563e22afae4378c53aa9aecdca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33925
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:25:15 +00:00
Corentin Wallez 41c0874c3b Port ShaderModuleValidationTests to WGSL
Bug: dawn:572
Change-Id: I112a8f5805e6b673aa51ac00d2471a74c4a5ea92
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33931
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:23:45 +00:00
Corentin Wallez 71279dcde7 Port UnsafeAPIValidationTests to WGSL
Bug: dawn:572
Change-Id: I5d86e36d3bfc29c0f27e64aa86b0a662e490f1e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33932
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:22:55 +00:00
Corentin Wallez 8fc755b716 Port IndexBufferValidationTests to WGSL
Bug: dawn:572
Change-Id: If9deb74d334d0f2d5fbc7f78b6ceb646beb45826
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33926
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 12:22:35 +00:00
Corentin Wallez b7eb1e15fa Port RenderBundleValidationTests to WGSL
Bug: dawn:572
Change-Id: Id71f2d49c60238939c70bb1d7c93a45b25ca3dcb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33928
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2020-11-26 11:30:55 +00:00
Austin Eng 9175f00eec Update WGSL vertex_idx i32 -> u32
Bug: dawn:572
Change-Id: I7d477481d06ffdfde6590c2297f2c3f5e704b044
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34000
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-26 00:02:35 +00:00
Austin Eng 2b606e9297 Unify WGSL syntax to put stage decoration on same line
Bug: dawn:572
Change-Id: Ic7baba88bcff9cdb42e0507be58f84c824b62d25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33980
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2020-11-25 17:31:15 +00:00
Stephen White d45ab07775 Enable testing on GLES backend.
Add support for the OpenGL ES backend to DawnTest.
Enable its use in BasicTests.

BUG=dawn:580

Change-Id: I920f3a8107928d3ecd5b1506fde5242bec4eef31
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33861
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2020-11-25 16:45:04 +00:00
Corentin Wallez a66263753a dawn_native: Make CreateView's descriptor default to nullptr
This matches the defaults of webgpu.h and allows its use from inside
dawn_native for the implementations of SwapChain.

Bug: dawn:269
Change-Id: Icfe15f1775e78690fe4fb7b871bd0c0365d444e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33783
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-25 09:39:44 +00:00
Corentin Wallez ce74d8256e Improve the dynamic binding OOB error message when binding.size is defaulted.
A common error when using dynamic offset bindings is to forget to set
the size of the binding, which causes all offsets != 0 to produce an
error. Make the error more explicit when that happens to guide
developers.

Bug: dawn:583
Change-Id: I38a5dfaf3f6756765c7e50cd470ac205b567d00c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33784
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-25 09:16:14 +00:00
Corentin Wallez 441f10a4db Remove deprecated BindGroupLayout options.
Bug: dawn:527
Change-Id: I169dd0b80b006a326f5d8f121a49de6d6ac7b768
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32024
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-25 08:57:44 +00:00
Corentin Wallez 5fad85bbd9 Remove deprecated SetIndexBuffer (without format).
This also simplifies a bunch of code in backends that was used to handle
getting the indexFormat from the pipeline "late".

Bug: dawn:502

Change-Id: Ibae50c8df21323fd391515f6036552e9fb868d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32023
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2020-11-25 08:54:14 +00:00