Commit Graph

2550 Commits

Author SHA1 Message Date
Corentin Wallez 0515e90cad Fix dawn_native/CMakeLists by removing commas
TBR=bajones@chromium.org
Bug: dawn:746
Change-Id: Iec075f2d75ca254d401e089f85d33e814a89adf3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46861
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-06 10:05:58 +00:00
Brandon Jones 6f2bbe9896 Implement GPUCompilationInfo
Implements the GPUCompilationInfo and GPUCompilationMessage interfaces,
adds the GPUCompilationMessageType enum, and adds the compilationInfo
method to GPUShaderModule.

BUG: dawn:746
Change-Id: Ied70cbbfedbf4890916ec076993714e5042f70e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46600
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-05 23:34:17 +00:00
Nico Weber 68c226db43 Better fix for DAWN_NO_DISCARD on WireResult
The attribute was just in the wrong place, I shouldn't have removed it
completely.

Bug: chromium:1195827
Change-Id: Iad2a5fdcc2e8bd76ddb82cc09cde62c3a57e3c54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46800
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-04-05 20:35:47 +00:00
Brian Ho 2cccd5a70c Add depth-clamping support for Metal
This CL adds depth clamping support to Metal by invoking
MTLRenderCommandEncoder::setDepthClipMode. I only implemented the
feature for the new-style of RenderPipelineDescriptor since the
old one seems to be deprecated.

Bug: dawn:716
Change-Id: Icd63c72294546042ae452360863a7f9c16b40f95
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45640
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-05 17:16:47 +00:00
Nico Weber cb0bdb3401 Remove an attribute that has no effect
Bug: chromium:1195827
Change-Id: Ifba15d3510765496d1eff720f98b0b2731429980
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46780
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-05 14:38:56 +00:00
Yan, Shaobo dc5d7a1dd9 CopyTextureForBrowser: Support Subrect Copy
This CL support subrect copy. Use scale/offset to copy from subrect of
source texture and viewport for copy to subrect of dstTexture.

BUG=dawn:465

Change-Id: Ice43c0da15f6d9526912879e2e734f6570f2d673
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46422
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
2021-04-05 13:32:07 +00:00
Brandon Jones f759264387 Finish conversion to RenderPipelineDescriptor2
Converts each of the native API backends to use RPD2 natively, started
converting the old format to the new one in the deprecated entry point,
removed all other handling and validation of the old format, and turned
on the deprecation warning.

BUG: dawn:642
Change-Id: I20b671960a83f65ecb4ce6ce1165a563025983cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46726
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-04-02 19:42:28 +00:00
Ryan Harrison 6a2e16bdd9 Split top-level reflection code into either Tint or SPIRV-Cross
Refactors the existing general reflection code to either use Tint or
SPIRV-Cross, depending on the backend being used and provided flags.

Tint is used when UseTintGenerator is enabled, otherwise SPIRV-Cross is
used.

For OpenGL, when Tint is used, additional reflection is performed using
SPIRV-Cross to support GLSL generation.

There still exists backend specific reflection that needs to be
implemented in Tint for the complete removal of SPIRV-Cross for
non-OpenGL when UseTintGenerator is enabled.

BUG=dawn:743

Change-Id: Ie77afa83a2c960b3c87a3419997a16f8392991fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46480
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2021-04-02 06:57:43 +00:00
Austin Eng 0a067f1ff9 Remove D3D12 live object reporting
This ends up incorrectly reporting live objects from previous CTS tests.
We should find a better way to call ReportLiveObjects, but doing so on
backend initialization is probably not the right time.

Bug: dawn:745
Change-Id: I9d0beb5f8b20af9c83f5e78f19630d5c78ef4da2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46721
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-02 06:52:33 +00:00
Corentin Wallez 5b196463be Remove unnecessary check for null TextureDescriptor.
Bug: None
Change-Id: I59904565c5cb3ec9e035c213d3b3baf3afd49ec3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46624
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
2021-04-02 06:38:53 +00:00
Yunchao He 3e8f3f9609 Implement 3D texture copy on D3D12 backend: copy to entire 3DTexture
This is the first patch to implement 3D texture copy. It starts with
implementation for 3D texture copy on D3D12 backend with the simplest
case: copy to the entire 3D texture. And texture's width is aligned
with 256 bytes.

The implementation for 3d texture copy might be inaccurate/incorrect
in some functions for complicated cases. But don't panic. The previous
implementation is also incorrect because many functions assumes that
we are copying to/from 2D textures only. And I will incrementally fix
the incorrect functions via upcoming tests for 3d texture copy.

BUG: dawn:547

Change-Id: I588b09fc8d0f0398e0798573415ba3a6a3f576fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45980
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-04-01 22:40:43 +00:00
Corentin Wallez 61fbb28547 Remove marking of CreatePipelineAsync as unsafe.
We are going to send another PSA about new APIs in Dawn/Chromium and
want developers to be able to use CreatePipelineAsync. The
implementation is safe, it just doesn't offload the work to a different
thread yet.

Bug: dawn:529
Change-Id: Ia093e46f8c3d389fd42eb5c1ad6b94ab8e64957b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46448
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-01 21:52:13 +00:00
Brandon Jones 0e92e9bf3c Add GPUExternalTexture Types
Adds GPUExternalTexture-related types, as well as
Device::ImportExternalTexture. Adds a basic unit and end2end test.

Bug: dawn:728
Change-Id: Iee9533eb872c493a089cccd500748f1a61457407
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46060
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
2021-04-01 20:46:42 +00:00
Bryan Bernhart a223e1f0c8 D3D12: Improve NV12 checkerboard test image.
Each quadrant now uses a unique color so
a test result failure can better indiciate any
unexpected sampling behavior.

BUG=dawn:733

Change-Id: If0e814956c1d686bdddcfb6de4dbf24f05d5a027
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46540
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2021-04-01 17:15:15 +00:00
Corentin Wallez e88bca946e SubresourceTrackingPerf: use the result of textureDimensions
This fixes a failure when use_tint_generator on D3D12, but also preps
the code for the future where WGSL requires that return values from
functions are used.

Bug: None
Change-Id: I6b8a5e0aef6550ef39d2972cdc510e05e4be3662
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46620
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-04-01 13:50:25 +00:00
Brandon Jones 3ceb65443c Create RenderPipeline blueprints w/ RenderPipelineDescriptor2
This is another incremental change towards using the new render
pipeline descriptor throughout the entire stack. Creates blueprints for
hashing with the new descriptor when provided before then converting it
to the old format for the native backend creation.

BUG: dawn:642
Change-Id: I1927b12fd02b2fedf25ef4428f07e339fa666715
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46541
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2021-04-01 01:28:52 +00:00
Yunchao He 4eb40c1849 Implement 3D texture copy: preparation
This is a preparation CL for 3D texture copy. It refactors texture
result comparison MACROs and their implementations, in order to
add texture result comparison for 3D texture. Prior to this change,
texture result comparison supports 1D/2D texture only.

BUG: dawn:547
Change-Id: Ia242356e05f4762e33a8278ec0d038b8580f7aa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-03-31 22:15:53 +00:00
Corentin Wallez ad879f520d Remove the ConvertTimestampToNanoseconds toggle.
It was used to avoid requiring the dependency on Tint so it isn't needed
anymore now that Dawn unconditionally dependent on Tint.

Bug: dawn:686
Bug: dawn:706
Change-Id: Ifd12c2f94fcaaa70120ae7ef72bcdc34f970fbea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46004
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-03-31 19:31:42 +00:00
Corentin Wallez 50f995851d DeviceBase: Make object creation use ResultOrError<Ref<T>>
This is in preparation for a change that will change all the
CreateFooInternal to be CreateFoo so they can be called in a
reentrant manner without special refcounting.

This also standardizes all the backends (except OpenGL and Null)
to use Object::Create that returns a Ref<T> or ResultOrError<Ref<T>>,
something we wanted to do for a long time.

Bug: dawn:723

Change-Id: I9e0baced333ffeb0affbc6a276c9bd9de082263a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46440
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-31 18:36:32 +00:00
Corentin Wallez 7ef8633593 Reassign some TODOs to a new bug for OpenGL buffer OOM
Bug: dawn:27
Bug: dawn:749
TBR=senorblanco@chromium.org

Change-Id: I1f9093f443bc28be08738fd3ff230b14ce0a55a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46447
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-31 17:54:00 +00:00
Yunchao He 3db31ef757 Move T2B copy helpers for D3D12 backend to UtilsD3D12.h|cpp
Its counterpart functions (B2T copy helpers) are already at UtilsD3D12.

BUG: dawn:547

Change-Id: Ib9b9216e0b182429ab9bd9aa10241d7ca6cdee5b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
2021-03-31 17:23:30 +00:00
Corentin Wallez 79c9d125f2 Propagate more errors from reentrant calls
This CL propagates errors from reentrant WriteBuffer calls and makes
procy methods on BufferBase to show that it is safe to call
GetMappedRange and Unmap without handling errors.

Bug: dawn:723
Change-Id: I4ea43adc4844505314bf84e2357b2d928f1d1f8c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46003
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-03-31 11:24:42 +00:00
Brandon Jones 7f77cfd7cf Implement validation for RenderPipelineDescriptor2
In the service of keeping these changes incremental and easier to
review this change only validates the RenderPipelineDescriptor2
before converting it back to a RenderPipelineDescriptor.

BUG: dawn:642
Change-Id: Ie24c999756fa74f7d3cd10662a6bc95649602b14
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46120
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-31 08:56:02 +00:00
Hao Li 864a364742 Suppress OcclusionQueryTests.QueryWithScissorTest on Intel
This case is failed weirdly on Intel TGL (Window Vulkan) which says the
destination buffer keep sentinel value in the second case, it cannot be
reproduced with any debug actions including Vulkan validation layers
enabled, and takes time to find out if the WriteBuffer and
ResolveQuerySet are not executed in order or the ResolveQuerySet does
not copy the results to the buffer. In order to integrate end2end tests
to Intel driver CL without unknown issues, skip it until we find the
root cause.

Bug:dawn:434

Change-Id: Ibdba667cb662ba69c8468d5b2ac2e84bcd3df5bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46321
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
2021-03-31 01:22:02 +00:00
Ben Clayton e40553b940 ShaderModuleD3D12: Remap binding points
Using the new tint::transform::BindingRemapper.

Provides symmetry with TranslateToHLSLWithSPIRVCross().

Bug: tint:621
Bug: tint:671
Change-Id: I1a26c8cac236ac1133c688cf84bb810e15e30978
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46341
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-03-30 22:53:13 +00:00
Ben Clayton 78fdaa4eeb Disable SlantedPlaneMipmap for D3D12 + tint
Bug: tint:691
Change-Id: Ic002bdc1955724fb26d16b7f63712bd77febc67c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46377
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 20:30:37 +00:00
Ben Clayton 318ec2e893 Disable test for D3D12 + tint which use runtime sized arrays
Bug: tint:682
Change-Id: I254e0a4b02dd9348daab096e6fc16d9a004c527e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46369
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 20:14:07 +00:00
Ryan Harrison 1523d4cf18 Add using Tint for binding reflection
BUG=dawn:700

Change-Id: I5234d48867b500aece79b82515818afdfc3a6d9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45100
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 19:55:27 +00:00
Ben Clayton 17941e1562 Disable BindGroupTests for D3D12 + tint
Bug: tint:681
Change-Id: I5cca1889d2ba26503530ead922278172e5e98ccf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46368
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 18:54:07 +00:00
Ben Clayton 25d3f252a6 ComputeSharedMemoryTests: Add missing access qualifier
https://gpuweb.github.io/gpuweb/wgsl.html#variables:

> "Variables in the storage storage class and variables with a storage texture type must have an access attribute applied to the store type."

Bug: tint:692
Change-Id: I61774bb6bda9a7d31e3a85c24fcdb6e2fc25e7b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46378
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 16:37:07 +00:00
Ben Clayton 5da990b0a4 Disable SampledAndWriteonlyStorageTexturePingPong for D3D12 + tint
Bug: tint:690
Change-Id: If3bdba33f843885c7e056b68b361d890a7a58c04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46376
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 16:29:37 +00:00
Ben Clayton eef7a6a58c Disable tests for D3D12 + tint that fail due 'undeclared identifier'
Bug: tint:688
Change-Id: Ic1f0fbd6da112557711595eae38b5d034bbe594b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46374
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 16:23:27 +00:00
Ben Clayton 682d764e85 Disable TextureFormatTest for D3D12 + tint
Bug: tint:689
Change-Id: Ib006a2e726078426cd00479c35d47eecf9b3d601
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46375
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 16:21:07 +00:00
Ben Clayton 1894d5d83a Disable SizedArrayOfStruct tests for D3D12 + tint
Bug: tint:683
Change-Id: I55c513108cb5c8e14bd72bb8dd3177afff353623
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46370
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 16:08:07 +00:00
Ben Clayton 1bcfdce243 Disable MultipleWriteThenMultipleReadTests for D3D12 + tint
Bug: tint:686
Change-Id: Iaca48aa7fb4cddbc008d66a248d01a6e4d36f5ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46372
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 16:05:17 +00:00
Ben Clayton 9421afc46f Disable VertexFormatTest for D3D12 + tint
Bug: tint:687
Change-Id: Ib839f629ea4095c007c1a8b3f9ad490c1e9e4910
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46373
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 16:00:57 +00:00
Ben Clayton 51d81c1d56 Disable DepthStencilSamplingTest for D3D12 + tint
Bug: tint:684
Change-Id: Iff76442349da1a399c7460a1a6ce047229b0ab88
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46371
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 15:44:07 +00:00
Ben Clayton ed73e6f51e Disable TimestampComputeShader test on D3D12 + WARP + Validation
Bug: dawn:741
Change-Id: I5ee730e4f7b0e9041373bfe9ecc1be3b2535a775
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46367
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 15:23:37 +00:00
Ben Clayton 9ef74c56fd Disable EncodeUBOOverflowMultipleSubmit test on D3D12 + WARP
Bug: dawn:742
Change-Id: I11fc4c49c4040d694703ed43ebd8b1e2fe62bf17
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46366
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 15:22:17 +00:00
Ben Clayton 74879450c5 Disable SlantedPlaneMipmap test on D3D12 + WARP
Bug: dawn:740
Change-Id: I127c7698cf9103ef85dafe44c5dc5781ccea031d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46365
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 15:21:37 +00:00
Ben Clayton d48c5ed77c Disable SwitchedViewHeapResidency test on D3D12 + WARP + Validation
Bug: dawn:739
Change-Id: I56f17f75bd2e5a12d90c6875817d980cb98d3e01
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46364
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 15:19:37 +00:00
Ben Clayton 2922d8d603 Skip ClearTwiceInD3D12ReadbackInD3D11 for WARP + validation
Bug: dawn:735
Change-Id: I26d06528aebb4f2c2a391d65ab8a16ef1e6e01f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46360
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 13:23:27 +00:00
Ben Clayton fed33fa18a Disable ArbitraryBindingNumbers on D3D12 + WARP
Bug: dawn:736
Change-Id: I3402dee42c71a88160667ea8ea00b43734441741
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46361
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 13:15:27 +00:00
Ben Clayton 47a8cf3410 Disable MultisampledRenderingTest tests on D3D12 + WARP
Bug: dawn:738
Change-Id: I208d9851f14c25f16a97382953150eba7f4667b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46363
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 13:13:17 +00:00
Aleksi Sapon 7f8c91cdde Fix crash from async callback calling Queue::Submit
An async callback which calls Queue::Submit will cause
reentrance in QueueBase::Tick and CreatePipelineAsyncTracker::Tick,
which invalidates the task queue being used by the original call,
and leads to a crash from an invalid pointer.

The Tick functions should remove the tasks from the queues before
the callbacks are called, so invalidation doesn't cause a crash.

Bug: dawn:729

Change-Id: I0d952d51040a3d1a475767400de3333a8b9b0821
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45900
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-30 13:06:17 +00:00
Ben Clayton 98028718e1 Disable DepthStencilStateTest tests on D3D12 + WARP
Bug: dawn:737
Change-Id: I55d22ad54fe3983bbae67572a428d01a64e634e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46362
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-30 12:55:17 +00:00
Ben Clayton 955146e9ac Skip ColorStateTest.* for D3D12 and WARP
These don't pass.

Bug: dawn:489
Change-Id: Ic9a5f34bc3325326d2c6217e82d75633ff0a7534
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46344
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-03-30 12:05:47 +00:00
Ben Clayton 8d57426a80 Skip ClearInD3D12ReadbackInD3D11 for WARP + validation
Bug: dawn:735
Change-Id: I5731e198f6888bf6ad7d244a54053b917a277e4a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46343
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-03-30 11:53:07 +00:00
Corentin Wallez 1bc1ed4bc9 Propagate errors from Tick in backend::Queue::SubmitImpl
Otherwise errors in Tick could cause the device to be lost and further
processing in Queue::SubmitImpl to fail in interesting ways.

Bug: dawn:723
Bug: chromium:1191777
Change-Id: I586c6b0f97c89938b9e7deeb6f31231ec19e826c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46002
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-03-30 10:21:36 +00:00
Corentin Wallez e91975c79e dawn_native: Use an internal GetQueue that doesn't add a ref
Previously various places in dawn_native were using Device::GetQueue to
get the queue for some operations, and were inadvertently adding a
reference to the queue. Fix this by adding a getter that doesn't add a
ref.

Bug: dawn:723
Bug: chromium:1185070
Change-Id: Iba127dbd631305762f4cc6c37816407056c52cff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46001
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-03-29 15:40:55 +00:00
Corentin Wallez 2ce4b905b2 dawn_native: Prefix all API methods with API
This means that calling wgpu::Object::DoStuff will translate to a call
to dawn_native::ObjectBase::APIDoStuff. This will clarify the
difference between reentrant calls and internal calls in dawn_native.
Avoiding issues in the future.

This CL only changes the code generator to prefix with "API", performs
renames needed to make the code compile, and adds TODOs for things that
should be fixed in follow-up CLs.

Bug: dawn:723

Change-Id: Ie24471fa093adc4179d33d13323429847d076ecb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45921
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-03-29 14:02:05 +00:00
Corentin Wallez 1257152485 Use RefCounted for DeviceBase
DeviceBase implemented its own Reference / Release methods for
historical reasons. Replace them with RefCounted's version that are
similar, just more thread safe.

Bug: dawn:723
Change-Id: Ib26f3e231eb12fe09612c8b5639576e2f26a3cfd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46000
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-03-25 23:50:24 +00:00
Bryan Bernhart 1a232448d2 D3D12: Remove WrapSharedHandle
Removes WrapSharedHandle in favor of using
ExternalImageDXGI.

BUG=dawn:625

Change-Id: Ibd469600959aea344e7a59557d986fc673a79727
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46020
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2021-03-25 21:31:34 +00:00
Brandon Jones 37ad44eef2 Allow Dawn to surface Tint internal compiler errors as uncaptured validation errors
Raises any ICE errors reported by Tint during shader validation as uncaptured
validation errors. This allows them to show up in Chrome's dev tools console, for
example.

BUG: dawn:718
Change-Id: I85741787103e6c1174b7c73be6b9860b988d6130
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45840
Reviewed-by: Ben Clayton <headlessclayton@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-03-25 15:37:44 +00:00
Ryan Harrison 9138fe253b Add test to confirm validation rejects invalid WGSL
BUG=dawn:504

Change-Id: If09b12d4df9c7aedcb28b4640557cc3cae6e989d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45700
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-24 19:39:33 +00:00
Corentin Wallez 9037669b2e Remove the dependency on shaderc and glslang.
With all tests converted to WGSL we only use shaderc to assemble SPIRV
assembly to binary. shaderc requires glslang but we don't use it at all.
By using SPIRV-Tools directly to assemble SPIR-V, we can remove both the
shaderc and glslang dependencies.

Bug: dawn:572
Bug: chromium:1150045
Change-Id: I1588428dfb9478e7b724478bec662d002ee920e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45765
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-24 16:02:13 +00:00
Corentin Wallez 7aec4ae7c5 Remove utility to create shader modules from GLSL
And rename CreateShaderModuleFromWGSL to CreateShaderModule.

Bug: dawn:572
Change-Id: I80dab401078b2001d738b87d6e24437f93b690d1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45764
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-03-24 15:55:32 +00:00
Ben Clayton 1452cf60e5 ComputePipelineD3D12 - check result of CreateComputePipelineState()
This was silently failing for me, resuling in a crash somewhere completely different.

Change-Id: Iba9dfba8bb4c9e51a947a1337fc9718437ad5254
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45766
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-24 14:29:53 +00:00
Ben Clayton 218d48890a Port ComputeSharedMemoryTests to WGSL
Tint now supports barriers

Bug: dawn:572
Change-Id: I1b5cdd9026e0ead7ecd743295c81ef147bdc5080
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45602
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-24 09:48:11 +00:00
Ben Clayton fcafc6e347 Port TextureViewTests to WGSL
tint: 639 has been fixed

Bug: dawn:572
Change-Id: I3c6bcb4e6c04109f633694a8813ae5f0edb21da8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45603
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-24 09:12:53 +00:00
Austin Eng d020de4501 Validate the texture Aspect enum in ImageCopyTexture
Bug: chromium:1191389, chromium:1191770
Change-Id: I973b8951d43bd0463afcd05fdd7104184db1be2d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45841
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-24 08:38:32 +00:00
Corentin Wallez 3b3ab0217e Use SPVASM for ShaderFloat16Tests.
Tint/WGSL don't support 16bit floats yet, so use SPIRV assembly to
remove the dependency on glslang, instead of WGSL.

Bug: dawn:572
Change-Id: I6dd209e62f0550e7aecd18626b8807f7f1414b19
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45605
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-03-23 17:21:00 +00:00
Corentin Wallez a82ed35cf1 BUILD.gn: Remove warning suppression for Skia
Skia changed to only use -Weverything for Skia files so we no longer
need to suppress this warning.

Bug: dawn:706
Change-Id: Ifcb2421abd24ec514396b8033057a62abd312e16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45608
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-23 16:58:50 +00:00
Corentin Wallez 83ee832ebd Port the last BufferZeroInitTest to WGSL
It required storageBarrier() to be implemented in Tint.

Bug: dawn:572
Change-Id: I62e8d89ef7a049044f3381dc66163466d62c839d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45604
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-03-23 16:52:31 +00:00
Austin Eng be621bd0e6 Update the wire-based fuzzers to always assume an injected error
This also removes the ability for the fuzzer to perform error
injection to generate testcases. The preferred method is to
use one of the Dawn test binaries to produce the trace directly.

Bug: dawn:629
Change-Id: If7295f9e6da5618be8f44e9301aa12dc56fcdfef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40301
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-03-23 16:47:50 +00:00
Corentin Wallez 94b8b7408e Port VertexFormatTests to WGSL
Bug: dawn:572
Change-Id: I68484defb240528b0a7dd0eced6012d9866f30fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44765
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-23 13:25:29 +00:00
Yan, Shaobo d42f4b3ca5 Reland "CopyTextureForBrowser: Support color format conversion"
This is a reland of f84daa070f

Eliminate static initializer(disallowed in Chromium) by replacing
shader string living in anonymous namespace from type "std::string"
to char array.

Original change's description:
> CopyTextureForBrowser: Support color format conversion
>
> This CL enables blit from RGBA8Unorm soruce texture to dst texture that
> |CopyImageBitmapToTexture| supported dst format.
>
> BUG=dawn:465
>
> Change-Id: I99846cf8dc37bc89e0c168a3d86193bb3a0c0ebb
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44020
> Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>

Bug: dawn:465
Change-Id: Ic3a156f5a20b217fd2aa5f86b01bad8ce77dc41c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45443
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-23 02:09:37 +00:00
Brandon Jones 97da45c373 Update RenderPipelineBase to stop depending on deprecated struct types
Bug: dawn:642
Change-Id: Ibc9d8f87735864dcafb3ec68013e4590602af855
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45360
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-22 22:17:26 +00:00
Corentin Wallez a9439199b7 Use Tint/WGSL unconditionally
Bug: dawn:706
Change-Id: I102c37e67e7833bb7441ed8a355a4411bd7b9fb9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45421
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-22 21:23:36 +00:00
shrekshao b00de7f8e8 API evolution GPUExtent3D.depth -> depthOrArrayLayers (Step 2)
Still leave deprecated `depth` functional as there are some references in
other clients. Using `depth` and `depthOrArrayLayers` at the same time is
invalid. Add DeprecatedAPITests.

Bug: chromium:1176969
Change-Id: Ia06645e4f3c17588323dd36b11f9f3988b2e3aba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44640
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-22 21:12:36 +00:00
Bryan Bernhart a9b211d202 D3D12: Prevent crash due to missing debug layer
Destroying the adapter without the debug layer installed
would crash the process upon access of the debug filters.

Bug: dawn:460
Change-Id: I04819c5136af780fd3b981857bd87d69d4abc9c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45560
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-22 18:35:16 +00:00
Corentin Wallez 3e4b57b77e ShaderModule: Store the tint::Program in the base class.
This is in preparation of removing all the DAWN_ENABLE_WGSL logic: the
ShaderModuleBase will have either mSpirv or mTintProgram set based on
UseTintGenerator.

Also improves the constness of some functions.

Also simplifies a bit ShaderModuleBase::Initialize.

Bug: dawn:706
Change-Id: Ib879e2aec8a004aeb8ac5dc6e1176b1667fc227d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45422
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-22 18:24:16 +00:00
Bryan Bernhart 5ff4978a5d Fix incorrect parsing logic in DawnTest
DawnTest incorrectly reports arguments as unused nor skips over ones
that were already parsed.

Change-Id: Ibd7874419226ca6404e44236c12fbd70132e4551
Bug: None
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45442
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
2021-03-22 17:18:46 +00:00
Corentin Wallez 8ac6a481a3 Make CreateRenderPipelineAsync use Descriptor2
Since it isn't used by anyone yet we can make a breaking change to
CreateRenderPipelineAsync to immediately start using
RenderPipelineDescriptor2.

Bug: dawn:1177501
Change-Id: I9f88c6fc1b325b7a9356536e2a071d4f17abd6ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45280
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
2021-03-21 23:13:04 +00:00
Corentin Wallez 682f32af32 Revert "CopyTextureForBrowser: Support color format conversion"
This reverts commit f84daa070f.

Reason for revert: Adds static initializers.

Original change's description:
> CopyTextureForBrowser: Support color format conversion
>
> This CL enables blit from RGBA8Unorm soruce texture to dst texture that
> |CopyImageBitmapToTexture| supported dst format.
>
> BUG=dawn:465
>
> Change-Id: I99846cf8dc37bc89e0c168a3d86193bb3a0c0ebb
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44020
> Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>

TBR=cwallez@chromium.org,jiawei.shao@intel.com,shaobo.yan@intel.com,enga@chromium.org

Change-Id: I29a4faf38332995db6bded9f5aead9af28dadfd3
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: dawn:465
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45420
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-19 12:47:05 +00:00
Corentin Wallez 5709060143 Port MultisampledRenderingTests to WGSL.
Bug: dawn:572
Change-Id: I9e76b39c0df705cc3fde5058e618c1ecb2c446f7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44761
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-03-19 09:48:11 +00:00
Yan, Shaobo f84daa070f CopyTextureForBrowser: Support color format conversion
This CL enables blit from RGBA8Unorm soruce texture to dst texture that
|CopyImageBitmapToTexture| supported dst format.

BUG=dawn:465

Change-Id: I99846cf8dc37bc89e0c168a3d86193bb3a0c0ebb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44020
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-19 09:46:44 +00:00
Corentin Wallez ad8772dfb2 Fix incorrect WGSL u32 != i32 comparison in a test
Bug: tint:354
Change-Id: I4eef469334072aac606d6ed7384eb066986c2db1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45400
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-03-19 09:41:21 +00:00
Ryan Harrison bbabda3590 Fix Storage Buffers in WGSL tests & examples
Converts var<storage_buffer> to var<storage>

Adds in [[access(read_write)]] when no access qualifier was supplied.

BUG=dawn:699

Change-Id: I9da95366d0bb8734f1d134ee2dc764a7c16ef0cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45300
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-18 17:20:48 +00:00
Corentin Wallez 3e5701c1a4 Skip deprecation warning expectations in RenderPipelineValidationTests
A commit conflict caused this to be included by mistake even if it is
failing.

TBR=bajones@chromium.org
TBR=enga@chromium.org
Bug: None

Change-Id: Ie4352d0b955d34af6f9614f0c6a6dad1e42da826
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45241
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-18 12:34:18 +00:00
Brandon Jones bff9d3a357 Updating end-2-end tests to use new RenderPipelineDescriptor format
Bug: dawn:642
Change-Id: Ie38dfe7286b51eb7f3ecd8902e5249321ff63c11
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44980
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
2021-03-18 02:54:27 +00:00
Austin Eng 27c4f03de1 Skip create render pipeline deprecation warning expectation in UnsafeAPIValidationTests
The CL that fixed deprecation warning expectations landed at the same
time as the CL which added this expectation and broke CQ.
We shouldn't check deprecation warnings here now because the warnings
for CreateRenderPipeline are temporarily disabled.

Bug: none
Change-Id: I99a8b6643e64f87b2354058dbac9a236c51a2afd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45180
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-03-18 01:28:57 +00:00
Corentin Wallez 3fe857a621 ValidationTest: correctly assert deprecation warnings are emitted.
Bug: dawn:642
Change-Id: If8601c50e4a14b5de5098398381c7a6c5e1f73fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44867
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-03-17 19:10:27 +00:00
Brandon Jones 6e5d47a396 Update majority of unittests to use RenderPipelineDescriptor2
Bug: dawn:642
Change-Id: I437967f590e03b7d85d7eda28400db9e3e5d0745
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44820
Auto-Submit: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-03-17 17:48:59 +00:00
Ben Clayton c56868420d Migrate all tests over to using Default Struct Layout
The WGSL spec has been updated with 'Default Struct Layouts':
https://github.com/gpuweb/gpuweb/pull/1447

This removes the `[[offset(n)]]` decoration, and replaces it with two optional decorations: `[[size(n)]]` and `[[align(n)]]`, and a sensible set of sizes and alignments for each type.

Most `[[stride(n)]]` decorations have also been removed from arrays.

Bug: tint:626
Bug: tint:629
Change-Id: Ib0d2741f61ea943e6fb99d00cbb5cab2f97ae7be
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44280
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-17 09:48:19 +00:00
Jiawei Shao 0008432827 D3D12: Fix crash in the workaround for T2T copy issue on Intel GPUs
This patch fixes a bug in the computation of temporary buffer size in
the implementation of the workaround for the T2T copy issue on Intel
GPUs.

With this tests all the T2T operation tests in WebGPU CTS will be able
to pass on Intel Gen9 and Gen9.5 GPUs.

BUG=chromium:1161355
TEST=dawn_end2end_tests

Change-Id: Ic4fb0c0056cf7b01720e47cc91c37a9f293cd194
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44840
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-03-17 08:20:09 +00:00
Ryan Harrison 3209df5a9c Fix TimestampQueryTests
BUG=dawn:713

Change-Id: Ice1f9d948125daa68de661ad37bb07835ef9bec8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44940
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-17 08:03:39 +00:00
Ryan Harrison ed16517e32 Fix VertexStateTests
BUG=dawn:714

Change-Id: Ic9c478ae708d48cf78228edf831badb7c401d131
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44924
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-16 20:56:00 +00:00
Ryan Harrison 322e451a62 Fix CopyTextureForBrowserTests
BUG=dawn:712

Change-Id: Ie8b504a3566fae18a35029b63cf74f55dbe93b0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44922
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-16 20:23:00 +00:00
Ryan Harrison ddc4712609 Fix ComputeStorageBufferBarrierTests
BUG=dawn:711

Change-Id: I566f2631721d10374027cf3959fce7eaf20a85c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44921
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-16 20:04:10 +00:00
Ryan Harrison f4496c14b7 Fix ComputeDispatchTests
BUG=dawn:710

Change-Id: I47dac524f66f84e2d5e3aa966935bd2ca9d03144
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44920
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-16 19:53:29 +00:00
Ryan Harrison cc84ee24fc Fix ComputeCopyStorageBufferTests tests
BUG=dawn:709

Change-Id: Ib829a834546588a2948179f487fc75b1bf09cf06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44901
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-16 19:34:41 +00:00
Corentin Wallez 0ed19c6640 Port invalid SPIR-V tests to SPVASM instead of GLSL.
Bug: dawn:572
Change-Id: I4d244d6837f70720a04236ecb751785e27a14d10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44763
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-03-16 18:09:59 +00:00
Corentin Wallez af607f7f80 Port the MinimumBufferSizeValidationTests to WGSL.
Bug: dawn:572
Change-Id: I24d5e37711aecdef582c33cb4ad55d0e5fb30004
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44860
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-03-16 17:30:04 +00:00
Ben Clayton e76a33b6eb Fix more WGSL vector constructors
Constructor arguments need to match the vector element type.

Tint has new validation that now checks for this.

Bug: tint:632
Change-Id: Ifcb994260c167e326ce5c0776915d44954dd8aa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44767
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-16 12:00:54 +00:00
Ben Clayton 175a7eb826 RenderPipelineValidationTest: Fix vector constructor
Integer literals need to be suffixed with `u` in order to be unsigned. This also includes 0.

Tint has new validation that now checks for this.

Bug: tint:632
Change-Id: I1af07590d93620561df1a0084521eb071d4af7ed
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44766
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-03-16 10:10:04 +00:00
Corentin Wallez 36f19daa7d Port D3D12 white box tests to WGSL.
Bug: dawn:572
Change-Id: I91cc56847c4970c3f32697738edb799f7468e76f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44760
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-03-16 10:00:44 +00:00
Corentin Wallez debab92fac GN: Use updated path to libtint.
Bug: dawn:706
Change-Id: I39864f75b12272992bd9129a8eeea1ac6479a99e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44764
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-03-16 09:31:44 +00:00
Corentin Wallez a94c9acd01 Fix the vertex attribute offset alignment rule.
Bug: dawn:130
Change-Id: Ib5fa24bf5520cb1ffe1653f1504dff244df928b4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44300
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
2021-03-15 14:52:53 +00:00
Corentin Wallez 693b76bcd5 Remove usage of deprecated std::codecvt
It was causing issues building Dawn in Skia. The error message helpfully
suggests using WideCharToMultiByte instead.

Bug: dawn:706
Change-Id: I87dee1192123f49cc8e7243a29df446389454df4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44560
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-03-15 12:10:23 +00:00