This patch disables Toggle::D3D12DontSetClearValueOnDepthTextureCreation
on Intel Gen11 GPUs as we find it not needed after further tests.
Bug: dawn:1487
Test: dawn_end2end_tests
Change-Id: I2c378568328b758e83484cff514073b052cf5004
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101300
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Just adds the appropriate extensions for AHardwareBuffer support on
Android doesn't yet attempt to expose any.
Bug: dawn:286
Change-Id: I1345d98044bbcaf91cb31235bffbdc28a163c6e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
I forgot to fold this into crbug.com/tint/100861
Bug: tint:1581
Change-Id: I8f8faef7765b525316e2c927504cce88a93d24ee
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101303
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
With constant indices.
Also fix the SPIR-V builder tests that did something completely different from the test name / comment.
Bug: tint:1665
Change-Id: I83537cf6e44ffcb14d54de52649d1f9da1ef7e1b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101182
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds a `location` value into the `Parameter` sem object.
This will be set if the parameter has an `@location` attribute
applied.
Bug: tint:1633
Change-Id: I55cb5cbda951f70d071ebe1400865b63af1fb20a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101065
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL adds an optional location value to the `sem::Function`
which will store the resolved `@location` value.
Bug: tint:1633
Change-Id: I95130858d8a1cecae1389be74120da29fec2b448
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101063
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
These should return `size_t`, not `uint64_t`.
Fixes x86 build.
Change-Id: I83125afc3bce9a9dab7d53c4818f9de3daf4cfb2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101320
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL adds the `@location` of a Struct Member into the
`StructMember` sem object as a `std::optional<uint32_t>`. The
resolver then populates the location value if an attribute is
found during resolution.
This will provide a place to store the evaluated expression value
for a location in the future.
Bug: tint:1633
Change-Id: I6f696968dddf95af1f933d96cdb4a7630badac2e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101062
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Use this instead of ProgramBuilder::FriendlyName() in the Std140 transform.
If this were called, we'd ICE that the program ids wouldn't match the type, as the type belongs to the source program, not the target program builder.
Change-Id: I29066b18789493c231a89f7ee1dbc24d7e66d33f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101180
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Abstracts are now considered scalars, so these should be returning true for abstract-integers.
Change-Id: If15f87932d412663d2aef4f9737675a8ece9e551
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101181
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Modify the AddSpirvBlockAttribute transform to fix top-level structure
access of uniform, storage and push-constant buffers for use in the
GLSL backend. The small change to the transform makes the transform
wrap host-sharable buffers, if they're also used as a
non-host-sharable structure. Also rename the transform to
AddBlockAttrbibute in order to reflect its wider applicability.
Change-Id: Ib2bf4ebf6bce72790791dbae9387032be765e4b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101061
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This reverts commit d144805688.
Reason for revert: offending ANGLE problem should be fixed now
ANGLE bug was fixed here: https://chromium-review.googlesource.com/c/angle/angle/+/3790473
Original change's description:
> Skip tests about writeonly storage texture In render pass on ANGLE
>
> StorageTextureTests.WriteonlyStorageTextureInFragmentShader and
> StorageTextureZeroInitTests.
> WriteonlyStorageTextureClearsToZeroInRenderPass starts to fail on
> the bots after the latest roll of ANGLE, so we have to temporarily
> suppress them.
>
> Bug: dawn:1503
> Test: dawn_end2end_tests
> Change-Id: Id8abf7c0a5bd30e5de12c838f871e1ab896ab4fd
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/97127
> Reviewed-by: Ben Clayton <bclayton@google.com>
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Ben Clayton <bclayton@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:1503
Change-Id: I339eb503b2f8156899b7db3358c9948d58de308d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101066
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
If the let initializer was an abstract numeric that was implicitly materialized to a concrete type, then we could inlining the initializer into the use without the implicit materialization cast.
This could lead to validation errors, and subtly different results in the program.
In this situation, add an explicit cast to keep the types the same before and after inlining.
Fixed: tint:1664
Change-Id: Icca980cf8af74673906ad6c681a6b07d0c1932fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101160
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
The coordinate value may have been hoisted into a 'var'.
So when inspecting the coordinate type, UnwrapRef first.
Fixed: tint:1646
Change-Id: I713018e1dc37d820fdda5694fa214db84cad8ac3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101067
Kokoro: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: David Neto <dneto@google.com>
Auto-Submit: David Neto <dneto@google.com>
This uses template and macro magic to reflect the fields of a class.
Dawn:
* Reflect the fields of the types that are used by Dawn's stream::Stream<T> specializations, and use tint::ForeachField() to call StreamIn().
Fuzzers:
* Replace tint::fuzzers::DataBuilder::BuildImpl<T> specializations with the new reflection system.
* static_assert that the type is either POD or reflected. Add a specialization for std::optional which was missing.
Move tint::transform::BindingPoints into MultiplanarExternalTexture, as this is only used by MultiplanarExternalTexture.
All this reduces fragility of the struct declarations slipping out of sync with the uses.
Bug: tint:1640
Change-Id: I08729c1c356f1b427e85983efe3c2678fc2ce717
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101001
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This transform breaks up matNx2<f32> matrices used in uniform buffers
into column vectors, which fixes std140 layout rules.
Used by the SPIR-V and GLSL backends.
Re-enable tests that were disabled for these cases.
Bug: tint:1632
Change-Id: I596d016582b4189a0b413d762b3e7eabd3504b22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100907
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
This CL fixes up the sample code to use ',' instead of ';' for
struct members. This allows the Animometer and ComputeBoids samples
to execute again after the Tint change.
Change-Id: I96fae4fe3b96b0a6cc596edfd73013f2aa6ef0da
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101060
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This used to live in a `type` namespace, and wasn't prefixed when types were moved to sem.
Change-Id: Ic7a08c2fb40aff034247524c755d9f66157e4da2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/101000
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
The older 1.8.14 has package dependencies on things that are no longer
provided by major linux package distributions.
Change-Id: Ifd3e1911faf6635db3ea7fc346302ea19401cecb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100900
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Lets you lookup a type without modifying anything.
Change-Id: I7a37d37f1c49c7f37f96c35b8e73a66743d9000a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100906
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This CL add missing type conversions for f16, especially for SPIRV
backend which require special handling. A transform,
VectorizeMatrixConversions, are also added for SPIRV to replace a matrix
conversion to a matrix construction with converted column vectors.
Unittests for the transform and SPIRV writer, and end-to-end tests for
all conversion rules are added.
Bug: tint:1473, tint:1502, chromium:1356215
Change-Id: Iaff125e5dd295d35c4ab74757eb56b642802a51a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100483
Reviewed-by: David Neto <dneto@google.com>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Currently fails to build with the following error:
../../third_party/swiftshader/src/Vulkan/VkImage.hpp:24:11:
fatal error: 'vulkan/vk_android_native_buffer.h' file not found
Bug: dawn:286
Change-Id: I7daa992ba775621524ae936e9fa6ed4ee8a5727a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100940
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Add a hash implementation to tint::Number.
Add a utils::Hasher specialization for std::variant.
Add an operator!= for Vector. Needed for std::variants.
Drop the need for explicit on Vector constructors from refs.
These all help general usage with STL and util containers.
Change-Id: I1e594edf532e78f531062c534dacaee7616cded5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100905
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
It's not used any more. utils::Hasher is specialized for vectors.
Change-Id: Ic7c6978ae1f54b608b4dba98abeac077c1be9567
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/100904
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>