The tint::ast::Module holds a diagnostic list (tint::diag::List) which references the source tint::Source::File.
If you try to enable any of the more pretty diagnostic printing functionality, and attempt to print these after ParseWGSL() has returned, you'll then dereference a pointer to the now stack unwound `tint::Source::File`.
Promote the file up one callstack level to fix this.
Bug: none. Only exposed when using pretty printing.
Change-Id: I9432dd9d668fd1d92efa228bb5ed31278fd3ddfc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37280
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
- Implement begin/endOcclusionQuery on D3D12, the query result is binary
(0/1), so we don't need compute shader on D3D12.
- Add end2end tests with depth/stencil/scissor tests enable/disable
Bug: dawn:434
Change-Id: I7b58987a9bc3e7f9cbcdee83f630aaa166582f5f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36860
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Fixes error C2679: binary '-': no operator found which takes a right-hand operand of type 'std::_Array_iterator<_Ty,23>' (or there is no acceptable conversion)
Change-Id: I566b05032da5f68674156eae2901a3f3e7a8acbb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36082
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Currently we only implemented 2D and 2DArray texture. kMaxTextureSize
is actually for 2D texture only. This patch adds a few more constants
for texture size for 1D and 3D textures, and changes kMaxTextureSize
to kMaxTextureDimension2D.
Bug: dawn:558
Change-Id: I9088dd7c060dc096a65abea37c7fb01f760524e9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36540
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Currently it's not clear how to convert timestamps to nanoseconds on
Metal, disable timestamp query extension on Metal until we know how to
do that. WebGPU issue: https://github.com/gpuweb/gpuweb/issues/1325
Bug: dawn:434
Change-Id: If63bd5fe9dccc1fff16a42cddf63e9d8265e65c5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37020
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The test is failing because it seems that SPIRV-Cross is outputing some
of the builtins for the vertex in the fragment shader and vice-versa.
Bug: chromium:1163767
TBR=senorblanco@chromium.org
Change-Id: Iefbc1beb9065a92f1d61776d12c903d4e80648d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37040
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The handling of the default view dimension in the deprecated bind group
layout entry path was checking the viewDimension of the new
sub-descriptor instead of the deprecated viewDimension member. This
meant that viewDimension was always defaulted and "2D".
This commit fixes the issue by looking at the correct viewDimension member
and adds a regression deprecation test.
Bug: dawn:620
Change-Id: Icc133b6d80ba3d88bae30dc9138f1d74e14d12c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36841
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
https://chromium.googlesource.com/vulkan-deps/+log/b08eace32e9c..c493c6112021
$ git log b08eace32..c493c6112 --date=short --no-merges --format='%ad %ae %s'
2021-01-07 chromium-autoroll Roll SPIRV-Cross from 7b7a21c4058c to 234c65c0f32c (3 revisions)
2021-01-07 chromium-autoroll Roll glslang from 480f6039e072 to 3de5cfe50ede (1 revision)
2021-01-06 chromium-autoroll Roll Vulkan-Tools from 4cc0932495ec to a7825740f316 (3 revisions)
2021-01-06 chromium-autoroll Roll SPIRV-Tools from 4ed1f4fce9e7 to aa005e8bd435 (1 revision)
2021-01-06 chromium-autoroll Roll SPIRV-Tools from af3a3d481f6e to 4ed1f4fce9e7 (1 revision)
2021-01-06 chromium-autoroll Roll SPIRV-Tools from 94d1a80159e3 to af3a3d481f6e (1 revision)
2021-01-06 chromium-autoroll Roll Vulkan-ValidationLayers from 98382948dfea to cc435b55410a (2 revisions)
2021-01-06 chromium-autoroll Roll glslang from f77085c307fc to 480f6039e072 (1 revision)
2021-01-06 chromium-autoroll Roll SPIRV-Tools from 6d05ed8410b4 to 94d1a80159e3 (1 revision)
2021-01-06 chromium-autoroll Roll SPIRV-Tools from 37c03859de9e to 6d05ed8410b4 (1 revision)
2021-01-06 chromium-autoroll Roll SPIRV-Tools from d630e5f8c10c to 37c03859de9e (1 revision)
2021-01-06 chromium-autoroll Roll Vulkan-ValidationLayers from 2468aa9630c2 to 98382948dfea (1 revision)
2021-01-06 chromium-autoroll Roll SPIRV-Tools from 1bb80d2778a3 to d630e5f8c10c (1 revision)
2021-01-06 chromium-autoroll Roll glslang from 9325cc013e3d to f77085c307fc (1 revision)
2021-01-05 chromium-autoroll Roll Vulkan-ValidationLayers from 57255a663ed9 to 2468aa9630c2 (1 revision)
2021-01-05 chromium-autoroll Roll Vulkan-Loader from 1f0c7868a438 to 9ba835885ffe (1 revision)
2021-01-05 chromium-autoroll Roll Vulkan-ValidationLayers from 56a96658b750 to 57255a663ed9 (3 revisions)
2021-01-05 chromium-autoroll Roll Vulkan-Loader from 294480cb7f3e to 1f0c7868a438 (1 revision)
2021-01-05 chromium-autoroll Roll Vulkan-Tools from 7554321b88ae to 4cc0932495ec (2 revisions)
2021-01-05 chromium-autoroll Roll Vulkan-Loader from 66a23ac8c566 to 294480cb7f3e (1 revision)
2021-01-05 chromium-autoroll Roll Vulkan-Headers from 85470b32ad5d to 9efc4a631161 (1 revision)
2021-01-05 chromium-autoroll Roll Vulkan-ValidationLayers from aa076dae88e2 to 56a96658b750 (25 revisions)
2021-01-05 chromium-autoroll Roll glslang from f426f652299d to 9325cc013e3d (1 revision)
2021-01-05 chromium-autoroll Roll SPIRV-Cross from e50f7d1ce8e1 to 7b7a21c4058c (3 revisions)
2021-01-05 chromium-autoroll Roll SPIRV-Tools from 17ffa89097b2 to 1bb80d2778a3 (1 revision)
2020-12-21 jmadill Rolling 8 dependencies
TBR=senorblanco@chromium.org
Created with:
roll-dep third_party/vulkan-deps
Change-Id: I8dffafc888ed2d54c38a14cfb2f1521a2c85dcc1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36840
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The plan of record is to use Tint for back end generation on these
platforms for launch, so there is no need to fuzz SPIRV-Cross on them.
The GLSL fuzzer will remain for now, since the PoR has native support
for GLSL using SPRIV-Cross.
Change-Id: I8d6bf76b2b81e9bbc158fa8c5a63b119060abbe5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36701
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
This allows us to roll all Vulkan- and SPIRV-related dependencies
simultaneously (which are often inter-dependent).
This change also implicitly rolls the dependencies to the revs in ANGLE.
Change-Id: I50a1e5b2ef706ffbfbc22f5783321820bb50ae96
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36500
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch enables all the tests in CompressedTextureZeroInitTest
on Windows/Intel/Vulkan after the upgrade of Dawn try bots.
BUG=dawn:601
TEST=dawn_end2end_tests
Change-Id: Ida4278ae50ef45b2347462be986e5490a921f988
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36560
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
After the server is destroyed, the server's can't do anything like
forward callbacks to the client. Track this with a weak_ptr and
return early if it has expired.
It also updates device destruction in dawn_native so the lost
callback is always called, even on graceful destruction. This
is consistent with the rest of WebGPU where all callbacks are
guaranteed to be called in finite time.
Bug: chromium:1147416, chromium:1161943
Change-Id: Ib80dea36517401a2b8eafb01ded255ebbe757aef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35840
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
It's come up multiple times that ASAN doesn't support
std::nothrow which leads to OOM bugs filed by the fuzzers.
Use a common helper to avoid this and return nullptr for large
allocations when ASAN is enabled.
Bug: none
Change-Id: I492b4ff4e498cf82d4ca08ba849671d3d16b9cfb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36280
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
In timestamp compute shader, we will create an internal buffer for
resolving QuerySet and use it as input buffer in compute shader,
the user-provided resolve buffer is used as output buffer.
This will cause the buffer zero initialization to be called twice,
one is the internal buffer is zero initialized in ResolveQuerySet,
antoher is the user-provided buffer is tracked as pass resource
and need to be initialized. But for ResolveQuerySet(), we expect
there is only once.
We have no special requirements to have an internal buffer. It is
possible to directly use the user-provided buffer for read and
write becuase it will get STORAGE_INTERNAL usage.
Bug: dawn:434
Change-Id: Ia8c8ac6e9ba23fea31468a6d9b4580eece189be2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36201
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
- Get timestamp period on each backend
D3D12: Get GPU frequency(HZ) from queue and calculate the period in ns
Vulkan: Get timestampPeriod from device properties
Metal and others: don't need the period
Bug: dawn:434
Change-Id: Ia5588a3dccadfe92d7384b9fdf1e6848c6e5c6e2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36220
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This patch fixes a bug in the implementation of the toggle
UseTemporaryBufferInCompressedTextureToTextureCopy on Vulkan backend.
The previous implementation only considered the T2T one-layer copies,
which will cause the validation error by Vulkan validation layer. This
patch fixes this issue by adding the missing support of multi-layer
copies.
This patch also fixes the failures in the WebGPU CTS tests
color_textures,compressed,array,* on the Linux/Vulkan backends with
Vulkan validation layer enabled.
BUG=dawn:42, chromium:1161355
TEST=dawn_end2end_tests
Change-Id: Ic437919a843b8439d267b8d75b27ade3a9e7bcae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36260
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Adds the first type trait that checks that the equality operator is
defined for two types.
Bug: dawn:441
Change-Id: Ied80c5d876739272c07d513727a3ee709a721eab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35522
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
SPIRV-Cross still emits some comments, so for now, just check that
the specific guard comments Dawn uses are not contained in the HLSL
output.
Bug: dawn:549
Change-Id: Ia6d32befa5ef983e56494542d46e9c3592b6480a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36300
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This patch enables CompressedTextureFormatTests on Win/Intel/Vulkan
after the upgrade of Windows try bots.
BUG=dawn:42
Change-Id: Ifad6634973ef30af7f416798973325a5fa7cbe67
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35920
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Adds some maxAnisotropy implementation.
Adds an end2end test, drawing a slanted plane with a texture of which each mipmap has a different color, with different maxAnisotropy values.
You can get an idea of what it does at https://jsfiddle.net/t64kpu81/85/
Needs further CTS.
Bug: dawn:568
Change-Id: I89ac56d8cf0fbb655358bf6effa016ddc1f8426f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35143
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
- Limit the maximum query count to 8192 to fit Metal restriction.
- Add unittest tests of query count and remove the test of buffer
size overflow validation on 32-bits.
Bug: dawn:434
Change-Id: Ie573b715cc3f67ec158996119a8b4a49e493680a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/36021
Commit-Queue: Hao Li <hao.x.li@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>