Tells you if there's an abstract numeric somewhere in the type.
Change-Id: I0573be9e57ec48f2fa63c46944214e7f5be7d67c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104823
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: dan sinclair <dsinclair@google.com>
Returns a materialization of the given argument.
Bug: tint:1697
Change-Id: Id25f7e10baa884047af21f89245884c551560f7b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104822
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Nicer names if we add some "_tint_*" builtins
Change-Id: I7574f5cfeeeb04ec5910b20068aa0dd12a460bd5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104821
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
In 104681 the vectors were cast to themselves to fixup an issue
with `packed_int`. That CL used an `as_type` which does a bit cast.
A `packed_int` can not be bitcast to an `int`. This CL changes to
a type cast, so instead of `as_type<int3>()` it does `int3()`.
Bug: tint:1677
Change-Id: I72218c06853e4e5ae1a0d34e2fc3e1ca597de993
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104682
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Qualcomm GPUs are apparently decoding textures with a lower precision,
resulting in some of the rendered values when verifying the texture in
a test to be off by +-1 on any given channel. This change adds a
tolerance to those tests to allow a little wiggle room, since compressed
textures are inherently lossy anyway.
Allows Qualcomm GPUs to pass all compressed texture end2end tests.
Bug: dawn:1562
Change-Id: I08a21b9ce361486c247c34640080b369ae2b799d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104622
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
When converting floats to string, we now enforce the "C" locale, so
decimal points will be written as "." rather than the "," separator
used natively in some European locales.
Also, we now use operator>> to read back the number instead of
std::stof. std::stof works in the system locale, and will fail to
read back floats with the wrong decimal separator. (Also, std::stof
will throw if the number is out of range and can't fit in the
destination, which implies that the `if` check was probably never
failing.)
Skia encountered similar issues: see http://review.skia.org/587536
for the Skia implementation.
Change-Id: I5aded6acc7cfcf2ad4d5b974bc30c3b645eaec51
Bug: dawn:1686
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104680
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
- Make the const eval builtin tests use the same framework as the
unary/binary op tests, allowing for Vector cases.
- No longer always use float compare, instead enable it per case.
Currently this is necessary because atan2 doesn't always return the
same constant for PI on all platforms.
- Add vector cases for atan2 and clamp.
Bug: tint:1581
Change-Id: I7eaec10b4f9685c913a9d0d17b47c413f659be7a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104424
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
The `type_decl` term in the spec was updated to `type_specifier`. This
CL updates Tint to match.
Bug: tint:1633
Change-Id: I264ae78a4b09c3c69d8673e24fe4f60975539b8f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104421
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
This CL updates the address space template to remove some usages of
`stoarge`.
Bug: tint:1404
Change-Id: I4c10f62886d2be4b03bce85dac9d58e3547ca60b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104423
Reviewed-by: Ben Clayton <bclayton@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Several of the disabled tests were added for things we may want to add
in the future. This CL removes those tests and we can add back if/when
we decide to implement the feature.
This brings the disabled tests from 69 to 31.
Change-Id: I22b66256ce4086f223d3be059450eab1a2ff7693
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104462
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: David Neto <dneto@google.com>
The const evaluation of `<` has been implemented so the DISABLED const
evaluation tests can now be enabled.
Bug: tint:1581
Change-Id: I0cddad12aa637da6ae4cf8299517be723e410692
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104463
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Using any other desiredLayout is deprecated. This simplifies future
changes which as much as possible eliminate any transitions during
texture export.
Bug: chromium:1359106
Change-Id: Ifb5818775e8f15ec77a229d3cbf593348740da46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104543
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
These functions don't need the device or external semaphore service
at all. Make them free functions so that a future change can allow
the handles to be closed after the device has destroyed its semaphore
service.
Bug: chromium:1359106
Change-Id: I246dd0a8f3f972c4547503d16bf8b00db14cdf58
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104542
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This moves handling the wait semaphores to the same place that the
signal semaphores are handled. It fixes a bug where the semaphores are
never waited on and never deleted if a texture is imported and then
exported without being used.
Bug: chromium:1359106
Change-Id: If226a38946d4a16598d78841e7b204ea91f8bbea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104541
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
The D3D12 fence share handle should be closed when the device is
deleted.
A future change will make it valid to call EndAccess after the device
is destroyed, thus the handle is closed in ~Device instead of
Device::DestroyImpl. It needs to live as long as ExternalImageDXGI
holds a reference onto the device.
Bug: chromium:1359106
Change-Id: Ib9c9aaa7fb0b5a3de035b512f8fc0316d4bd225e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104540
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Sunny Sachanandani <sunnyps@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This reverts commit 5f9996dc9c.
Reason for revert: Issues around locale, will be revisited in a different fashion.
Original change's description:
> Replace std::stof with std::strtof.
>
> std::stof can throw std::out_of_range if the input is not actually
> representable. We had similar code in Skia which was using stof to
> test that a stringized float would round-trip successfully, and it
> would throw an exception on some older versions of libc++ for edge-
> case inputs like FLT_MIN.
>
> std::stof is documented as using strtof to do its conversion, so this
> shouldn't change your results in practice; it just removes the part
> where it could potentially throw for some inputs.
>
> Tangentially, have you ever seen a case where the scientific-notation
> path gets used? According to brucedawson@, nine digits should always
> safely round-trip (in 2013, testing gcc and MSVC). See
> https://randomascii.wordpress.com/2013/02/07/float-precision-revisited-nine-digit-float-portability/
>
> Change-Id: Ie215fb8502dd8c554020c6f73432f91e3d756563
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104500
> Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
> Commit-Queue: John Stiles <johnstiles@google.com>
TBR=dsinclair@chromium.org,johnstiles@google.com,noreply+kokoro@google.com,dawn-scoped@luci-project-accounts.iam.gserviceaccount.com,dsinclair@google.com
Change-Id: I825f5677f98dea1a13b6423ec18ae3a1e750ce09
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104502
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: John Stiles <johnstiles@google.com>
In D3D12, objects need to be kept alive until they're done being used on
the GPU. This is particularly important for wait fences imported into
Dawn otherwise the waits don't happen sometimes.
Bug: dawn:576
Change-Id: Id2d8af59f1530a1e507471cf2e4653ac5cfbae06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104425
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Messages could be ignored if:
- They are not associated to any device (for example an issue around
instance or adapter operations)
- They happened between the last Tick() and device destruction.
Fix both cases to print the error to the dawn::ErrorLog and crash in
debug so that the errors are visible.
Bug: chromium:1258986
Change-Id: I9a88cd078c60b42deb2336da038902639f9a35ae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104360
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
The TypeDeclInfo Resolver struct is not used. Removed.
Bug: tint:1313
Change-Id: I45eb432c8e7bc2cf4a98ea83cf36e8e6e374e4cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104461
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
The BlockInfo structure is not used in the resolver anymore. Removed.
Bug: tint:1313
Change-Id: Ie2fd2f5e4d473d1b113a2a65f79d2080f5bb6ab1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104460
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This CL removes the empty FMix disabled test from the GLSL and HLSL
generators. There is no FMix in WGSL.
Change-Id: I620ed796249ce20b4b5ecb95e3035681743455c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104467
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>