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>
Multisampled textures can only be 2D, not 2D Array. Remove disabled test.
Change-Id: I11363dc299b94f7c18c9503cdc5af77ecb0917d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104466
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Using `array count` is closer to the language seen in the spec and
clarifies the error messages.
Bug: chromium:1367602
Change-Id: I24388496b3a58c6a4fc62cc2db91c7ad8ca1a371
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104241
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
A few of the robustness tests were missing due to lack of shadow and
override support when robustness was implemented.
This CL adds and enables the missing tests.
Change-Id: I3e4526a21b2d0106d0756e67de258c5441c6f8b8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104468
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL enables a couple const evaluation tests since the operators are
implemented.
Bug: tint:1581
Change-Id: Id4fe1221fed495a8c98d7120f7fd49a0455ac100
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104465
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This reverts commit d909f2b9c5.
Reason for revert: Since https://crrev.com/c/3924863 landed in ANGLE, I was able to land https://crbug.com/dawn/104120 in Dawn, so these suppressions are no longer needed.
Original change's description:
> dawn: Suppress tests that fail on ANGLE/SwiftShader
>
> Fails roll of SwiftShader into Dawn. See crbug.com/dawn/1557 for
> details.
>
> Bug: dawn:1557
> Change-Id: Ibe97f1c3083b1fe254dd935b4abfdfbea9e34050
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104260
> Reviewed-by: Brandon Jones <bajones@chromium.org>
> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
> Kokoro: Kokoro <noreply+kokoro@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: dawn:1557
Change-Id: I86f0c33d2c737c0e6ee92fc73e2f7051c513ed10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104501
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL removes the DISABLED writer tests for hex float infinity and
nan. The resolution is that these cannot be written in WGSL.
Change-Id: If7aef3a005ac438fdbd9d84c5843899d15c1a7ad
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104469
Reviewed-by: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
The SPIR-V tools roll to pull in the correct spelling of `preceded` has
landed. This CL re-enables the SPIRV-Reader tests with the correct
spelling.
Bug: tint:1406
Change-Id: I303b4b6d742f4bfcc76c6fcce66e4e1cef37b1af
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104464
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
The referenced test is no longer disabled, so remove the DISABLED
marker.
Change-Id: I46b192d593a9f1dd22ef73fd936b63ac3ed92104
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104470
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
This CL adds element count limits to arrays. In FXC there is a maximum
of 65536 elements in an array. This limit is not yet in WGSL, but adding
this here allows us to fix the issue with large arrays and GLSL.
Bug: chromium:1367602
Change-Id: I7df9d3e4f6c3e5107420d5f8e576d1f33e453161
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104240
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
When an imported texture with layout UNDEFINED was never used and then
exported with target layout UNDEFINED, Dawn would create a queue
transition barrier with dstLayout UNDEFINED which is not allowed by the
Vulkan specification. Instead detect this case and transition to
GENERAL.
Found by running dawn_end2end_tests with the VLL.
Bug: chromium:1258986
Change-Id: I5e36efda35cb27cecc0683846a314783a8a72fe6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/103025
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>