Commit Graph

3501 Commits

Author SHA1 Message Date
Dawn Autoroller 55c43bff00 Roll Tint from b696607338 to 5b3d88b748 (26 revisions)
https://dawn.googlesource.com/tint.git/+log/b69660733875..5b3d88b748e4

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

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

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

Bug: dawn:728
Tbr: rharrison@google.com
Change-Id: Iae4570aae425cd077d57bff98bec4e788bec63f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48447
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-20 19:13:40 +00:00
Austin Eng 9aadf94c15 SlabAllocator: Fix writing to freed memory on slab destruction
unique_ptr's destructor sets itself to null and frees its owned
memory. This is a problem because for the slab allocator, the
member variable holding the unique_ptr is inside the freed memory.

Bug: skia:10501
Change-Id: I41179261041fe415bb2af3667114b079f61b3c7b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48100
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-04-20 17:53:50 +00:00
Ben Clayton cd39ade86f Re-add const to TranslateToHLSLWithTint()
Addresses a late review comment:
https://dawn-review.googlesource.com/c/dawn/+/48060/8/src/dawn_native/d3d12/ShaderModuleD3D12.cpp#197

Change-Id: I71a85171a1dc2d98760f2a5fce5df4eb513f9467
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48385
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-20 14:32:19 +00:00
Ben Clayton 8091c68450 Cleanup transform usage
Use tint::transform::DataMap for inputs as well as outputs.

This allows tint to nest transforms inside each other (e.g. embedding
transforms inside sanitizers), and still having a consistent way to pass
data in and out of these transforms, regardless of nesting depth.

Transforms can also now be fully pre-built and used multiple times as
there is no state held by the transform itself.

Bug: tint:389

Change-Id: If1616c77f2776be449021a32f4a6b0b89159aa2a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48060
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
2021-04-19 19:42:19 +00:00
James Price eae70b75ae Update WGSL in tests with renamed builtins
These builtins have been renamed:
* frag_coord -> position
* sample_mask_in -> sample_mask
* sample_mask_out -> sample_mask

Change-Id: Ic40dc9f4e509587b7ac82e43abbf9eec68225d9f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48300
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-19 15:29:49 +00:00
Dawn Autoroller 7f5a472258 Roll Tint from 4649377d05 to b696607338 (1 revision)
https://dawn.googlesource.com/tint.git/+log/4649377d0575..b69660733875

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

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

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

Bug: None
Tbr: rharrison@google.com
Change-Id: Ifb72ff33369601363299fc9b1f4575f3f53cd0e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48280
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-19 14:46:39 +00:00
Corentin Wallez 0af4a834a9 dawn_native: Use refcount-safe methods for reentrant object creation
Previously all uses of reentrant object creation in Dawn native
needed to manually AcquireRef. Change them to use CreateFooInternal that
returns a ResultOrError<Ref<>> and are renamed to CreateFoo.

Bug: dawn:723

Change-Id: Ifcda3659d02cc5a4c63c248dc53af7fee7c4a61d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46626
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
2021-04-19 08:52:35 +00:00
Dawn Autoroller b6c0dac110 Roll Tint from fe70c75bc5 to 4649377d05 (10 revisions)
https://dawn.googlesource.com/tint.git/+log/fe70c75bc573..4649377d0575

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 alanbaker@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: alanbaker@google.com
Change-Id: Ife30fda06c27a34af8a322f96d1cb4c50b5b23e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48180
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-17 13:08:03 +00:00
Brandon Jones 5e6a092703 Deprecate renderpass color/depth .attachment
As of https://github.com/gpuweb/gpuweb/pull/1352 the spec indicates that
GPURenderPassColorAttachmentDescriptor and
GPURenderPassDepthStencilAttachmentDescriptor should use .view rather
than .attachment to indicate the TextureView associated with the
render pass attachment.

Bug: dawn:762
Change-Id: I70d615e19d8e7aae5b26aa5965c7109289ab868b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47902
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-04-17 01:51:53 +00:00
James Price 12953caa42 Enable WGSLUnsortedStructIO test
Tint now sorts struct members with entry point IO attributes.

Bug: tint:710
Change-Id: I7bb37cab2f101fbcf55dd8b42ee3b3af1250bf1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47840
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
2021-04-16 20:37:23 +00:00
James Price edb575d631 Revert "Temporarily stop running tests on D3D12 with use_tint_generator"
This reverts commit 5c9b6a8f81.

The issue has now been fixed in Tint and rolled into Dawn.

Fixed: dawn:758
Change-Id: Id7deb6cea9f22ee8c5f345a28d2d37499b47d692
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48080
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-16 13:19:15 +00:00
Dawn Autoroller cd5832c373 Roll Tint from cc46e393e4 to fe70c75bc5 (19 revisions)
https://dawn.googlesource.com/tint.git/+log/cc46e393e481..fe70c75bc573

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 alanbaker@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: dawn:758
Tbr: alanbaker@google.com
Change-Id: I7df802837effa126f0b2f0db74bcbdb9ef9d0168
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47881
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-16 12:28:55 +00:00
Austin Eng 41b4c9de9d Add default to VertexState.bufferCount
Bug: dawn:764
Change-Id: Ib4fe94b198c6980c8dd849b3bb15f88e7f063c5f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47980
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-16 07:19:35 +00:00
Brandon Jones 413dcf8a40 Rename setBlendColor->setBlendConstant
Matches most recent spec changes. setBlendColor has been marked as
deprecated.

Bug: chromium:1199057
Change-Id: I4584ce789bd7d14401244509d5ada62a46236a5d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47901
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-04-15 19:33:58 +00:00
Brandon Jones 22b923cc91 Updated BlendFactor enum to match spec
Several of the enum names have changed recently. Update them to match
the spec and mark the older ones as deprecated.

BUG: chromium:1199057
Change-Id: I7a29588dd18b8fb738773c2478b173093f2aa834
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47860
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-15 18:34:29 +00:00
Corentin Wallez 5c9b6a8f81 Temporarily stop running tests on D3D12 with use_tint_generator
A Dawn CL landed at the same time as a Tint roll in Dawn, causing
failures in a large number of D3D12 use_tint_generator. Disable testing
of that configuration entirely while we investigate the issue and fix
it.

Bug: dawn:758
Change-Id: I6c897efc637821a20281c91668889ae95c1c2b1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47774
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-15 16:33:58 +00:00
Dawn Autoroller 5d73b31175 Roll Tint from f8313e5a6e to cc46e393e4 (8 revisions)
https://dawn.googlesource.com/tint.git/+log/f8313e5a6e13..cc46e393e481

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 alanbaker@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: alanbaker@google.com
Change-Id: I232a70f5b39e6d4fecdbea6ecbfaf857122654b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47880
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-15 12:47:18 +00:00
Ryan Harrison 0a5696079b Fix unittests that are broken by --enable-toggles=use_tint_generator
Tests fixed by this CL:
  BindGroupLayoutCompatibilityTest.ROStorageInBGLWithRWStorageInShader
  BindGroupLayoutCompatibilityTest.TextureViewDimension
  BindingsValidationTest.PipelineLayoutWithLessBindingsThanPipeline
  GetBindGroupLayoutTests.SameObject
  GetBindGroupLayoutTests.DefaultShaderStageAndDynamicOffsets
  GetBindGroupLayoutTests.ComputePipeline
  GetBindGroupLayoutTests.BindingType
  GetBindGroupLayoutTests.ViewDimension
  GetBindGroupLayoutTests.TextureComponentType
  GetBindGroupLayoutTests.BindingIndices
  GetBindGroupLayoutTests.MinBufferSize
  GetBindGroupLayoutTests.StageAggregation
  GetBindGroupLayoutTests.ConflictingBindingType
  GetBindGroupLayoutTests.ConflictingBindingTextureMultisampling
  GetBindGroupLayoutTests.ConflictingBindingViewDimension
  GetBindGroupLayoutTests.ConflictingBindingTextureComponentType
  GetBindGroupLayoutTests.UnusedIndex
  MinBufferSizePipelineCreationTests.LayoutSizesTooSmall
  MinBufferSizePipelineCreationTests.LayoutSizesTooSmallMultipleGroups
  MinBufferSizeDrawTimeValidationTests.ZeroMinSizeAndTooSmallBinding
  MinBufferSizeDrawTimeValidationTests.UnorderedBindings
  MinBufferSizeDrawTimeValidationTests.MultipleGroups
  MinBufferSizeDefaultLayoutTests.DefaultLayoutVariousWGSLTypes
  MinBufferSizeDefaultLayoutTests.DefaultLayoutVariousBindingTypes
  MinBufferSizeDefaultLayoutTests.MultipleBindGroups
  MinBufferSizeDefaultLayoutTests.NonDefaultLayout
  RenderPipelineValidationTest.TextureComponentTypeCompatibility
  RenderPipelineValidationTest.TextureViewDimensionCompatibility
  StorageTextureValidationTests.BindGroupLayoutEntryTypeMatchesShaderDeclaration
  StorageTextureValidationTests.BindGroupLayoutStorageTextureFormatMatchesShaderDeclaration
  StorageTextureValidationTests.BindGroupLayoutViewDimensionMatchesShaderDeclaration

Also enables GetBindGroupLayoutTests.FromCorrectEntryPoint for
use_tint_generator, since it handles this case, unlike SPIRV-Cross.

These tests remain skipped, but with bugs listed for fixing the underlying issues:
  MinBufferSizeDefaultLayoutTests.RenderPassConsidersBothStages
  ShaderModuleValidationTest.MultisampledArrayTexture
  StorageTextureValidationTests.ReadWriteStorageTexture
  StorageTextureValidationTests.StorageTextureFormatInShaders
  StorageTextureValidationTests.UnsupportedWGSLStorageTextureFormat

BUG=dawn:756

Change-Id: Ib6b0d4144927073d949cb8d1409063a767fd47e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47823
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-15 07:18:08 +00:00
Brandon Jones e87ea2bedc Update WGSL syntax for end2end tests
Changes I/O to use function parameters and return values, removes
unnecessary "-> void" return types, and changes "const" to "let".

BUG: dawn:755
Change-Id: Iabbfcc280fae37d73cba6a2f7e2215ed579a04e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47700
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
2021-04-14 17:05:07 +00:00
Brandon Jones d798f331a2 Fix new-style WGSL I/O with OpenGL backend
Fixes issues with OpenGL when using the newer style of WGSL I/O that
relies on function parameters and return values. Also added several
end2end tests to cover different variants of that style of I/O.

BUG: dawn:755
Change-Id: I73b4b07ce924ce22e917bf399be705dc67519037
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47701
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
2021-04-14 16:29:57 +00:00
Dawn Autoroller 891ece5d16 Roll Tint from ebc5bd4e28 to f8313e5a6e (16 revisions)
https://dawn.googlesource.com/tint.git/+log/ebc5bd4e28ea..f8313e5a6e13

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 alanbaker@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: alanbaker@google.com
Change-Id: Ie9dd68f74151d27073cfa8698651aeeef3d5c8b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47800
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-14 15:15:17 +00:00
Ryan Harrison acdc35dc39 Support enabling/disabling toggles in unittests
Refactors support for toggle control flags, --enable-toggles= &
--disable-toggles, from the end2end tests into a utility class to make
them available elsewhere. The unittests now uses this utility class to
parse toggle control flags.

For some toggles, like 'use_tint_generator', the unittests are known to
be broken with them turned on. They will be fixed in subsequent CLs.

BUG=dawn:756

Change-Id: Ic283e8a82bedcbf255258cca3e62f58c79d3857b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47740
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
2021-04-14 14:55:07 +00:00
Dawn Autoroller f7d01e07cd Roll Tint from c3bbb4d079 to ebc5bd4e28 (3 revisions)
https://dawn.googlesource.com/tint.git/+log/c3bbb4d079e4..ebc5bd4e28ea

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 alanbaker@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: alanbaker@google.com
Change-Id: If3e189c02f8f60468cc917ca9da100f75e56ad04
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47720
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-13 15:58:04 +00:00
shrekshao 417d91cd1e Remap BindGroup bindingIndex for vulkan backend when using Tint Generator
Bug: dawn:750
Change-Id: I239f5544a5822422d61a249f2ef028df326f90ed
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47380
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
2021-04-13 15:38:24 +00:00
James Price 9e0debd91e Update examples for recent WGSL changes
* Use new entry point IO syntax
* Use `let` instead of `const`
* Remove `-> void` from function headers

Bug: dawn:755
Change-Id: I39b5687a342ea2298c3d2e85517c9b8d9017727e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47500
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-04-13 14:52:44 +00:00
Stephen White f3fe648675 OpenGL: DoTexSubImage() cleanup.
Use the same pattern for all conditionals: single-call, then row-by-row,
2D case, then 3D.

Bug: dawn:684

Change-Id: I410183815299e9ec2d90790809a056dd578771e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47320
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-13 14:14:54 +00:00
Stephen White 71c33c807f OpenGL: refactor all texture uploads.
We augment the DoTexSubImage() call for the desktop GL fast path
for compressed textures (upload in a single call where possible).

Bug: dawn:684

Change-Id: Id67c39b1efbc8b435b58064cad66a55c153ce675
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47240
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-13 13:58:14 +00:00
Corentin Wallez 78d27e88de Remove usage of deprecated WGSL IO in perf/unit/whitebox tests
Also drive-by fixes some other deprecated constructs (const -> let, and
a disabled test having ancient WGSL).

Bug: dawn:755

Change-Id: I924dfbcbd0a7d0478f3e9b3766585751a0392499
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47620
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-04-13 10:42:44 +00:00
Corentin Wallez 21bd02becf Remove deprecated WGSL "-> void"
Bug: dawn:755
Change-Id: I10f2fb3afd26560df10b21d149a65b625bdb2b4b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47600
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
2021-04-13 09:48:24 +00:00
Yunchao He 71f3d58939 Fix a bug about depth/stencil formats validation
Depth/stencil formats are invalid for 1D and 3D texture.
This change adds this validation rule, and adds a validation
test for it.

Bug: dawn:730
Change-Id: Idac6d1bf7b8c7261eb7b4b59504de10e13d049cc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47200
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-13 06:49:24 +00:00
Corentin Wallez e190045664 dawn_wire: Add support for injecting/reserving swapchains
This will help experiment using dawn_wire for remoting WebGPU to render
on the screen.

Bug: None
Change-Id: I9a60ff8c3889ec917f6fd56e4cbb1ffef639748d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47621
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
2021-04-13 01:26:04 +00:00
Stephen White b676602188 OpenGL: Refactor texture uploads.
Move texture uploads into CommandBufferGL::DoTexSubImage() and use it
for both CommandBuffer CopyBufferToTexture and
QueueGL::WriteTextureImpl(). On the CB side, For now this is only used
for compressed ES textures. Desktop GL has a fast-path for compressed
textures that isn't currently implemented.

Bug: dawn:684

Change-Id: I4da02e9c96c13fd71d133778168a5597efa7b59a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47123
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2021-04-12 23:03:44 +00:00
Ben Clayton c59d0f6014 Reenable D3D12 tests that failed with TINT_UNIMPLEMENTED
Fixed: tint:683
Change-Id: I38bd482063a38ae9aa71047e4fc05dbbc4a1c236
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47423
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-12 20:56:24 +00:00
Ben Clayton fab8bde2ce Reenable D3D12 tests that failed with 'tint_first_vertex_index not found'
Fixed: tint:687
Change-Id: I14eb788f9499f38c2bbe8e0df71399c98281c087
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47424
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-04-12 20:48:34 +00:00
Ben Clayton 120818a600 Reenable D3D12 tests that failed with 'unsupported struct member decoration'
The HLSL writer issue is now fixed.

Fixed: tint:686
Change-Id: I6d4709652d1ca46971a4ad2d150b21ad954ec055
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46450
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-04-12 19:49:54 +00:00
Ben Clayton b06b89e9c2 Reenable D3D12 tests that failed with 'runtime array not supported yet'
Replace TODOs for those tests that now fail with another issue.

Fixed: tint:682
Change-Id: I2665f0d4f495e4efc5adef4cf46a965df7c8936c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46451
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-12 18:45:14 +00:00
Ben Clayton 10ec9a706f Reenable D3D12 texture tests with tint generator
Issues now resolved

Fixed: tint:684
Fixed: tint:689
Fixed: tint:690
Fixed: tint:691
Change-Id: Ib348ed52a17538a023fdd3c8f2cd0c2d847a09ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47427
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-12 18:41:54 +00:00
Ben Clayton 3e2476967d Reenable D3D12 test OpArrayLengthTest with tint generator
Array lengths now work

Fixed: dawn:657
Change-Id: I31d72ae02fb31edbc2143e1d3356681a283a4a16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47426
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-12 18:00:14 +00:00
Ben Clayton 7799571b50 Reenable D3D12 test TwoComputeInModule with tint generator
Bug fixed a while back.

Fixed: tint:297
Change-Id: Ia5f2896de10a67309924cdc93e3a73e1abee7a0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47425
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-12 17:42:56 +00:00
Ben Clayton 51edb2b2d0 Reenable D3D12 tests that use workgroup storage
Now fixed.

Fixed: tint:688
Change-Id: Ic1fcd487e5fc242dc150e9db1a163c2af07c6f09
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46449
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-12 17:41:23 +00:00
Dawn Autoroller faea7f7841 Roll Tint from c8ffbe43a7 to c3bbb4d079 (1 revision)
https://dawn.googlesource.com/tint.git/+log/c8ffbe43a7b3..c3bbb4d079e4

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 alanbaker@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: alanbaker@google.com
Change-Id: I7f19615697faab8ebde0ece7f20637f115c53ce8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47580
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Reviewed-by: Alan Baker <alanbaker@google.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-12 15:20:43 +00:00
Dawn Autoroller edb79bafba Roll Tint from 6f7986d9b5 to c8ffbe43a7 (2 revisions)
https://dawn.googlesource.com/tint.git/+log/6f7986d9b543..c8ffbe43a7b3

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 jrprice@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: jrprice@google.com
Change-Id: I580fe32893452026f6b06e5b0e7ac613aea5f719
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47520
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-10 19:38:49 +00:00
Dawn Autoroller d37aba4573 Roll Tint from c76ec15b45 to 6f7986d9b5 (15 revisions)
https://dawn.googlesource.com/tint.git/+log/c76ec15b4589..6f7986d9b543

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 jrprice@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: jrprice@google.com
Change-Id: I6cfa868d9bb6d6018cdd3467d95a29dafb5a1713
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47460
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-09 18:54:48 +00:00
Brian Ho 8a2c179239 Remove dummy extension types
Now that we have a real extension type (PrimitiveDepthClampingState),
we can replace the dummy extensions used in the WireExtensionTests
with the real deal.

Change-Id: I43dfa66f2cc909b5fc95b55382d3cb53ce022a0f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47300
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
2021-04-09 18:41:19 +00:00
Ben Clayton 9b606f7a25 ShaderModule: Keep the tint::Source::File alive
Tint diagnostics hold a raw pointer to the tint::Source::File, so that source snippets can be printed.
The tint::Source::File pointer was taken from a stack allocation, and the diagnostics were left with a dead pointer.
Have the ShaderModuleParseResult keep the tint::Source::File alive with a PIMPL unique_ptr.

Change-Id: I80d77516afd4012e15992821e060ef3038eba1c1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47422
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
2021-04-09 18:22:28 +00:00
Ben Clayton 9178d9bf35 Tweak BindGroupTests to workaround FXC bug
Constructing a float2x2 from a float4 in a ConstantBuffer by extracting individual scalars with the array-index operator appears to produce invalid DXBC.

Tweak the test so that we use .xy, .zw swizzles instead.

Bug: tint:681
Change-Id: I027f8df96f2a5fda355668b35773d79f4fcdc08b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47421
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-04-09 18:22:18 +00:00
Corentin Wallez 99bfeeb630 D3D12: Implement initial surface-based swapchains
Bug:dawn:269

Change-Id: I012232e71f3b7aba8ea45899b3b1790d07de835c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33785
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
2021-04-09 18:19:48 +00:00
Corentin Wallez 5ce6472b1e Fix D3D12 Sampler Heap tests to reference their bindings in WGSL
Tint only reflects the bindings that are statically used so before this
fix it would produce an empty pipeline layout. Fix this by statically
referencing the sampler binding in the shader.

Fixed: dawn:754
Change-Id: I381acd9adb7d1e80ccf0642b5189750a5a43de25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47420
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-04-09 12:08:18 +00:00
Jiawei Shao 59f2038dce Report error when plane0 is not a valid object in CreateExternalTexture
BUG=chromium:1197329
TEST=dawn_unittests

Change-Id: I801e1d8800c4138e1a3d6040cf623c58063bc30b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47400
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
2021-04-09 07:31:37 +00:00
Dawn Autoroller 4a7c120456 Roll Tint from 933d44a2c8 to c76ec15b45 (8 revisions)
https://dawn.googlesource.com/tint.git/+log/933d44a2c8b9..c76ec15b4589

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 jrprice@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: jrprice@google.com
Change-Id: Ia960626eff24fa6951a6993f6e3f6e59a1c74632
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47340
Reviewed-by: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
Commit-Queue: Dawn Autoroller <dawn-autoroll@skia-public.iam.gserviceaccount.com>
2021-04-08 21:17:27 +00:00