Commit Graph

3859 Commits

Author SHA1 Message Date
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
Dawn Autoroller 29f0bd7e6a Roll Tint from 05d9bffdbd to 5cfd4f5a07 (7 revisions)
https://dawn.googlesource.com/tint.git/+log/05d9bffdbda1..5cfd4f5a073e

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC rharrison@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: rharrison@google.com
Change-Id: I91d41c58a1eb66edbf6944c57877648fa2d8a71d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43560
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-02 13:17: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
Stephen White 9311824855 Roll third_party/angle/ f4cd17472..0e11e49d1 (443 commits; 2 trivial rolls)
f4cd17472a..0e11e49d19

$ git log f4cd17472..0e11e49d1 --date=short --no-merges --format='%ad %ae %s'
2021-03-01 angle-autoroll Roll SwiftShader from 349abccec8f7 to 106e01583a3a (2 revisions)
2021-03-01 angle-autoroll Roll Chromium from 61aec087e2f8 to 2a5fa9108962 (430 revisions)
2021-01-25 cnorthrop Capture/Replay: Support CaptureGetQueryObject
2021-02-27 ynovikov Fix Ozone backend build flags.
2021-02-26 ynovikov Add EGL_WINDOW_BIT to all Ozone configs' EGL_SURFACE_TYPE
2021-02-25 m.maiya Vulkan: Avoid using assign with BitSets
2021-01-29 shrekshao Reland "Workaround for Mac Intel drawArraysInstanced with first > 0"
2021-02-25 syoussefi Vulkan: Move SPIR-V validation function to common/
2021-02-25 m.maiya Vulkan: Check texture type before calling into feedbackloop check
2021-02-24 m.maiya Vulkan: No need to unmap buffer when adding to mInFlightBuffers
2021-02-25 stha09 GCC: add missing static constexpr member definition
2021-02-24 senorblanco Check that pixel store params are 0 for fastUnpack path on D3D.
2021-02-25 cnorthrop Capture/Replay: Add CubeMapArray support
2021-02-26 ynovikov Skip 3 SimpleStateChangeTestES31
2021-02-24 lubosz.sarnecki gles_ext_params: Implement CaptureGetTexLevelParameterivANGLE.
2021-02-17 ddavenport Query revision id for GPU devices
2021-02-24 lubosz.sarnecki gl_angle_ext: Add param groups to glGetTexLevelParameterivANGLE.
2021-02-26 angle-autoroll Roll vulkan-deps from 55434360b05d to 3ca55e802f5b (6 revisions)
2021-02-26 angle-autoroll Roll SwiftShader from 22186f076bf3 to 349abccec8f7 (6 revisions)
2021-02-26 angle-autoroll Roll Chromium from b90646417bd3 to 61aec087e2f8 (994 revisions)
2021-02-25 lubosz.sarnecki gl.xml: Annotate glDiscardFramebufferEXT with param groups.
2021-02-19 syoussefi Vulkan: Generate xfb support code in SPIR-V for emulation path
2021-02-22 ianelliott Vulkan: Add GPU memory report and analysis documentation
2021-02-24 ynovikov Cleanup EGLMakeCurrentPerfTest instantiation
2021-02-25 ynovikov Suppress 1 VulkanExternalImageTest on Linux AMD Vulkan
2021-02-25 lubosz.sarnecki gen_vk_internal_shaders: Don't include full path on Python 3.4+.
2021-02-24 m.maiya Vulkan: Handle vertex count and primitive mode error cases in TS
2021-02-24 m.maiya Vulkan: Shader support for EXT_shader_framebuffer_fetch_non_coherent
2021-02-23 syoussefi Vulkan: Fix missing visibility barrier for glReadPixels
2021-02-23 syoussefi Vulkan: Fix PBO read pixels with unaligned output pitch
2021-02-18 syoussefi Vulkan: Optimize glMemoryBarrier more
2021-02-23 cnorthrop Capture/Replay: Fix compressed texture level caching
2021-02-23 cnorthrop Docs: Update ANGLE trace creation steps
2021-02-20 amy.liu Fix crash of MultithreadingTest end2end tests.
2021-02-19 jmadill Stubs for OpenCL entry points.
2021-02-11 lubosz.sarnecki Remove redundant (c) from license headers.
2021-02-24 angle-autoroll Roll vulkan-deps from ca177df9b948 to 55434360b05d (16 revisions)
2021-02-24 angle-autoroll Roll Chromium from d163fd7c6905 to b90646417bd3 (481 revisions)
2021-02-18 syoussefi Add a test for sample after deferred clear
2021-02-17 syoussefi Vulkan: Don't break the render pass on dispatch calls
2021-02-18 syoussefi Remove incorrect memory barrier tests
2021-02-11 lubosz.sarnecki Add Collabora, Ltd. to AUTHORS and CONTRIBUTORS
2021-02-23 angle-autoroll Roll VK-GL-CTS from 1a524349f06b to 9cdde06fb38a (1 revision)
2021-02-22 syoussefi Assert valid when using SPIR-V ids
2021-02-12 lubosz.sarnecki capture_replay_tests: Fix repository path retrieval.
2021-02-11 lubosz.sarnecki Generators: Use fixed year in license headers.
2021-02-22 ynovikov Remove old Win x64 bots from CQ
2021-02-19 jmadill Clean up entry point generation script.
2021-02-23 angle-autoroll Roll SwiftShader from d85a7a27b272 to 22186f076bf3 (4 revisions)
2021-02-23 angle-autoroll Roll VK-GL-CTS from a075fac2c633 to 1a524349f06b (4 revisions)
(...)
2021-01-14 jmadill Revert "Vulkan: Prefer host cached memory for Buffers"
2021-01-12 natsu Update roll AOSP scripts to reflect vulkan-deps subdirectory
2021-01-12 timvp Fix call to getImageFormatFeatureBits() in SurfaceVk.cpp
2021-01-14 angle-autoroll Roll SwiftShader from 3549479dc4cc to 5255c465bbba (6 revisions)
2021-01-14 angle-autoroll Roll vulkan-deps from 50bcbaad4cbf to 5869a809d551 (4 revisions)
2021-01-14 angle-autoroll Roll Chromium from 451c64aaec04 to fabc0b0b129a (518 revisions)
2020-08-06 sunnyps Support importing NV12/P010/P016 D3D textures as EGLImage
2021-01-13 ynovikov Don't build angle_end2end_tests_mac_sources on iOS
2021-01-11 m.maiya Allow attributes and uniforms to have the same name
2021-01-13 jmadill infra: Fix win-trace-rel bot typo.
2020-12-30 jmadill Program: Support multiple varying packings.
2021-01-12 cnorthrop Capture/Replay: Add DrawBuffer state to MEC
2021-01-12 jmadill Test Runner: Add a slow tests list.
2021-01-12 jmadill Remove Sleep() from PrimitivesWrittenAndGenerated test.
2021-01-13 jmadill infra: Fixes for config.
2021-01-13 jwata Use CAS in scripts/trigger.py
2021-01-12 jmadill Add configuration for trace test bots.
2021-01-13 angle-autoroll Roll vulkan-deps from e59ae1af7571 to 50bcbaad4cbf (7 revisions)
2021-01-13 angle-autoroll Roll Chromium from 2a7e78c75a37 to 451c64aaec04 (494 revisions)
2021-01-12 cnorthrop State: Provide reference to image unit binding vector
2021-01-12 jmadill Vulkan: Add YUV G8_B8_R8_3PLANE_420_UNORM format.
2020-12-02 cnorthrop Allow GL_OES_shader_image_atomic when non-conformant
2021-01-11 jmadill Vulkan: Index mandatory support table by ANGLE format.
2021-01-12 syoussefi Vulkan: Increment buffer view serials only when used
2021-01-11 syoussefi Vulkan: Notify ContextVk when UtilsVk binds compute pipelines
2021-01-12 angle-autoroll Roll SwiftShader from 348ba200aa29 to 3549479dc4cc (3 revisions)
2020-06-25 jonahr GL: Clean up Display code related to multithreading
2021-01-12 syoussefi Reland "Use is_apple instead of is_mac and is_ios everywhere"
2021-01-12 angle-autoroll Roll Chromium from 734de1a6b288 to 2a7e78c75a37 (67 revisions)
2021-01-12 angle-autoroll Roll Chromium from 193bb22c8c9d to 734de1a6b288 (311 revisions)
2021-01-08 natsu Default roll_aosp.sh to copy artifacts to vendor partition
2021-01-08 jmadill Vulkan: Use angle::FormatID instead of VkFormat.
2021-01-11 stha09 libstdc++: fix incomplete type for FramebufferCache
2020-11-04 vantablack Reland "Created test and fixed texture storage bug in d3d11"
2021-01-07 lfy Vulkan: Prefer host cached memory for Buffers
2021-01-11 ynovikov Fix iOS build
2021-01-11 ynovikov Enable building angle_white_box_tests on Fuchsia
2021-01-08 ianelliott dEQP: Avoid undefined right-shift behavior for GLhalf
2021-01-11 jmadill Remove obsolete build flag.
2021-01-11 angle-autoroll Roll Chromium from 29d2d6a2d436 to 193bb22c8c9d (106 revisions)
2021-01-11 angle-autoroll Roll vulkan-deps from e395b66ed41c to e59ae1af7571 (5 revisions)
2021-01-11 angle-autoroll Roll SwiftShader from 937395c1ed5d to 348ba200aa29 (6 revisions)
2021-01-11 angle-autoroll Roll Chromium from 28ecef438c2c to 29d2d6a2d436 (82 revisions)
2021-01-09 ynovikov Roll chromium_revision 1e679b773d..28ecef438c (841389:841845)
2021-01-08 syoussefi Revert "Use is_apple instead of is_mac and is_ios everywhere"
2020-12-30 timvp Tests: Add Saint Seiya Awakening: Knights of the Zodiac trace
2021-01-07 syoussefi Vulkan: Add a perf test for pre-rotation code injection
2021-01-08 syoussefi Fix translator fuzzer
2021-01-06 timvp Tests: Add World War Doh trace
2021-01-08 jmadill Add OWNERS info for Vulkan test utils.

Created with:
  roll-dep third_party/angle

Bug: dawn:447
Change-Id: I3653ae78cad4503d29cecad9a8c8184ef4eb25a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43420
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-01 18:39:20 +00:00
Dawn Autoroller 19f111f69c Roll Tint from e5c105d40a to 05d9bffdbd (5 revisions)
https://dawn.googlesource.com/tint.git/+log/e5c105d40a49..05d9bffdbda1

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC dsinclair@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: dsinclair@google.com
Change-Id: I1f7b80fab40434db510b8ca605ccaf951a089c56
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43405
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-03-01 09:05:20 +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
Dawn Autoroller 329c1c98fe Roll Tint from c1f7e90417 to e5c105d40a (2 revisions)
https://dawn.googlesource.com/tint.git/+log/c1f7e904176d..e5c105d40a49

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC dsinclair@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: dsinclair@google.com
Change-Id: I2fdd2068dfcc72ad5f1705b80bd8fc1333ba003b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42800
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-26 15:38:46 +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
Dawn Autoroller 545a6970cb Roll Tint from f8fa6cf43c to c1f7e90417 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/f8fa6cf43c02..c1f7e904176d

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC dsinclair@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: dsinclair@google.com
Change-Id: I62873f747dbe474b4777c293730306b4929c1194
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42681
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-25 15:06:01 +00:00
Dawn Autoroller d0488f8a37 Roll Tint from 80cb20de7c to f8fa6cf43c (1 revision)
https://dawn.googlesource.com/tint.git/+log/80cb20de7ca4..f8fa6cf43c02

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC dsinclair@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: dsinclair@google.com
Change-Id: I1bd5c6b639f3dee20bbe36305d607c03717f59a5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42680
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-25 14:15: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
Dawn Autoroller d87de3343a Roll Tint from eb496d0a4d to 80cb20de7c (3 revisions)
https://dawn.googlesource.com/tint.git/+log/eb496d0a4d51..80cb20de7ca4

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC dsinclair@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: dsinclair@google.com
Change-Id: I564ca9b68092a3b16f25fa829c70014355b46eec
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42480
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-24 21:44:50 +00:00
Austin Eng 5eb496b863 Add comment that memberLength for-loop cannot overflow
Bug: dawn:680
Change-Id: I8e256fed58651ff8eb3d7a3f8b30d3b1ef0b3dcd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42400
Auto-Submit: 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-02-24 18:39:31 +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
Stephen White e8d9843973 Set the default ANGLE backend to swiftshader for example code.
As was done for DawnTest, we should set ANGLE's default backend to
SwiftShader for the examples as well.

Bug: dawn:691
Change-Id: I6ced2ffbeed48a555e74a9373c52cbf9e1e3c708
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42301
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-02-24 16:53:53 +00:00
Dawn Autoroller 0d10a8f7f9 Roll Tint from 8b1851dbdc to eb496d0a4d (4 revisions)
https://dawn.googlesource.com/tint.git/+log/8b1851dbdc75..eb496d0a4d51

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC dsinclair@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: dsinclair@google.com
Change-Id: I16e7e21b0743c0c08831216de2d63fc3b784548c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42380
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-24 16:30:41 +00:00
Dawn Autoroller 018b9b917c Roll Tint from 00eb8dfa8b to 8b1851dbdc (4 revisions)
https://dawn.googlesource.com/tint.git/+log/00eb8dfa8bd9..8b1851dbdc75

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC dsinclair@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: dsinclair@google.com
Change-Id: I4f147903d77a00c7d4a7cb8ff8a2d3a3770262d1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42360
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-24 14:37:01 +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
Stephen White d67544797e Fix the ComputeBoids sample on the OpenGL backend.
Having the [[block]] decorator on the nested Particle struct causes
SPIRV-Cross to not emit it (see bug). Removing the decorator from
the Particle while leaving it on the top-level struct works fine.

This fixes the issue, but validation should be added to Tint
to catch the problem (this work is tracked in https://bugs.chromium.org/p/tint/issues/detail?id=320).

Bug: dawn:611
Change-Id: I8bef811e314ed758f805247977f8b129477abd39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42300
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-02-23 20:30:39 +00:00
Dawn Autoroller ab204c9d3d Roll Tint from 767df5f03b to 00eb8dfa8b (1 revision)
https://dawn.googlesource.com/tint.git/+log/767df5f03b97..00eb8dfa8bd9

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC dsinclair@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: dsinclair@google.com
Change-Id: Ie2ec82d7b531326ad30698bcf0b1b64b46f64586
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42280
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-23 16:50:59 +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
Dawn Autoroller 1258e245a9 Roll Tint from 4c4ceeea9d to 767df5f03b (4 revisions)
https://dawn.googlesource.com/tint.git/+log/4c4ceeea9d52..767df5f03b97

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/tint-dawn
Please CC enga@google.com on the revert to ensure that a human
is aware of the problem.

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/master/autoroll/README.md

Bug: None
Tbr: enga@google.com
Change-Id: I134262a9ededd2003b45fa6f63133917119f72f0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42160
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-02-19 23:52:43 +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