Commit Graph

4265 Commits

Author SHA1 Message Date
Dawn Autoroller 0ac48eb9a4 Roll Tint from 6761160dc1 to 5c243f824c (1 revision)
https://dawn.googlesource.com/tint.git/+log/6761160dc149..5c243f824c59

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 sarahmashay@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: sarahmashay@google.com
Change-Id: I3c3613d1b6c2f2312be258aee346d859e78d1f86
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38560
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-22 20:28: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
Dawn Autoroller b5cfe3a774 Roll Tint from afb8cfb254 to 6761160dc1 (7 revisions)
https://dawn.googlesource.com/tint.git/+log/afb8cfb2544b..6761160dc149

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 sarahmashay@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: sarahmashay@google.com
Change-Id: Ib6ad9830421856ab75cbcc08b35cd730ac1557dd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38420
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-21 19:59:52 +00:00
Austin Eng 8ac8a2f5f1 Add cron-linux-clang-rel-x64 for running cron jobs on CI
This bot will be used to regenerate the fuzzer seed corpus
periodically.

Bug: dawn:629
Change-Id: I9036690b85cfe602188aa891a32f03923b797463
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38321
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-01-21 19:20:32 +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
Dawn Autoroller 774f601db4 Roll Tint from ed14524b1e to afb8cfb254 (1 revision)
https://dawn.googlesource.com/tint.git/+log/ed14524b1e81..afb8cfb2544b

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 sarahmashay@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: sarahmashay@google.com
Change-Id: I827fe6b7c046ab633939a449594c57e0c5e2844b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38300
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-20 19:45: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
Dawn Autoroller b830da7d6e Roll Tint from d7335fa974 to ed14524b1e (6 revisions)
https://dawn.googlesource.com/tint.git/+log/d7335fa97495..ed14524b1e81

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 sarahmashay@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: sarahmashay@google.com
Change-Id: Id247dbfea7b781f587f4f20e3016e5629b49e9ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38181
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-19 18:55: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
Dawn Autoroller e45593cb08 Roll Tint from 4a110c2726 to d7335fa974 (1 revision)
https://dawn.googlesource.com/tint.git/+log/4a110c2726e9..d7335fa97495

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 sarahmashay@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: sarahmashay@google.com
Change-Id: I8e594fca8198182c0f9b981a6905ff67ac150a06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38121
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-18 18:33:47 +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
Dawn Autoroller 4b316994ad Roll Tint from c068cfc139 to 4a110c2726 (1 revision)
https://dawn.googlesource.com/tint.git/+log/c068cfc1397a..4a110c2726e9

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 sarahmashay@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: sarahmashay@google.com
Change-Id: I0c9b07ed903586d719013f272770f0da70be7f1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38120
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-18 15:56:37 +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
Dawn Autoroller 04772515a8 Roll Tint from 0a68b365eb to c068cfc139 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/0a68b365ebff..c068cfc1397a

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: Ibacfdd3197ba175a9df33c53b19cce11b1b3ebba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38060
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-15 18:54:59 +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
Dawn Autoroller 5a6fda1a6f Roll Tint from 0f4638b9e4 to 0a68b365eb (4 revisions)
https://dawn.googlesource.com/tint.git/+log/0f4638b9e499..0a68b365ebff

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: Iab00fe3b70c56f34b2267f1fc8ba59096149cdae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37863
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-14 18:39:17 +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
Dawn Autoroller d2fb128052 Roll Tint from a7b52e33d5 to 0f4638b9e4 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/a7b52e33d5e8..0f4638b9e499

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: I0a887ffb42ccb84608d594812546c42c725efcc4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37862
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-14 16:53:36 +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
Dawn Autoroller 3c2e5afd95 Roll Tint from 904c5b9621 to a7b52e33d5 (3 revisions)
https://dawn.googlesource.com/tint.git/+log/904c5b9621da..a7b52e33d5e8

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: Ifaec3e160b0dd723bd33c1bcb0d18c0af98e837f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37861
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-01-14 14:47:16 +00:00