Commit Graph

3838 Commits

Author SHA1 Message Date
Austin Eng bffc966f17 Add wgpuDeviceGetLimits. Split Required/Supported limit structs
Bug: dawn:685
Change-Id: Ibb5dd0479f5e887d4b2ca864c014ebaafb674dba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64443
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-09-17 15:36:00 +00:00
Jiawei Shao 4ecfc58777 D3D12: Support creating render pipeline asynchronously
This patch implements the asynchronous path of CreateRenderPipelineAsync
on D3D12 backend.
1. Call the constructor of dawn_native::d3d12::RenderPipeline in main
   thread.
2. Execute dawn_native::RenderPipelineBase::Initialize() (a virtual function)
   asynchronously.
3. Ensure every operation in dawn_native::d3d12::RenderPipeline::Initialize()
   is thread-safe.
4. Save all the return values (pipeline object or error message, userdata, etc)
   in a CreateRenderPipelineAsyncWaitableCallbackTask object and insert this
   callback task into CallbackTaskManager.
5. In Callback.Finish():
- Insert the pipeline object into the pipeline cache if necessary
- Call WGPUCreateRenderPipelineAsyncCallback

This patch also removes FlatRenderPipelineDescriptor as it is not needed
right now.

BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I7fd30339ab7bea599c483dea4bd1100359982409
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64440
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-17 07:39:00 +00:00
Shrek Shao 110cac1d09 Add buffer_mapping.md in docs
Make a md doc placeholder for buffer mapping.
Linking the google doc now.

Change-Id: I085e10474148fdb2a710655cc5115f8fc2b4b5b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64523
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2021-09-17 01:50:00 +00:00
Dawn Autoroller 9a827cbe7e Roll Tint from d1d99bc7de to dad26395d8 (1 revision)
https://dawn.googlesource.com/tint.git/+log/d1d99bc7dec1..dad26395d829

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 shrekshao@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: shrekshao@google.com
Change-Id: If68a171d3e3699c84234cbd9461506fa3bb3cd52
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64441
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-16 14:35:16 +00:00
jchen10 b166b99f86 Treat 'mipLevelCount == 0' as error
It's no longer a valid default value.

Bug: dawn:1026

Change-Id: I9de656f29c8b7673de412cef35dcfb8a45121ac7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64165
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
2021-09-16 05:29:44 +00:00
Jiawei Shao 8626b2142d Disable the workaround about the T2T copy issue on newer Intel drivers
This patch disables the workaround about the T2T copy issue (the Toggle
UseTempBufferInSmallFormatTextureToTextureCopyFromGreaterToLessMipLevel)
on the latest Intel Gen9 and Gen9.5 D3D driver (30.0.100.9864) which
contains the fix for this issue.

BUG=chromium:1161355
TEST=dawn_end2end_tests

Change-Id: I6e62b95d1cb92358482356901c541df02998a764
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64280
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-09-16 01:11:01 +00:00
Dawn Autoroller b2223e7ff6 Roll Tint from 6556ba0e94 to d1d99bc7de (1 revision)
https://dawn.googlesource.com/tint.git/+log/6556ba0e94d7..d1d99bc7dec1

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 shrekshao@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: shrekshao@google.com
Change-Id: I5368638fcd5c50473a2cb9f49793b777b3e1b85e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64360
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-15 19:53:30 +00:00
Shrek Shao 2f8f2518e5 Revert "Added Abseil as a third-party dependency"
This reverts commit 020d69905e.

Reason for revert: Causing Dawn Skia roll build fails

https://task-scheduler.skia.org/job/AZXXBm9h9ozj3kKiRJM5

Original change's description:
> Added Abseil as a third-party dependency
>
> Using the version in the Chromium repo in order to make use of the .gn
> files it contains.
>
> Doing so also appears to require us to switch where we pull googletest
> from so that the directory structure matches what the Abseil build
> config expects. Fortunately this doesn't seem to cause issues in our
> tests.
>
> Bug: dawn:563
> Change-Id: I55831ad33f282b3d8b03b67826fd2776e5602d89
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63780
> Reviewed-by: Austin Eng <enga@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
> Auto-Submit: Brandon Jones <bajones@chromium.org>

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

Bug: dawn:563
Change-Id: I0fc4e5fc73ab9b0887591135ec01adde990edd6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64361
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2021-09-15 19:22:19 +00:00
Ken Rockot 4646de90be Support flattening multiple CommandAllocators
This introduces CommandAllocator::AcquireCommandBlocks, which accepts a
vector of CommandAllocators and flattens them into a single iterable
sequence of commands. To support this, CommandAllocator is made movable.

Bug: dawn:809
Change-Id: I3984c243e4bd74568eccba1a8a58ec26324c8ffa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63822
Commit-Queue: Ken Rockot <rockot@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-15 18:29:00 +00:00
Austin Eng 5528d0edd2 Metal: Allocate threadgroup memory based on Tint reflection
Tint passes threadgroup memory in MSL as entrypoint arguments since
threadgroup memory at the module scope cannot be default initialized.
MSL lacks default constructors for matrices in threadgroup memory.

Bug: dawn:1110
Change-Id: I7462fa448c6ebdb3cc4dc24bd5ff0a99287cdba0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64240
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-09-15 18:16:50 +00:00
Corentin Wallez 49d794fbcc Use IterateBitSet in AddVertexPullingPass
BUG=dawn:529
Change-Id: Ibc05ee56f79c967b6dc8e08303ad726aff83c7a2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64300
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-09-15 15:35:43 +00:00
Dawn Autoroller c4a462a2ff Roll Tint from 7f4d02c7ab to 6556ba0e94 (1 revision)
https://dawn.googlesource.com/tint.git/+log/7f4d02c7aba7..6556ba0e94d7

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 shrekshao@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: shrekshao@google.com
Change-Id: If00bacacc223368c8930859e5cdbd0dd55ba280b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64260
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-15 06:51:32 +00:00
jchen10 4935c14eec Use WGPU_MIP_LEVEL_COUNT_UNDEFINED instead of 0
The follow up CL will remove 0.

Bug: dawn:1026
Change-Id: Ida62f8d8b0dd8f9722e40f3f95366d3db0c7ab52
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64164
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
2021-09-15 06:27:25 +00:00
Zhaoming Jiang 857d4e62e3 Support vertex-only render pipeline
Support vertex-only render pipeline on D3D12, Vulkan, Metal, OpenGL
and OpenGL ES backends. Related validation tests and end to end tests
are also implemented.

Bug: dawn:136
Change-Id: If266fd441c1d39ccd940ea26b74b405f8abb351a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63080
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-15 03:17:42 +00:00
Jiawei Shao 43ce892284 Remove descriptor in RenderPipeline::Initialize
This patch removes the parameter "descriptor" from the function
RenderPipeline::Initialize() on D3D12, Metal and Vulkan backends as
a preparation of creating render pipeline asynchronously.

BUG=dawn:529

Change-Id: I6bdd74ad0af6a1924fac3703908cd5f66b75994b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64163
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-09-15 01:41:42 +00:00
Jiawei Shao 24cad6e2c3 Metal: Remove vertexState in the parameter of TranslateToMSL
This patch removes the parameter "vertexState" from TranslateToMSL
and ShaderModule::CreateFunction as we have already been able to
get the vertex states from the RenderPipelineBase object.

BUG=dawn:529

Change-Id: I2971438bfd5e0f3fbea900e1f06c1b33349571da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64140
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-09-15 01:28:23 +00:00
Brandon Jones 020d69905e Added Abseil as a third-party dependency
Using the version in the Chromium repo in order to make use of the .gn
files it contains.

Doing so also appears to require us to switch where we pull googletest
from so that the directory structure matches what the Abseil build
config expects. Fortunately this doesn't seem to cause issues in our
tests.

Bug: dawn:563
Change-Id: I55831ad33f282b3d8b03b67826fd2776e5602d89
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63780
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Brandon Jones <bajones@chromium.org>
2021-09-14 16:56:15 +00:00
François Beaufort 088071a5a7 Add device ID and vendor ID to device properties
This CL adds device ID and vendor ID to device properties so that WebGPU
can access it to help populate GPUAdapter.name.

Bug: chromium:1231163
Change-Id: I460e5a72ffba350f88d2649789a61eaea9670135
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64180
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
2021-09-14 16:15:35 +00:00
Corentin Wallez 77755b9f55 Remove deprecated wgpu::StoreOp::Clear
Bug: dawn:937
Change-Id: I80cdb3b6b3caecc83a6e8cc009bb494179808cd9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63742
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-14 16:02:00 +00:00
Corentin Wallez e2cc5d624a Remove deprecated texture usage names
Bug: dawn:22
Change-Id: I1cad029d32059919d02e27f39905a1c6bfbcda42
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63744
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-14 13:14:25 +00:00
Corentin Wallez c7203ba890 Remove deprecated ComputePipelineDescriptor.computeStage
Bug: dawn:800
Change-Id: I8d9d2a7cdba328d1cf040f7c8c622d1d7d403be2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63741
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-14 11:42:27 +00:00
Corentin Wallez 1ac4565115 Remove deprecated RenderPass*Attachment.attachment
Bug: dawn:762
Change-Id: I86144f77ffd647d2e5c01742fb67367c7a5c914e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63382
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-14 10:42:22 +00:00
jchen10 96ac969a33 Use WGPU_ARRAY_LAYER_COUNT_UNDEFINED instead of 0
This seperates the undefined 'arrayLayerCount' from 0 to
WGPU_ARRAY_LAYER_COUNT_UNDEFINED. So 0 arrayLayerCount is treated
as a validation error.

Bug: dawn:1026
Change-Id: I7b4ae024b02ac0d2aa260b2a8c64b09bd967db87
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63660
Reviewed-by: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
2021-09-14 02:41:49 +00:00
Dawn Autoroller 817ba17d4c Roll Tint from de767b1842 to 7f4d02c7ab (2 revisions)
https://dawn.googlesource.com/tint.git/+log/de767b18421c..7f4d02c7aba7

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 shrekshao@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: shrekshao@google.com
Change-Id: Ie48579b9c5b7bf4539b10e73fde86a9263e02030
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64162
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-14 01:37:49 +00:00
Brandon Jones 1934e56159 Disable multiple mip levels for r8/rg8unorm textures on Metal
Bug: dawn:1071
Change-Id: I2cc9173f0dff325e4bb2583bb27a98bbaaa61531
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63462
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-14 00:54:59 +00:00
Dawn Autoroller 3074cc1729 Roll Tint from f66f651374 to de767b1842 (6 revisions)
https://dawn.googlesource.com/tint.git/+log/f66f65137448..de767b18421c

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 shrekshao@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: shrekshao@google.com
Change-Id: I8a449ad58bbe554a0f74e887ae1be60080824bae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64161
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-13 20:48:21 +00:00
Brian Sheedy cc3f16c437 Suppress Mac 11.5 failure
Suppresses LoadOpClearIntegerFormatsToLargeValues on Mac 11.5 with
Metal on Intel GPUs.

Bug: dawn:1109

Change-Id: Ia4316ee00ad790752fa3b5d1778d885c5eb3a188
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64160
Commit-Queue: Brian Sheedy <bsheedy@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Brian Sheedy <bsheedy@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-13 20:35:49 +00:00
Austin Eng 02fbf168e0 Add validation, storage, and querying of limits
Adds a way to store the limits on the Adapter and the
Device. For now, adapter limits are always the default
limits, and device limits are stored but not used.

This CL also adds usage of an ErrorObjectIdResolver and
Provider in the WGPUDeviceProperties serialization and
deserialization helpers. Serializing/deserializing this
struct should never have objects.

Bug: dawn:685
Change-Id: I1479b4407b0f9ec9f9b2bff62cad7caa693c99d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63983
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-13 18:49:09 +00:00
Bryan Bernhart caf6e8b3f0 Disable remap binding test on WARP.
Adds a supression to the failing test.

BUG=dawn:1106

Change-Id: Ib0cfd49b6d1af59c60d7bc4f2e3e1bec5ae80601
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64062
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2021-09-13 17:27:29 +00:00
Dawn Autoroller 7e9aba8eef Roll Tint from 2ebcb93cb3 to f66f651374 (1 revision)
https://dawn.googlesource.com/tint.git/+log/2ebcb93cb36c..f66f65137448

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 shrekshao@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: shrekshao@google.com
Change-Id: Ica990c32bbe9a3b0d35df2fe1ccb855ce9691ce3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64141
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-13 15:51:29 +00:00
Jiawei Shao 42448dafb4 Remove descriptor from the parameter of ComputePipeline::Initialize()
This patch removes the parameter "descriptor" in the function
ComputePipeline::Initialize() so that we don't need to define
FlatComputePipelineDescriptor right now.

For render pipeline, as descriptor->vertex is being used for vertex
pulling (passed into vertexModule->CreateFunction()), we will first
refactor the related code in vertex pulling before removing the
parameter "descriptor" in the function RenderPipeline::Initialize().

BUG=dawn:529

Change-Id: Ib172ac0c76fa24070e78c0e57c3262acad9399b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-09-11 09:04:34 +00:00
Michael Tang b21ccebac8 D3D12: Use a separate space for the index offset constants
Tint's HLSL writer can now map sets to spaces, so we can use a dedicated
space  and register to store the index offset constants. Currently, we
use the first space (0) and find a free unused register.

Bug: dawn:1103
Change-Id: Ie1fe95ec314097baf0e0952a0c78222cad493c95
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63223
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Michael Tang <tangm@microsoft.com>
2021-09-10 23:16:33 +00:00
Austin Eng 2092a66ab5 dawn_native: Add RequestDevice to the Adapter
Adds a basic RequestDevice method to the adapter, only in
dawn_native. We will revisit this when we implement adapters
in dawn_wire.

RequestDevice allows us to have tests of the limit bounds
because it receives a callback which can return status codes
and error messages.

Bug: dawn:685
Change-Id: I7a68922b078c6a436f49a16346cb41fb9df9cfee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63982
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-10 21:07:39 +00:00
Austin Eng dc7971ce58 dawn_wire: Support deserializing s->c chained structs
Chained structs *may* contain objects which means
deserialization may need an ObjectIdResolver.
However, in practice, we never need to send chained
structs from the server to the client that contain objects for
a valid command.

The one upcoming need for chained server->client structs is to
serialize limit structs.

Because limit structs never need objects, we provide a dummy
implementation of the ObjectIdResolver which always yields an error.
An analogous change is done for ObjectIdProvider.
These classes will be used in a follow-up CL.

Bug: dawn:685
Change-Id: I1c0f3f2d080377f2e1a77bc6e896f24d3d9ab931
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63981
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-09-10 20:36:20 +00:00
Corentin Wallez 8ee643c9d0 Remove suppression for fixed Tint issue
Bug: tint:449
Change-Id: I7a1ee41bbd149c211096d0ce84c35ab8a0f937f9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63745
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-10 17:46:29 +00:00
Dawn Autoroller 7c8684a8e3 Roll Tint from ebab7d2f7a to 2ebcb93cb3 (1 revision)
https://dawn.googlesource.com/tint.git/+log/ebab7d2f7a7e..2ebcb93cb36c

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 bajones@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: bajones@google.com
Change-Id: I83a4c3a3c43fa117ed99fcfd43abe759357610cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64002
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-10 16:16:49 +00:00
Bryan Bernhart d9331035a6 Skip failing CopyTexture tests on WARP
BUG=dawn:1104

Change-Id: Ie4e870fd182bcf5ec0a0007317705a0555a76e0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63980
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2021-09-10 16:09:19 +00:00
Corentin Wallez 363c28e5d1 Remove typedefs for deprecated types.
Bug: dawn:762
Change-Id: I1581d80898d4a98010bb14c5823a1a343c229664
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63383
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@google.com>
Reviewed-by: Brandon Jones <bajones@google.com>
2021-09-10 15:50:19 +00:00
Corentin Wallez d4b85fbd76 Lift suppression for incorrect VVL image layout tracking
Fixed: dawn:785
Change-Id: I618d2d44c02ae5e256841392cb2359f3992e32dc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64020
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@google.com>
Commit-Queue: Brandon Jones <bajones@google.com>
2021-09-10 15:02:24 +00:00
Corentin Wallez 7a446220a1 Reenable / delete DISABLED tests.
- We use Tint unconditionally so binding reflection is now correct.
 - WGSL disallows textureSampleCompare in compute shaders and is not
   likely to change.
 - We now support reading back stencil in tests.

Bug: dawn:439, dawn:667, dawn:216, dawn:704
Change-Id: I7ba0026bb906ce985abb495581b56977da7be2da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63680
Reviewed-by: Brandon Jones <bajones@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-09-10 14:56:09 +00:00
Maksim Sisov 08949a3fe7 rename use_x11 to ozone_platform_x11
Ozone is default now in Chromium and non-Ozone/X11 (aka use_x11) is
deprecated. During the transition period use_x11 == ozone_platform_x11.

Bug: c/1096425
Change-Id: Iaec1bd171423936f5a1817fae08a72079faf16fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63840
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
2021-09-10 06:08:41 +00:00
Jiawei Shao 6fa50b5e6c Vulkan: Support extension "depth_clamp"
This patch implements the extension "depth_clamp" on Vulkan, which
we need to test if we can correctly record "PrimitiveDepthClampingState"
in FlatRenderPipelineDescriptor - Currently FlatRenderPipelineDescriptor
fails to record this because we incorrectly ignore all the members in
"nextInChain".

BUG=dawn:529, dawn:716
TEST=dawn_end2end_tests

Change-Id: Iec407245a3f37d10a3d1428b0612f0e18e80c616
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63820
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-09-10 01:33:41 +00:00
James Price 6e1f01f32b metal: Use single-entry point transform
We only remap bindings for the target entry point, so we need to strip
all other entry points to avoid generating invalid bindings for them.

Bug: tint:1170
Change-Id: Ia1a73601e8d620341fb4f7170dfa856632a04245
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63880
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-09 20:40:31 +00:00
Dawn Autoroller 3bc6716a77 Roll Tint from 25517e9ce8 to ebab7d2f7a (2 revisions)
https://dawn.googlesource.com/tint.git/+log/25517e9ce811..ebab7d2f7a7e

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 bajones@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: bajones@google.com
Change-Id: Id5a005b422d6c23fe7658f6a3a654b04803e0e32
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63861
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-09 19:44:11 +00:00
Dawn Autoroller fd815c15ce Roll Tint from 733addc20f to 25517e9ce8 (1 revision)
https://dawn.googlesource.com/tint.git/+log/733addc20fbf..25517e9ce811

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 bajones@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: bajones@google.com
Change-Id: I1bf2ebfe9f84aff3bcadbe252275acb50e07152c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63860
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-09 14:05:01 +00:00
Dawn Autoroller 053b58cd29 Roll Tint from 5910ec1e8a to 733addc20f (1 revision)
https://dawn.googlesource.com/tint.git/+log/5910ec1e8afc..733addc20fbf

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 bajones@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: bajones@google.com
Change-Id: I490ff195f9f7e5a1c4262ede68827d91a3606c6c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63761
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-09 01:13:00 +00:00
Jiawei Shao d7ddfb4a91 Add FlatRenderPipelineDescriptor for CreateRenderPipelineAsync
This patch implements the struct FlatRenderPipelineDescriptor to
save all the pointer members of RenderPipelineDescriptor in
CreateRenderPipelineAsync so that the render pipeline descriptor
is always valid when the render pipeline is created asynchronously.

BUG=dawn:529
TEST=dawn_end2end_tests

Change-Id: I99e06581f84c52d484f877ba29e8cc1ca50d68b2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63368
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-09-09 00:59:29 +00:00
Dawn Autoroller f9d2873ef9 Roll Tint from be514a1efb to 5910ec1e8a (2 revisions)
https://dawn.googlesource.com/tint.git/+log/be514a1efb00..5910ec1e8afc

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 bajones@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: bajones@google.com
Change-Id: I4608010eb83ad2ec99876b8fda92216544926786
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63760
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-08 20:23:10 +00:00
Dawn Autoroller dc27ecce5b Roll Tint from 676ec7cf99 to be514a1efb (1 revision)
https://dawn.googlesource.com/tint.git/+log/676ec7cf9964..be514a1efb00

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 bajones@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Dawn: https://bugs.chromium.org/p/dawn/issues/entry

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/main/autoroll/README.md

Bug: None
Tbr: bajones@google.com
Change-Id: I3e0f91fdaddf6d243fd75e7ff1e13cdae134d7d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63720
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-09-08 14:39:18 +00:00
Zhaoming Jiang c6140d5c95 Initializing stencil reference for render pass in D3D12
When creating a new render pass in D3D12, call the OMSetStencilRef
to set the stencil reference value to zero.

Bug: dawn:1097
Change-Id: I5dd94691b1b354b601c06a02d3d5fa619d8b58ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63360
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-09-08 02:21:33 +00:00