This commit removes the lines from RefBaseTests.cpp that access
a moved-from object after move. This change removes "use-after-
move" clang-tidy warning.
There is no pointing testing the behavior of moved-from objects
because it can be avoided with clang-tidy check.
Bug: dawn:1439
Change-Id: If2144db2b50ad3f5a6d7a8d402b2978db4d8bd16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92620
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL adds the ability to parse the `@compute`, `@fragment` and
`@vertex` attrbutes. The `@stage(...)` are still accepted and are not
marked as deprecated yet.
Most tests are still using `@stage(..)` except for a testing one.
Bug: tint:1503
Change-Id: I85cad5996605035e83109b021ffb13db98b1a144
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92480
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Functions GetMipLevel*Size() are somehow unclear and misleading on
whether the array layers are counted into the z-axis of the returned
Extent3D (Extent3D.depthOrArrayLayers).
This change renames them to GetMipLevelSingleSubresource*Size(),
making it clear that array layers are not included in its z-axis.
Because different array layers are different subreources, they are
not in a single subresource. However, depth slices in 3D textures can
be in a single subresource and can be counted.
Bug: dawn:1288
Change-Id: Ifa1776befa863d0f5a11999cab4099e2e7e5996a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92124
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Add D3D12 pipeline caching impl: store cachedPSO blob in cached blob.
Record root signature ID3DBlob in cache key together with
D3D_SHADER_BYTECODE, D3D12_GRAPHICS_PIPELINE_STATE_DESC or
D3D12_COMPUTE_PIPELINE_STATE_DESC.
Shader caching is not added.
Add some pipeline caching negative tests.
Bug: dawn:549
Change-Id: Id1cb560b49f1cf495860e2e0bcf92d8d988c5379
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91180
Auto-Submit: Shrek Shao <shrekshao@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Some unittests break the clang-tidy rule
"bugprone-use-after-move". Moved-from variables after move
shouldn't be accessed even in the tests. No one should care
the behavior of moved-from objects. There is no pointing
testing something that shouldn't be observable with good code
practice ensured by clang-tidy.
This commit fixes the problem by removing the lines accessing
moved-from variables after move.
Bug: dawn:1436, dawn:1437, dawn:1438, dawn:1440
Change-Id: I5a6ccaa6fa74e607f818b5296a1715196bfd0f25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92204
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Takahiro <hogehoge@gachapin.jp>
Reviewed-by: Ben Clayton <bclayton@google.com>
Use planeLayouts instead.
Bug: chromium:1258986
Change-Id: I16c041a8e0b739fa347ea4695988ad1eed82cccc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92202
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Add support for @const to builtins in intrinsics.def.
Propagate this flag through to the intrinsic table.
Handle builtins that are @const annotated in the resolver.
Currently no intrinsics are decorated with @const, so there's nothing to
test (yet).
Bug: tint:1504
Change-Id: I172483688617782bd7c58b70e3f38d0222a5d1af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92323
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
If the builtin has values passed by literal, let or const, then they may
be evaluated at shader-creation time, which makes the tests almost useless.
Bug: tint:1504
Change-Id: I004f49ec4b3430c8015e65d3fde1f5fa4fdd10f9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92322
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Turn on resolving of abstract-integer and abstract-float types, as well
as materialization to their concrete types.
Bug: tint:1504
Bug: chromium:1330805
Fixed: tint:1572
Change-Id: I09c95406e11b64bb0267fe7b1ed08af986dbd553
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91840
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
mv test/tint/builtins/gen -> test/tint/builtins/gen/literal
We're going to add another set of these for builtins that use 'var' for
each argument.
Change-Id: I1b4ad1495ddccd48232603db2205bf50af9e36b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92320
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
The abstract-numeric work has fixed this, by removing the error for
small floating point numbers.
Fixed: tint:1332
Change-Id: Ibf7382795210220d343d62fe22d201cf67db1ccc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92244
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Update expectations and ts_sources
70091fdb8d..d275c5e1e3
- d275c5 Factor copyToTexture:canvas tests common code. (#1497)
- e4ee0a Add api,validation,resource_usages,buffer,in_pass_encoder:* - Part IV (#1496)
- 24c2a7 Add api,validation,resource_usages,buffer,in_pass_encoder:* - Part III (#1480)
Created with './tools/run cts roll'
Change-Id: I95e875667222fcd3f262ed253ac9179f1cd941f2
Cq-Include-Trybots: luci.chromium.try:dawn-try-win10-x86-rel,linux-dawn-rel,mac-dawn-rel,win-dawn-rel
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92260
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This was always constructing the elements with AFloat, when it should pick between AInt / AFloat based on the type T.
Bug: tint:1504
Change-Id: I2dd4a9bcd829c47c9b0e8d730c5f58a5266d3626
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92240
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This is required to handle materialized values, and for constant
expressions.
Bug: tint:1504
Change-Id: If0a49e9b03566c06aa6e4e4c284fc427e1541e91
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92082
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Constant::AnyZero(), Constant::AllZero() now consider -0.0 as non-zero,
as this is different from WGSL's zero-initializer value for floating
point numbers.
Also consider FP sign for Constant::AllEqual().
Bug: tint:1504
Change-Id: I00503880ee29bd741b94cc98909a8a823e32522a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92243
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
This is required to handle materialized values, and for constant
expressions.
Bug: tint:1504
Change-Id: I79ad567954de2d1cfea09dda255894e4e2aa678e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92081
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This member will be removed. This first requires removing code setting
it in Chromium, which will make it contain garbage value. If we kept
validating it, then we'd fail validation spuriously.
Bug: dawn:1445
Change-Id: I8daa90b949db867b89fcf955cfaec45f7845210f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92241
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The CTS runner can randomly pick between these two GPUs, leading to unstable expectations.
Just use 'intel' for now. We might get a more targetted tag in the future, but this will do for today.
Bug: dawn:1387
Bug: dawn:1444
Change-Id: I2c77ab0060976c40e34b1597b5594894867b7edd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92242
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
In this patch NumWorkgroupsFromUniform::Config changed to storage
std::optional<sem::BindingPoint>, and if it has no value,
NumWorkgroupsFromUniform will choose a free binding group, i.e.
binding 0 of the largest used group plus 1 is used if at least one
resource is bound, otherwise group 0 binding 0 is used. Tint CLI
is also changed to provide a --hlsl-root-constant-binding-point
option allowing user to specify the binding point for num_workgroups
uniform buffer.
Bug: tint:1566
Change-Id: I3b8c22a4276bab722d901f5b07d23a268786c417
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91980
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
This is required to handle materialized values, and for constant
expressions.
Bug: tint:1504
Change-Id: Ic3ac62317241fa6f7009360128f222aeb56f62e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92083
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This is required to handle materialized values, and for constant
expressions.
Bug: tint:1504
Change-Id: Ie0177f148e08a0e1a3f4d7e06e283f121655804b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92080
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
This uses VkImageDrmFormatModifierExplicitCreateInfoEXT instead of
VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_LIST_CREATE_INFO_EXT to
import mulit-planar external images.
More discussions about this change can be found at this Mesa issue:
https://gitlab.freedesktop.org/mesa/mesa/-/issues/6530
Bug: chromium:1258986
Change-Id: Ifde3d89e7ddf37d6a295c9d7fcc7c762f8da1e81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91940
Reviewed-by: Jie A Chen <jie.a.chen@intel.com>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
We were missing an `UnwrapRef` when generating the return type, and
were generating invalid SPIR-V when the value being stored was a
reference. The auto-generated builtin tests only test with literal
values.
Fixed: tint:1573
Change-Id: If42280b3cc8ad3fba7355d333e02400c6db843fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92144
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Once abstract-numerics are supported, we encounter our first ambiguous
overloads which need resolving. Implement this.
Bug: tint:1504
Change-Id: I79ade04ac3c7ae754b92cb0691b46f449766824a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91964
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
We're not supporting these, even as hex-floats. Replace them with finite
float values.
Bug: tint:1504
Change-Id: Id5e304d2bdd79576b68b43a1afb5cce2cd6ad01a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91967
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Many backends can produce cleaner code if all the elements are zero or
the same value.
Bug: tint:1504
Change-Id: Iff3227884473b0be42395e4a637a7fe0b7a1b238
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91966
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>