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 new entry point IO syntax
* Use `let` instead of `const`
* Remove `-> void` from function headers
Bug: dawn:755
Change-Id: I39b5687a342ea2298c3d2e85517c9b8d9017727e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/47500
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
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>