UV plane's coord should be half of that of Y plane for NV12.
Bug: chromium:1415832
Change-Id: Icee851e61eca1f7da291285100f8edcce482b511
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119860
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Jie A Chen <jie.a.chen@intel.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Validate as the bind group lazy aspect at each dispatch/draw
call.
Use nested loops to iterate through each bind group and binding
to find if any aliasing exists, which has time complexity of
O(N^2) and can be further optimized to use O(NlogN) algorithm.
Bug: dawn:1642
Change-Id: I8c43128cdeea75352c194752fb22258b6a73430e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/118440
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This Cl adds the requires directive into Tint. Using the directive is
currently always an error as there is no valid value which can be used.
Bug: tint:1843
Change-Id: Idf77ba4e95ff0c1e177d02d1ba9598edc89a9812
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120740
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
- Plumbs all descriptors through so that the objects act much more like
a real implementation.
- Lots of changes to DestroyObjectTests.cpp to update usages and test
through the APIs when applicable.
- Put in defaults for the mock device and make it as easy to use as
possible.
Change-Id: I85b243a18ec1872aff0172549aec0f599967ea0e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/119821
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
This follows the recent semantic from the WebGPU spec and fixes a couple
failing CTS tests.
Bug: None
Change-Id: I9197ea3fda6c15bd9302f8d60e70ee00f1d37708
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120980
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
The dependency graph no longer errors if a symbol cannot be resolved, instead the ResolvedIdentifier now has an unresolved variant.
This is required as the second resolve phase only has the full context of the identifier usage, to provide the hints.
Also: Split Slice out of the utils/vector.h, so it can be used as a lightweight view over static data.
Fixed: tint:1842
Change-Id: I31fa7697790be24c35b7e4fab5ca903c8a7afbba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121020
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Emits the new OverloadFlag::kMustUse flag on the annotated overloads.
Nothing consumes this, yet.
Bug: tint:1844
Change-Id: I4eb0943a23eaf5de98cd63444a686cffe62fb36e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120920
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
This CL adds parsing of the `@must_use` attribute into the WGSL parser. The WGSL
generator is also updated to emit the attribute.
Bug: tint:1844
Change-Id: If8821c9ac534b866cbe042128a00a582a245c3de
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120821
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
These uses are already in the ast namespace, so do not need the extra qualification.
Change-Id: I5e66048c9485c55b72e61ffa5b85b17ba1c780d0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120761
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Query D3D12_FEATURE_DATA_D3D12_OPTIONS13 to determine whether the device
supports copies between textures of different dimensions. If it does
not, or if D3D12_FEATURE_D3D12_OPTIONS13 is not supported, force enable
toggle
D3D12UseTempBufferInTextureToTextureCopyBetweenDifferentDimensions.
Fixed: dawn:1216
Change-Id: I976e7fad291126f8dcee31ce6b681314d38e69e7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120882
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Austin Eng <enga@chromium.org>
Hoisting a constant array with an abstract type may change its
materialized type when using type inference, so use explicit typing
instead.
Fixed: tint:1847
Change-Id: I890826945bac7a2b7d8a0b84967f9d3c9ba439b7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120901
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Invalid programs could attempt to construct an ast::TemplatedIdentifier with no template arguments.
In this situation an ast::Identifier should be constructed instead.
Bug: chromium:1417465
Change-Id: Id1516cd83679947b5346c69ce5453d72f4f93b49
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120841
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL removes two deprecated fields from the inspector. The deprecated
alias to sem::SamplerTexturePair remains as it will require creating a
structure on the inspector side to replicate.
Change-Id: I6001fbd475260079dd49d50f8e8619241bb0b468
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120880
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
That resolve to parameters.
Bug: chromium:1417513
Change-Id: Id7722524acbd9a9a26543cb73f48c8823dd51356
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120840
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This CL makes the builtin argument resolve as a shadowable enumerator
expression.
Bug: tint:1841
Bug: tint:1845
Change-Id: I5000ea91771fabb460c80c164bc7708fbbb0288c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120722
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds the `@must_use` ast node and hooks it into the
program_builder.
Bug: tint:1844
Change-Id: I2ffe99bbf29ec287446788253aa8cf63cc4da50b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120820
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
The `static_assert` builtin has been replaced with `const_assert`. This
CL removes the deprecation.
Bug: tint:1807
Change-Id: Ibcdc75e167bf6c1a6f74c295d9dcac7fff884d3a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120580
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL makes the builtin argument resolve as a shadowable enumerator
expression.
Bug: tint:1841
Bug: tint:1845
Change-Id: I2aaa2c63025752f25c113cf2fb38f4d91c2c16c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120680
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
`type` has been deprecated in favour of `alias`. This CL removes the
deprecation warning and moves `type` to a reserved word.
Bug: tint:1812
Change-Id: I05246b9887a0890ae8343a0a132bd6f93353d5ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120540
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
A simple MD file to show the source set hierarchy which constrains where
includes can go in Tint.
Change-Id: Ia360430793faef01503260f29f88ef361bb91611
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120443
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This CL moves the ast::InterpolateSampling and ast::InterpolationType to
builtin::
Change-Id: Iad9365ff629cbb7b3b03de6a4cd9355a21ce287e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120442
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This patch replaces D3D12_BLEND_DEST_ALPHA with D3D12_BLEND_ONE
when the color target formats have no alpha-channel.
Using D3D12_BLEND_ONE is an optimization over
D3D12_BLEND_DEST_ALPHA as it means the GPU hardware doesn't
need to get destination pixel at all. As D3D SPED requires the
default value for missing components in an element format is
"0" for any component except A, which gets "1", using
D3D12_BLEND_DEST_ALPHA takes same effect with
D3D12_BLEND_ONE when the color target formats have no alpha
channel.
In addition, replacing D3D12_BLEND_DEST_ALPHA with
D3D12_BLEND_ONE also serves as a workaround against an Intel
driver issue about alpha blending.
Bug: dawn:1579
Change-Id: If79e4c8007b68dd35e142ba9cf8a4921e611890a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120120
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This CL moves DiagnosticSeverity and DiagnosticRule into the builtin::
hierarchy.
Change-Id: I3884046f042d130fa44556f63163f0040381e69c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120440
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL moves the AddressSpace enum from type:: to builtin::
Change-Id: Ie8d533be4dd42b34eef164b64e2c9e0843de5c3d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120401
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL moves the type::Access builtin to the builtin:: tree.
Change-Id: I3276d364f7b597671612a23c8823f0afd1914d81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120363
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Change the address space and access mode in ast::Var from enums
to Expressions. Have the resolver resolve these, like we do for
other template arguments.
As the AST nodes now have identifier expressions, the tint-internal
'in' and 'out' address spaces have been prefixed with underscores to
prevent input code from using this.
Change-Id: Ie8abf371ee6a7031613709b83b575d2723418fcf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120405
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Just use kUndefined.
Change-Id: I26eada75a31b26f83e132a9a15c8ff64f7821676
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/120404
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>