This change adds storage binding type tests for 3D texture. It turns
out that it is working. There is no additional work to be done.
Bug: dawn:547
Change-Id: Ia749200e7d371ad549405ff63c198ea4a27924c0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57120
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
If enabled:
* Don't enable the renamer transform. Helps with readability.
* Emit the produced WGSL when combined with --force_wgsl_step
Change-Id: I336de6e6a4eee08805eee82847bd97cd5a942306
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57040
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Enough FXC workaround have been added to tint that these tests now pass again.
Fixed: tint:904
Change-Id: I6dd355d131ab903ae579391c0bfce93979dfc4f1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57041
Commit-Queue: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
When SPIRV-Cross we always reflect samplers as regular samplers. A
recent change implementing proper validation broke programs using
comparison samplers in that path.
Skip that bit of validation when using SPIRV-Cross, that hack can be
removed once we use Tint unconditionally for reflection.
Also reenables some BGL-ShaderModule compatibility tests with
SPIRV-Cross to cover the "fixed" validation.
Bug: dawn:571
Bug: dawn:367
Change-Id: I2d1a65aaea717b4927ac4e838942547a1b413d33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56900
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Removes the last remaining code paths supporting the old rowsPerImage
and bytesPerRow defaulting behavior, and updates all related tests to
strictly expect the spec-complaint behavior.
Change-Id: I022db0b142939d82e33d5989460488881e5a1ab3
Bug: dawn:520
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56803
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Also adds the new limits for maxComputeWorkgroupSize because there are
few systems where the .Z of that limit goes above 64.
Bug: dawn:796
Change-Id: I52e85e7b7c666da15493178e170ca82922d34017
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56082
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
TimestampQueryTests.ResolveTwiceToSameBuffer fails on Intel latest
driver on Windows, because the kInternalStorageBuffer is not treated
in buffer usage when adding resource barrier.
Add missed kInternalStorageBuffer in buffer usage and remove
D3D12_RESOURCE_STATE_UNORDERED_ACCESS from QueryResolve, which will be
added by kInternalStorageBuffer.
Bug: dawn:797
Change-Id: I78607002179ba443b0db09c9c3bbc85fcc97a85b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56523
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Renames dawn_native::ComponentTypeBit to SampleTypeBit and makes
the bitmask match wgpu::TextureSampleType. wgpu::TextureComponentType
should be removed in a follow-up CL.
The Format table is augmented with float/unfilterable-float information
so that textures can be validated against the BGLEntry's
TextureSampleType.
EntryPointMetadata::ShaderBindingInfo no longer inherits BindingInfo
because the two types are diverging further. Most notably, this CL
reflects from Tint the supported SampleTypeBits for texture bindings.
This bitset is validated against the bind group layout.
Adds an isFiltering getter to SamplerBase. A filtering sampler must
not be used with a non-filtering sampler binding.
Lastly, the CL reflects sampler/texture pairs from Tint and validates
an entrypoint against the pipeline layout that a filtering sampler is
not used with an unfilterable-float texture binding.
Bug: dawn:367
Change-Id: If9f2c0d8fbad5641c2ecc30615a3c68a6ed6150a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56521
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Dereferencing a nullptr is UB by spec, even if the method called is
non-virtual and no memory access to nullptr appears to actually occur.
For example:
error: 'this' pointer cannot be null in well-defined C++ code;
comparison may be assumed to always evaluate to true
[-Werror,-Wtautological-undefined-compare]
Bug: b/179840737
Change-Id: I6385e157e9a883cdd65f5ef9be89bcc3a29324fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56720
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The single DAWN_ENABLE_OPENGL flag in the root CMakeLists.txt did not define
DAWN_ENABLE_BACKEND_DESKTOP_GL or DAWN_ENABLE_BACKEND_OPENGLES, so examples
with `-b opengl` reported `Backend isn't present` and failed to start.
ENABLE_OPENGL flag in root CMakeLists.txt was replaced by ENABLE_DESKTOP_GL
and ENABLE_OPENGLES flags, repeating the logic of similar flags
in GN buildsystem as done in src/common/BUILD.gn
and scripts/dawn_features.gni.
Change-Id: I6302de7aa98436ddc0aa002d83dd6b3e7102e49c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56283
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Sergey K <sergey.ext@gmail.com>
Tint:
* Use the new transform::VertexFormat enum names
WGSL:
* The [[set(n)]] decoration is now [[group(n)]]
* [[builtin(vertex_idx)]] is now [[builtin(vertex_index)]]
Change-Id: I9cbf1368074488c4bb7fa81430bb12ec7581c1fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56540
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Tint's vertex pulling transform supports the whole GPUVertexState so
we can enable it by default when robustness is necessary.
Adds a suppression for failing tests on Metal Intel.
Bug: dawn:805
Bug: dawn:966
Change-Id: Id7b2c6df2291671164647f65fc50c61e27de90b9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56382
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The test bots now instantiate separate test suites with/without
this toggle.
Bug: dawn:571
Change-Id: Ib4e8e89ac347d0030b233d1a3b14b318aa862aa6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56440
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This will help check that the Vulkan devices are enough for WebGPU in
a following CL.
In addition to additional limits this CL:
- Change maxColorAttachments 4 -> 8 to match WebGPU
- Renames kMinDynamicBufferOffsetAlignment to
kMinUniformBufferOffsetAlignment.
- Renames kMaxVertexBufferStride to kMaxVertexBufferArrayStride.
- Changes validation of buffer offsets to use the separate uniform and
storage limits (but no test is added because they are the same).
- Adds validation and a test for kMaxStorageBufferBindingSize.
- Augment the null::Device memory limit for that new test (it allocates
a buffer of 512MB).
- Fix the maxColorAttachment test to not use hardcoded values.
Bug: dawn:796
Change-Id: Ibe4219130a44355ae91c02aaa0a41cf5d9f9e234
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56081
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
- Add zero-sized implementation in each backend.
- Test creating zero-sized query set for each type.
Bug: dawn:954
Change-Id: Ib2b8a7d890dae6ee40f5a05aac570a4600dedab8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56260
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This change implements 3D texture sampling with an en2end test.
It turns out that the implementation has already been done. The
test can pass with minor changes.
Bug: dawn:547
Change-Id: I5dfe1a446de3287392e39cb4dd58143e115b02cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
We're migrating to run all tests with both Tint and SPIRV-Cross.
Remove explicitly instantiating only with Tint, and add
skips for tests that will not work if use_tint_generator is not
enabled.
Bug: dawn:571
Change-Id: I8322dec688e75b6efa8c4f18c6b9439a2e325631
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56261
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
RefBase::Detatch() method in RefBase.h calls std::move,
but no appropriate header was included. Error example was:
RefBase.h:137:22: error: no member named 'move' in namespace 'std'
Change-Id: I60f84bffba06ba5fd3fea7fb9c4908cfe3989472
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56281
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This is fixup for the
https://dawn-review.googlesource.com/c/dawn/+/54800
where the macre was not properly declared.
Clang doesn't claims about it, but GCC does.
The errors example for GCC 9.3.0:
/dawn/src/dawn_native/CopyTextureForBrowserHelper.cpp:40:5:
error: unterminated raw string
40 | R"(
| ^
/dawn/src/dawn_native/CopyTextureForBrowserHelper.cpp:46:6:
warning: missing terminating " character
46 | )"
| ^
Bug: chromium:1217153, chromium:819294
Change-Id: I47aa2dac37d9dfa7c02532caeb3341edd22fcd07
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56066
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Fix missing Release() on RefBase::operator=(const T&).
Always acquire the new reference before dropping the existing reference.
Consider:
* Object A holds the only reference to object B.
* Ref of A is assigned B.
If A were released before referencing B, then B would be a dead pointer.
Remove RefBase::kNullValue, just use Traits::kNullValue. Avoids an unnecessary constexpr copy.
Add even more tests.
Change-Id: I111079d56cbf8c09162aa6e493078bead9ae97fa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55882
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
This makes SPIRV ingestion always go through a SPIRV->WGSL step first.
This will be used to make sure that path works correctly on existing
WebGPU SPIRV sites so we're confident the SPIRV->WGSL translation will
work when compiled to WASM.
Bug: dawn:960
Change-Id: I17efd8c64d9d60ff033ba89b8fff9295e66524ef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56080
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
We are now passing all of Dawn's E2E tests with the Tint generator.
Bug: dawn:571
Change-Id: Ie74a07bde805b8652ac23af2bda2fa11597d04ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55980
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
WGSL specifies that the size of a host-shareable structure is a
multiple of the largest alignment of any member in that
structure. While SPIR-V cross doesn't generate this trailing padding,
Tint does, and so we need to pad the host structure to match to avoid
validation errors.
Bug: dawn:571
Change-Id: Id5de89125a74c0469ae69d6e86b4c570bbdb31ab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56120
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>