This makes it less manual code and less error prone to
add new callbacks to the wire.
Bug: dawn:384
Change-Id: I8547af2dba8289d1badd41e53dd732c776fb5d06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35600
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL changes SubresourceStorage to have an inline storage for the
per-aspect compressed data and allocate the storage for decompressed
data lazily. This will avoid the large performance cost of allocations
in the happy case.
Bug: dawn:441
Change-Id: Iae1cab87b699cb0e60031abe7306cdff92fbd049
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35521
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Converts most of the tests to use the new layout, with the exception
of a few that are dependent on additional Dawn changes before the
conversion can happen. The deprecation warning is not enabled yet
due to these remaining changes.
Bug: dawn:527
Change-Id: Idcfd9fc873756f5a9f88de2ce9ab65c66b79bf39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35582
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This was here to ensure all callbacks return, but this can now
be done by calling device.Tick - which Chromium does
periodically. Remove it now, especially since it will be incorrect
when the wire supports more than one device.
Bug: dawn:384
Change-Id: If948ffe8931be7ba989f733efd64549d0c56b382
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35841
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
One of the issues blocking Dawn->Skia rolls
Change-Id: Ia3c68edd2c2745586dfb6a778e3a493df20aa66d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35820
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
https://dawn-review.googlesource.com/c/dawn/+/34921 introduced a couple
of bugs. This CL fixes them and tests to ensure that the new validation
logic is working correctly.
BUG=dawn:527
Change-Id: Ief01dfda0b97a202bf12ff6aeb0e7a3b84b4b81c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35700
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This CL adds the Merge() operation to SubresourceStorage() that allows
modifying the content of a storage with another storage.
Bug: dawn:441
Change-Id: I28e3cd7bc967056eda2c387b2b6e164eb370a241
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35520
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The issues causing these tests to fail with the Inspector enabled have
been resolved.
BUG=dawn:578
Change-Id: Ie0b7b4d6b2d1a3b432f4eed7542c64e31bf44fdb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35680
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Updates BindGroupLayoutEntry to allow for the newly split-up descriptors
that define each binding type in it's own member (buffer, texture, etc.)
The previous style of descriptor is still supported but is deprecated.
For the sake of keeping the scope reasonable, this change does not alter
the BindingInfo structure that's used internally by the various
backends. That will come as a followup.
Bug: dawn:527
Change-Id: I2f301f5f36fa2ce7ff15126ac90dc4c19d5e32ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34921
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL adds the start of the implementation of a SubresourceStorage<T>
container class that stores per-subresource state in a compressed
fashion. Only the getter methods and Update() modifying methods are
added because they are the first step necessary to test the behavior of
SubresourceStorage.
Subsequent CLs will:
- add the Merge() operation
- move the per-aspect storage to be inlined and avoid allocation of
mData and mLayerCompressed if possible
- use the container where applicable in dawn_native
- (maybe) move clear-state tracking in the backends as part of barrier
tracking
Bug: dawn:441
Change-Id: Ic93e5af16dd705b260424f05e4dc3e0c9f6fbd0a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34464
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This runs dawn_end2end_tests both with/without use_tint_generator on
Vulkan, OpenGL, and OpenGL ES backends. This is a temporary solution
until we add an dawn_end2end_use_tint_generator_tests suite in the
bot configuration after all backends can support use_tint_generator or
have the appropriate test suppressions.
Bug: dawn:571
Change-Id: I44ab0ba7261160e34dbad512d98602427dc7e966
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35044
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Specifically there are build failures due to size_t not being defined
in CachedObject.h, as well as unused functions in ShaderModule.cpp
Change-Id: Ie9bd903660e3563fdf797e716bf55f6fa8627e84
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35103
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
GCC complains that explicit specialization in non-namespace scope
is happening for ObjectContentHasher.
In file included from
../../third_party/dawn/src/dawn_native/ShaderModule.cpp:19:
../../third_party/dawn/src/dawn_native/ObjectContentHasher.h:56:19:
error: explicit specialization in non-namespace scope 'class
dawn_native::ObjectContentHasher'
56 | template <>
| ^
Additionally make RecordIterable constexpr, because it is called
from constexpr methods. GCC complains about this as well:
../../third_party/dawn/src/dawn_native/ObjectContentHasher.h:76:50:
error: call to non-'constexpr' function 'void
dawn_native::ObjectContentHasher::RecordIterable(const IteratorT&) [with
IteratorT = std::__cxx11::basic_string<char>]'
76 | recorder->RecordIterable<std::string>(str);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
Bug: None
Change-Id: I535f5f5e0beded09f105f9871759b617c7384ae0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35003
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephan Hartmann <stha09@googlemail.com>
Initializing SubresourceRange with {x, y, z} type of constructor
was error prone because it was going from the smallest concept
to the larger one instead of being hierarchical.
This CL changes the order of the structure and more importantly
adds a constructor that's in hierarchical order and groups related
members together. For example:
SubresourceRange range(Aspect::Color, {layerStart, layerCount}, {0, mipCount});
It also adds a rename of SingleMipAndLayer in hierarchical order as
SubresourceRange::Single and a helper that gives a full range as
SubresourceRange::Full (it will be used in follow-up CLs).
Bug: dawn:441
Change-Id: I8e71bae1129a96222f7779014575b24b31f5ef7a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/35000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Turns on Tint generation of MSL if UseTintGenerator is on
Bug: dawn:571
Change-Id: Icfa523c36a509baf5da3b2a54152a7fb462c86f4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32303
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Indexed draw buffer (color state) support on ES is not core until 3.2.
Previously, we were failing (asserting) if color state was changed for
a non-zero attachment. This CL compares the state, and only asserts if the
color state actually differs per-attachment.
It also implements a disable_indexed_draw_buffers toggle, which allows a
test to check for the functionality in a platform-independent manner.
BUG=dawn:580, dawn:582
Change-Id: I11c67b0dd72f73e7302c06cad24e8a268fb37a76
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34981
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Turns on Tint generation of SPIR-V if UseTintGenerator is on.
This affects SPIR-V generation for Vulkan, and SPIR-V passed
into SPIRV-Cross to produce GLSL.
It enables DrawTests use_tint_generator for Vulkan/GL where it
should have at least basic support.
Bug: dawn:571
Change-Id: I5df1435bee17572259f5aa3605c4bf19c0136cbc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32302
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
This factors code to move parsing of tint::ast::Module to the
frontend. All backends will use this code path when
UseTintGenerator is enabled for both SPIR-V and WGSL ingestion.
To avoid too much code explosion, parsing and validating the
shader is moved into ValidateShaderModuleDescriptor which
returns a result struct that gets passed into creation.
Bug: dawn:571
Change-Id: I598693ef36954fd0056a0744a2a0ebd7cc7d40a4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32301
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Recognizes an OOB vertex index to show consistent behavior when trying
to emulate an OOB index across backends.
Bug: dawn:575
Change-Id: Ie06d6706614843c75c217f7b3b144dc25996cd0b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34924
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Use the correct toggle when checking for support.
Also disable a test which tests it unconditionally.
Change-Id: I5f98004865df5e1f4dd6cf6eaa4769444b90e9c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34980
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This enables all the tests which pass on ES 3.2.
BUG=dawn:580
Change-Id: I56fde768a917d74f24e53cd2f7367aa165c4ac4f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34720
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
It should reference the backendDevice as the |device| points to
the wire client device when the wire is used.
Bug: none
Change-Id: Iac6399df96ea0226d8b9ba8f6196185e43c41adb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34923
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Sets IBStripCutValue on the D3D12 render pipeline to the appropriate
value when an index buffer is used. Revises primitive restart tests to
catch when IBStripCutValue is not set.
Bug: dawn:575
Change-Id: I77058d8fe62a52c09641b82d3383a404b7ac6d4a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34340
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
These are guarded by `#if DAWN_USE_NEW_TINT_TRANSFORM_API` preprocessor conditionals, this define will be added to the tint `transform.h` file, atomically switching code paths when the new API lands.
See https://dawn-review.googlesource.com/c/tint/+/34800 for the tint change.
Bug: tint:390
Bug: tint:389
Change-Id: I0f397550f921a46c5bb29b1e71aacfee19ec5dd3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/34880
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>