This CL adds two helpers for more ergonomic processing of
ChainedStructs.
1. FindInChain(): Iterates through the chain and automatically
casts the ChainedStruct into the appropriate child type before
returning.
2. ValidateSTypes(): Verifies that the chain only contains structs
with sTypes from a pre-defined set. This also allows the caller
to specify one-of constraints.
3. ValidateSingleSType(): Verifies that the chain contains a
single struct with a specific sType or is an empty chain. This
is a common case of |ValidateSTypes()| and is separated out as
a fast-path.
Change-Id: I938df0bf2a9b1800b1105fb7f80fbde20bef8ec8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47680
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Previously this was being indirectly supplied by <memory>, which has
been removed. Clang happily still finds std::forward, but GCC does
not.
BUG=dawn:768
Change-Id: I87e6bb6aa83bc7f3253c58e32fa0ba977752858c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48820
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>
- Add vkCmdFillBuffer in ResolveQuerySet to clear the buffer to 0s for
these unavailable queries if the buffer has been initialized or fully
used which won't been initialized with 0s again.
- Because vkCmdFillBuffer has driver issue on Intel Windows, Skip some
affected cases.
- Remove unsafe api checking from Occlusion Query.
Bug: dawn:434
Change-Id: Ib34f81d93b0de8f08f0eeebf3c8a967eeb5ecefb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48320
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This will help detect cases where the mapped data is used after it is
freed, in particular in WebGPU tests around the interaction of mapping
and GC.
Bug: chromium:971949
Change-Id: I820d9885d39379fbc95c6504b9a4151053768d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48382
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This patch moves the initialization of DXC libraries from
BackendD3D12::GetOrCreateXXX() to Device::Initialize() so
that we don't need to deal with those lazy initializations
in the asynchronous path of Create*PipelineAsync().
BUG=dawn:529
Change-Id: I792847c138738ae8c300d7a1bf3d23fc8fecd746
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48580
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
This test was passing on SPIRV-Cross due to SPRIV-Cross's
overreporting of binding information per entry point. On Tint it was
failing, because the resources in the vertex shader were not being
referenced, so not being reported. I have corrected the values passed
to the utility code that generates the shaders, so that it generates
the needed references.
I have also slightly tweaked the test, so it will distinguish between
failure states better.
BUG=tint:716
Change-Id: If88f600a36cba8b580d888e902b8d8102e05bd10
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48520
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
unique_ptr's destructor sets itself to null and frees its owned
memory. This is a problem because for the slab allocator, the
member variable holding the unique_ptr is inside the freed memory.
Bug: skia:10501
Change-Id: I41179261041fe415bb2af3667114b079f61b3c7b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48100
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Use tint::transform::DataMap for inputs as well as outputs.
This allows tint to nest transforms inside each other (e.g. embedding
transforms inside sanitizers), and still having a consistent way to pass
data in and out of these transforms, regardless of nesting depth.
Transforms can also now be fully pre-built and used multiple times as
there is no state held by the transform itself.
Bug: tint:389
Change-Id: If1616c77f2776be449021a32f4a6b0b89159aa2a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48060
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Previously all uses of reentrant object creation in Dawn native
needed to manually AcquireRef. Change them to use CreateFooInternal that
returns a ResultOrError<Ref<>> and are renamed to CreateFoo.
Bug: dawn:723
Change-Id: Ifcda3659d02cc5a4c63c248dc53af7fee7c4a61d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46626
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
As of https://github.com/gpuweb/gpuweb/pull/1352 the spec indicates that
GPURenderPassColorAttachmentDescriptor and
GPURenderPassDepthStencilAttachmentDescriptor should use .view rather
than .attachment to indicate the TextureView associated with the
render pass attachment.
Bug: dawn:762
Change-Id: I70d615e19d8e7aae5b26aa5965c7109289ab868b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47902
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Tint now sorts struct members with entry point IO attributes.
Bug: tint:710
Change-Id: I7bb37cab2f101fbcf55dd8b42ee3b3af1250bf1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47840
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Brandon Jones <bajones@chromium.org>
This reverts commit 5c9b6a8f81.
The issue has now been fixed in Tint and rolled into Dawn.
Fixed: dawn:758
Change-Id: Id7deb6cea9f22ee8c5f345a28d2d37499b47d692
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/48080
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Matches most recent spec changes. setBlendColor has been marked as
deprecated.
Bug: chromium:1199057
Change-Id: I4584ce789bd7d14401244509d5ada62a46236a5d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47901
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Several of the enum names have changed recently. Update them to match
the spec and mark the older ones as deprecated.
BUG: chromium:1199057
Change-Id: I7a29588dd18b8fb738773c2478b173093f2aa834
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47860
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
A Dawn CL landed at the same time as a Tint roll in Dawn, causing
failures in a large number of D3D12 use_tint_generator. Disable testing
of that configuration entirely while we investigate the issue and fix
it.
Bug: dawn:758
Change-Id: I6c897efc637821a20281c91668889ae95c1c2b1a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47774
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Changes I/O to use function parameters and return values, removes
unnecessary "-> void" return types, and changes "const" to "let".
BUG: dawn:755
Change-Id: Iabbfcc280fae37d73cba6a2f7e2215ed579a04e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47700
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Fixes issues with OpenGL when using the newer style of WGSL I/O that
relies on function parameters and return values. Also added several
end2end tests to cover different variants of that style of I/O.
BUG: dawn:755
Change-Id: I73b4b07ce924ce22e917bf399be705dc67519037
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47701
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Refactors support for toggle control flags, --enable-toggles= &
--disable-toggles, from the end2end tests into a utility class to make
them available elsewhere. The unittests now uses this utility class to
parse toggle control flags.
For some toggles, like 'use_tint_generator', the unittests are known to
be broken with them turned on. They will be fixed in subsequent CLs.
BUG=dawn:756
Change-Id: Ic283e8a82bedcbf255258cca3e62f58c79d3857b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47740
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Use the same pattern for all conditionals: single-call, then row-by-row,
2D case, then 3D.
Bug: dawn:684
Change-Id: I410183815299e9ec2d90790809a056dd578771e3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47320
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
We augment the DoTexSubImage() call for the desktop GL fast path
for compressed textures (upload in a single call where possible).
Bug: dawn:684
Change-Id: Id67c39b1efbc8b435b58064cad66a55c153ce675
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47240
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Also drive-by fixes some other deprecated constructs (const -> let, and
a disabled test having ancient WGSL).
Bug: dawn:755
Change-Id: I924dfbcbd0a7d0478f3e9b3766585751a0392499
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47620
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Depth/stencil formats are invalid for 1D and 3D texture.
This change adds this validation rule, and adds a validation
test for it.
Bug: dawn:730
Change-Id: Idac6d1bf7b8c7261eb7b4b59504de10e13d049cc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47200
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This will help experiment using dawn_wire for remoting WebGPU to render
on the screen.
Bug: None
Change-Id: I9a60ff8c3889ec917f6fd56e4cbb1ffef639748d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47621
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Move texture uploads into CommandBufferGL::DoTexSubImage() and use it
for both CommandBuffer CopyBufferToTexture and
QueueGL::WriteTextureImpl(). On the CB side, For now this is only used
for compressed ES textures. Desktop GL has a fast-path for compressed
textures that isn't currently implemented.
Bug: dawn:684
Change-Id: I4da02e9c96c13fd71d133778168a5597efa7b59a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47123
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
The HLSL writer issue is now fixed.
Fixed: tint:686
Change-Id: I6d4709652d1ca46971a4ad2d150b21ad954ec055
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46450
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Replace TODOs for those tests that now fail with another issue.
Fixed: tint:682
Change-Id: I2665f0d4f495e4efc5adef4cf46a965df7c8936c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46451
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Now that we have a real extension type (PrimitiveDepthClampingState),
we can replace the dummy extensions used in the WireExtensionTests
with the real deal.
Change-Id: I43dfa66f2cc909b5fc95b55382d3cb53ce022a0f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47300
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brian Ho <hob@chromium.org>
Tint diagnostics hold a raw pointer to the tint::Source::File, so that source snippets can be printed.
The tint::Source::File pointer was taken from a stack allocation, and the diagnostics were left with a dead pointer.
Have the ShaderModuleParseResult keep the tint::Source::File alive with a PIMPL unique_ptr.
Change-Id: I80d77516afd4012e15992821e060ef3038eba1c1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47422
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Constructing a float2x2 from a float4 in a ConstantBuffer by extracting individual scalars with the array-index operator appears to produce invalid DXBC.
Tweak the test so that we use .xy, .zw swizzles instead.
Bug: tint:681
Change-Id: I027f8df96f2a5fda355668b35773d79f4fcdc08b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47421
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Tint only reflects the bindings that are statically used so before this
fix it would produce an empty pipeline layout. Fix this by statically
referencing the sampler binding in the shader.
Fixed: dawn:754
Change-Id: I381acd9adb7d1e80ccf0642b5189750a5a43de25
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47420
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Validation is now automatically performed, and the Validator class is
now redundant and will soon be removed from Tint.
Bug: tint:642
Change-Id: I9ddbe523d85e2a4dfeff6d08324a6ca368d6cc74
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47124
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
The various backends hit UNREACHABLE() during pipeline creation if
depthStencil.depthCompare (or likewise for stencil) are set to
undefined.
Bug: chromium:1195694
Change-Id: Ibf4d8d47b4c98343dce3caccdf79ee90c0de899f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46863
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This change also marks 3D view creation as Unsafe API.
BUG: dawn:547
Change-Id: Icdb7b48f19054d70258363f6d58ded957be72b70
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46723
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Test is flaky on the NV bot so it's being disabled
as I investigate.
BUG=dawn:733
Change-Id: I9b721f05665cefe8a6eee53fe691f83071484965
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47260
Reviewed-by: Corentin Wallez <cwallez@google.com>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
After we applied __VA_ARGS__ in macros and use {x, y} and {w, h}
to replace (x, y) and (w, h) in EXPECT_TEXTURE_RGBA8_EQ and
EXPECT_TEXTURE_FLOAT_EQ, we can use the more general macro
EXPECT_TEXTURE_EQ. Then these two macros can be removed. Austin
has already put a TODO for this change but didn't do that.
utils::MakeOrigin and utils::MakeExtent are removed because they
are not needed.
In addition, this change removes 0 in callers for parameter level,
because level's default values is 0 in helpers implementation.
BUG: dawn:748
Change-Id: Iece4db7a8ed1d47b57988412f1c897205e7403d4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47100
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
The previous CL had no way of communicating disagnostic messages from
Tint to the ShaderModule in the event that it failed to validate. This
change ensures that messages generated during validation aren't dropped
on the floor and can be queried from the failed modules CompilationInfo.
BUG: dawn:746
Change-Id: Ic2551654ca30baab0fb5124a148eb4fcdf4b0f22
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46960
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This patch refactors the implementation of APICreateComputePipelineAsync
as a preparation of the async path of the creation of compute pipeline.
Now the code path of APICreateComputePipelineAsync() includes the following
3 parts:
- When an error occurs in the front-end validations, the callback will be
called at once in the main thread.
- When we can find a proper compute pipeline object in the cache, the
callback will be called at once in the main thread.
- When we cannot find the proper comptue pipeline object in the cache, the
newly-created pipeline object, the callback and userdata will be saved
into the CreatePipelineAsyncTracker, and the callback will be called in
device.Tick(). All the logic mentioned in this section has been put into
one function CreateComputePipelineAsyncImpl(), which will be overrided
by its asynchronous version on all the backends that support creating
pipeline objects asynchronously.
Note that APICreateRenderPipelineAsync is not changed in this patch because
it is now under refactoring to match the current updates in WebGPU SPEC.
BUG=dawn:529
TEST=dawn_end2end_tests
Change-Id: Ie1cf2f9fc8e18c3e6ad723c6a0cefce29a0eb69c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45842
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Most tests pass, those that don't are skipped.
Change-Id: Ia08373551a48382aceffbbc0e23bd15828ebe219
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46452
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
If a texture format supports multisample, it should be renderable.
This change adds this validation rule to fix a bug. It also adds a
validation test in dawn_unittests.
BUG: dawn:731
Change-Id: I33a06cb16367e4e379b29b223ef6b69128baf30f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46840
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This change removes layer and use origin.z in MACROs
EXPECT_TEXTURE_FLOAT_EQ and EXPECT_TEXTURE_EQ.
It also removes parameter layer in MACROs' implementation
functions AddTextureExpectation and AddTextureExpectationImpl
and use origin.z instead in these functions.
BUG: dawn:747
Change-Id: I0103524074c6c250fa2f85bf9c3abda8c8cd2197
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47000
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
We do query resetting for each query commands outside render pass,
whether they're rewritten or not, so no longer need to track their
availability on command encoder. The availability on query set is enough
for resolving sparse queries.
But we still need to track query availability on render pass for query
rewrite checking and query resetting per render pass. Because reset
command must be called outside render pass, we need to reset them
together before the beginning render pass based that. Add availability
tracking on pass resource usage tracker (we only need it on render pass
) to facilitate use it in Vulkan backend.
Bug: dawn:434
Change-Id: Ie1b413ff54f62f3b84fe612e4abe45872c387e81
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45440
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This change implements 3D texture copy on D3D12 for texture to
buffer and texture to texture copy for full copy upon the entire
3D texture.
It also uses a function named CopyBufferToTexture to wrap
CopyBufferTo3DTexture and CopyBufferTo2DTextureWithCopySplits.
Likewise, it uses another function named CopyTextureToBuffer to
wrap Copy3DTextureToBuffer and Copy2DTextureToBufferWithCopySplits.
BUG: dawn:547
Change-Id: I4293f6ca4d37f604e6f1c10827686d17469a07ca
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46820
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Dawn uses objects with move semantics like Ref<> that feel like they
need to be std::moved in a bunch of places. This warning triggers when
std::move() is used when it has no effect, keep the code less verbose.
Bug: None
Change-Id: I2b11f709e943e7b16024bfde07910577b983aa34
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46441
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Implements the GPUCompilationInfo and GPUCompilationMessage interfaces,
adds the GPUCompilationMessageType enum, and adds the compilationInfo
method to GPUShaderModule.
BUG: dawn:746
Change-Id: Ied70cbbfedbf4890916ec076993714e5042f70e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46600
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
The attribute was just in the wrong place, I shouldn't have removed it
completely.
Bug: chromium:1195827
Change-Id: Iad2a5fdcc2e8bd76ddb82cc09cde62c3a57e3c54
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46800
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Nico Weber <thakis@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL adds depth clamping support to Metal by invoking
MTLRenderCommandEncoder::setDepthClipMode. I only implemented the
feature for the new-style of RenderPipelineDescriptor since the
old one seems to be deprecated.
Bug: dawn:716
Change-Id: Icd63c72294546042ae452360863a7f9c16b40f95
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45640
Commit-Queue: Brian Ho <hob@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This CL support subrect copy. Use scale/offset to copy from subrect of
source texture and viewport for copy to subrect of dstTexture.
BUG=dawn:465
Change-Id: Ice43c0da15f6d9526912879e2e734f6570f2d673
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46422
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Converts each of the native API backends to use RPD2 natively, started
converting the old format to the new one in the deprecated entry point,
removed all other handling and validation of the old format, and turned
on the deprecation warning.
BUG: dawn:642
Change-Id: I20b671960a83f65ecb4ce6ce1165a563025983cd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46726
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
Refactors the existing general reflection code to either use Tint or
SPIRV-Cross, depending on the backend being used and provided flags.
Tint is used when UseTintGenerator is enabled, otherwise SPIRV-Cross is
used.
For OpenGL, when Tint is used, additional reflection is performed using
SPIRV-Cross to support GLSL generation.
There still exists backend specific reflection that needs to be
implemented in Tint for the complete removal of SPIRV-Cross for
non-OpenGL when UseTintGenerator is enabled.
BUG=dawn:743
Change-Id: Ie77afa83a2c960b3c87a3419997a16f8392991fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46480
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
This ends up incorrectly reporting live objects from previous CTS tests.
We should find a better way to call ReportLiveObjects, but doing so on
backend initialization is probably not the right time.
Bug: dawn:745
Change-Id: I9d0beb5f8b20af9c83f5e78f19630d5c78ef4da2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46721
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This is the first patch to implement 3D texture copy. It starts with
implementation for 3D texture copy on D3D12 backend with the simplest
case: copy to the entire 3D texture. And texture's width is aligned
with 256 bytes.
The implementation for 3d texture copy might be inaccurate/incorrect
in some functions for complicated cases. But don't panic. The previous
implementation is also incorrect because many functions assumes that
we are copying to/from 2D textures only. And I will incrementally fix
the incorrect functions via upcoming tests for 3d texture copy.
BUG: dawn:547
Change-Id: I588b09fc8d0f0398e0798573415ba3a6a3f576fc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45980
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
We are going to send another PSA about new APIs in Dawn/Chromium and
want developers to be able to use CreatePipelineAsync. The
implementation is safe, it just doesn't offload the work to a different
thread yet.
Bug: dawn:529
Change-Id: Ia093e46f8c3d389fd42eb5c1ad6b94ab8e64957b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46448
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Adds GPUExternalTexture-related types, as well as
Device::ImportExternalTexture. Adds a basic unit and end2end test.
Bug: dawn:728
Change-Id: Iee9533eb872c493a089cccd500748f1a61457407
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46060
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Brandon Jones <brandon1.jones@intel.com>
Each quadrant now uses a unique color so
a test result failure can better indiciate any
unexpected sampling behavior.
BUG=dawn:733
Change-Id: If0e814956c1d686bdddcfb6de4dbf24f05d5a027
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46540
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
This fixes a failure when use_tint_generator on D3D12, but also preps
the code for the future where WGSL requires that return values from
functions are used.
Bug: None
Change-Id: I6b8a5e0aef6550ef39d2972cdc510e05e4be3662
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46620
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This is another incremental change towards using the new render
pipeline descriptor throughout the entire stack. Creates blueprints for
hashing with the new descriptor when provided before then converting it
to the old format for the native backend creation.
BUG: dawn:642
Change-Id: I1927b12fd02b2fedf25ef4428f07e339fa666715
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46541
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This is a preparation CL for 3D texture copy. It refactors texture
result comparison MACROs and their implementations, in order to
add texture result comparison for 3D texture. Prior to this change,
texture result comparison supports 1D/2D texture only.
BUG: dawn:547
Change-Id: Ia242356e05f4762e33a8278ec0d038b8580f7aa9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46320
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
It was used to avoid requiring the dependency on Tint so it isn't needed
anymore now that Dawn unconditionally dependent on Tint.
Bug: dawn:686
Bug: dawn:706
Change-Id: Ifd12c2f94fcaaa70120ae7ef72bcdc34f970fbea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46004
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This is in preparation for a change that will change all the
CreateFooInternal to be CreateFoo so they can be called in a
reentrant manner without special refcounting.
This also standardizes all the backends (except OpenGL and Null)
to use Object::Create that returns a Ref<T> or ResultOrError<Ref<T>>,
something we wanted to do for a long time.
Bug: dawn:723
Change-Id: I9e0baced333ffeb0affbc6a276c9bd9de082263a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46440
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This CL propagates errors from reentrant WriteBuffer calls and makes
procy methods on BufferBase to show that it is safe to call
GetMappedRange and Unmap without handling errors.
Bug: dawn:723
Change-Id: I4ea43adc4844505314bf84e2357b2d928f1d1f8c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46003
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
In the service of keeping these changes incremental and easier to
review this change only validates the RenderPipelineDescriptor2
before converting it back to a RenderPipelineDescriptor.
BUG: dawn:642
Change-Id: Ie24c999756fa74f7d3cd10662a6bc95649602b14
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46120
Auto-Submit: Brandon Jones <bajones@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This case is failed weirdly on Intel TGL (Window Vulkan) which says the
destination buffer keep sentinel value in the second case, it cannot be
reproduced with any debug actions including Vulkan validation layers
enabled, and takes time to find out if the WriteBuffer and
ResolveQuerySet are not executed in order or the ResolveQuerySet does
not copy the results to the buffer. In order to integrate end2end tests
to Intel driver CL without unknown issues, skip it until we find the
root cause.
Bug:dawn:434
Change-Id: Ibdba667cb662ba69c8468d5b2ac2e84bcd3df5bc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46321
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Using the new tint::transform::BindingRemapper.
Provides symmetry with TranslateToHLSLWithSPIRVCross().
Bug: tint:621
Bug: tint:671
Change-Id: I1a26c8cac236ac1133c688cf84bb810e15e30978
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46341
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
BUG=dawn:700
Change-Id: I5234d48867b500aece79b82515818afdfc3a6d9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45100
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
https://gpuweb.github.io/gpuweb/wgsl.html#variables:
> "Variables in the storage storage class and variables with a storage texture type must have an access attribute applied to the store type."
Bug: tint:692
Change-Id: I61774bb6bda9a7d31e3a85c24fcdb6e2fc25e7b1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46378
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
An async callback which calls Queue::Submit will cause
reentrance in QueueBase::Tick and CreatePipelineAsyncTracker::Tick,
which invalidates the task queue being used by the original call,
and leads to a crash from an invalid pointer.
The Tick functions should remove the tasks from the queues before
the callbacks are called, so invalidation doesn't cause a crash.
Bug: dawn:729
Change-Id: I0d952d51040a3d1a475767400de3333a8b9b0821
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45900
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Otherwise errors in Tick could cause the device to be lost and further
processing in Queue::SubmitImpl to fail in interesting ways.
Bug: dawn:723
Bug: chromium:1191777
Change-Id: I586c6b0f97c89938b9e7deeb6f31231ec19e826c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46002
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Previously various places in dawn_native were using Device::GetQueue to
get the queue for some operations, and were inadvertently adding a
reference to the queue. Fix this by adding a getter that doesn't add a
ref.
Bug: dawn:723
Bug: chromium:1185070
Change-Id: Iba127dbd631305762f4cc6c37816407056c52cff
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46001
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This means that calling wgpu::Object::DoStuff will translate to a call
to dawn_native::ObjectBase::APIDoStuff. This will clarify the
difference between reentrant calls and internal calls in dawn_native.
Avoiding issues in the future.
This CL only changes the code generator to prefix with "API", performs
renames needed to make the code compile, and adds TODOs for things that
should be fixed in follow-up CLs.
Bug: dawn:723
Change-Id: Ie24471fa093adc4179d33d13323429847d076ecb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45921
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
DeviceBase implemented its own Reference / Release methods for
historical reasons. Replace them with RefCounted's version that are
similar, just more thread safe.
Bug: dawn:723
Change-Id: Ib26f3e231eb12fe09612c8b5639576e2f26a3cfd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/46000
Commit-Queue: Stephen White <senorblanco@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Raises any ICE errors reported by Tint during shader validation as uncaptured
validation errors. This allows them to show up in Chrome's dev tools console, for
example.
BUG: dawn:718
Change-Id: I85741787103e6c1174b7c73be6b9860b988d6130
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45840
Reviewed-by: Ben Clayton <headlessclayton@gmail.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Brandon Jones <bajones@chromium.org>
BUG=dawn:504
Change-Id: If09b12d4df9c7aedcb28b4640557cc3cae6e989d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45700
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
With all tests converted to WGSL we only use shaderc to assemble SPIRV
assembly to binary. shaderc requires glslang but we don't use it at all.
By using SPIRV-Tools directly to assemble SPIR-V, we can remove both the
shaderc and glslang dependencies.
Bug: dawn:572
Bug: chromium:1150045
Change-Id: I1588428dfb9478e7b724478bec662d002ee920e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45765
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
And rename CreateShaderModuleFromWGSL to CreateShaderModule.
Bug: dawn:572
Change-Id: I80dab401078b2001d738b87d6e24437f93b690d1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45764
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This was silently failing for me, resuling in a crash somewhere completely different.
Change-Id: Iba9dfba8bb4c9e51a947a1337fc9718437ad5254
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45766
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Tint/WGSL don't support 16bit floats yet, so use SPIRV assembly to
remove the dependency on glslang, instead of WGSL.
Bug: dawn:572
Change-Id: I6dd209e62f0550e7aecd18626b8807f7f1414b19
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45605
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Skia changed to only use -Weverything for Skia files so we no longer
need to suppress this warning.
Bug: dawn:706
Change-Id: Ifcb2421abd24ec514396b8033057a62abd312e16
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45608
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
It required storageBarrier() to be implemented in Tint.
Bug: dawn:572
Change-Id: I62e8d89ef7a049044f3381dc66163466d62c839d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45604
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This also removes the ability for the fuzzer to perform error
injection to generate testcases. The preferred method is to
use one of the Dawn test binaries to produce the trace directly.
Bug: dawn:629
Change-Id: If7295f9e6da5618be8f44e9301aa12dc56fcdfef
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40301
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This is a reland of f84daa070f
Eliminate static initializer(disallowed in Chromium) by replacing
shader string living in anonymous namespace from type "std::string"
to char array.
Original change's description:
> CopyTextureForBrowser: Support color format conversion
>
> This CL enables blit from RGBA8Unorm soruce texture to dst texture that
> |CopyImageBitmapToTexture| supported dst format.
>
> BUG=dawn:465
>
> Change-Id: I99846cf8dc37bc89e0c168a3d86193bb3a0c0ebb
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44020
> Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Reviewed-by: Austin Eng <enga@chromium.org>
Bug: dawn:465
Change-Id: Ic3a156f5a20b217fd2aa5f86b01bad8ce77dc41c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45443
Commit-Queue: Shaobo Yan <shaobo.yan@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Still leave deprecated `depth` functional as there are some references in
other clients. Using `depth` and `depthOrArrayLayers` at the same time is
invalid. Add DeprecatedAPITests.
Bug: chromium:1176969
Change-Id: Ia06645e4f3c17588323dd36b11f9f3988b2e3aba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44640
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Destroying the adapter without the debug layer installed
would crash the process upon access of the debug filters.
Bug: dawn:460
Change-Id: I04819c5136af780fd3b981857bd87d69d4abc9c7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45560
Commit-Queue: Bryan Bernhart <bryan.bernhart@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
This is in preparation of removing all the DAWN_ENABLE_WGSL logic: the
ShaderModuleBase will have either mSpirv or mTintProgram set based on
UseTintGenerator.
Also improves the constness of some functions.
Also simplifies a bit ShaderModuleBase::Initialize.
Bug: dawn:706
Change-Id: Ib879e2aec8a004aeb8ac5dc6e1176b1667fc227d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45422
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Since it isn't used by anyone yet we can make a breaking change to
CreateRenderPipelineAsync to immediately start using
RenderPipelineDescriptor2.
Bug: dawn:1177501
Change-Id: I9f88c6fc1b325b7a9356536e2a071d4f17abd6ea
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45280
Commit-Queue: Brandon Jones <bajones@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Converts var<storage_buffer> to var<storage>
Adds in [[access(read_write)]] when no access qualifier was supplied.
BUG=dawn:699
Change-Id: I9da95366d0bb8734f1d134ee2dc764a7c16ef0cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45300
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>
The CL that fixed deprecation warning expectations landed at the same
time as the CL which added this expectation and broke CQ.
We shouldn't check deprecation warnings here now because the warnings
for CreateRenderPipeline are temporarily disabled.
Bug: none
Change-Id: I99a8b6643e64f87b2354058dbac9a236c51a2afd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45180
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
The WGSL spec has been updated with 'Default Struct Layouts':
https://github.com/gpuweb/gpuweb/pull/1447
This removes the `[[offset(n)]]` decoration, and replaces it with two optional decorations: `[[size(n)]]` and `[[align(n)]]`, and a sensible set of sizes and alignments for each type.
Most `[[stride(n)]]` decorations have also been removed from arrays.
Bug: tint:626
Bug: tint:629
Change-Id: Ib0d2741f61ea943e6fb99d00cbb5cab2f97ae7be
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44280
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This patch fixes a bug in the computation of temporary buffer size in
the implementation of the workaround for the T2T copy issue on Intel
GPUs.
With this tests all the T2T operation tests in WebGPU CTS will be able
to pass on Intel Gen9 and Gen9.5 GPUs.
BUG=chromium:1161355
TEST=dawn_end2end_tests
Change-Id: Ic4fb0c0056cf7b01720e47cc91c37a9f293cd194
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/44840
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>