But keep a namespace alias to avoid breaking project that depend on the
previous namespace name while they get updated.
Done with through the following steps:
- git grep -l dawn_native:: | xargs sed -i "" "s/dawn_native::/dawn::native::/g"
- git grep -l "namespace dawn_native" | xargs sed -i "" "s/namespace dawn_native/namespace dawn::native/g"
- git cl format
- Manual fixups in generator/templates (and the addition of
namespace_case in dawn_json_generator.py).
- The addition of the namespace alias in DawnNative.h
Bug: dawn:824
Change-Id: I676cc4e3ced2e0e4bab32a0d66d7eaf9537e3f09
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75982
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
But keep a namespace alias to avoid breaking project that depend on the
previous namespace name while they get updated.
Bug: dawn:824
Change-Id: I1e99c4d0d2acf7644a225a88d07806d1a64478e6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/75540
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This has been removed from WGSL and is now deprecated in Tint.
Bug: tint:1324
Change-Id: Ic187ce3c5ce0723db6f3ca6483e9f5e73ce27acc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/72880
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Found while investigating Swiftshader support. Some Vulkan loaders
fail to create an instance if VK_ICD_FILENAMES is empty string
rather than entirely absent. It was set to empty string because
Dawn did not distinguish between nonexistent environment variables
and the empty string. This CL adds distinguishing between the two,
including tests for the behavior.
Bug: chromium:1266550
Change-Id: I1680a281f62e6b340009e01da65db9d485e2975e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/69520
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This will help with review load and finding an owner once mandatory
owner review is enabled.
Change-Id: I1a90b83fed68f062c1406552aec218bf9c2092ce
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/67821
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Older names are kept around as an alias for a while. Unfortunately we
have no mechanism for producing deprecation error messages when they
are used.
Bug: dawn:1035
Change-Id: Ic6716fd526ecbedaa8e7925ab93e3ff32f642d97
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/61382
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
See https://github.com/gpuweb/gpuweb/pull/1927
Adds a typedef to make a gradual deprecation.
Bug: dawn:1023
Change-Id: Ic81a933a95556fbf5726056530788dde017a1449
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/59442
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
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>
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>
This ensures ObjC objects do not leak. On non-Apple
platforms, the scope does nothing.
Fixed: dawn:546
Change-Id: Id43702e6536bf9cb37825a5449511e10cf0734f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55841
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Values of array and matrix can now only be indexed by a constant value.
Dynamic indexing requires the value to be held in memory.
See: https://github.com/gpuweb/gpuweb/issues/1782
Bug: tint:867
Change-Id: I2b9ad6e40fc8121e7aca3a71c190639b39b0b862
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54652
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: Ben Clayton <bclayton@google.com>
Deprecates the computeStage member of the descriptor in favor of compute
as described by the spec. In order to support both variants without
breaking backwards compatibility some code had to be manually added to
the wire client to copy from the deprecated member to the new one and
visa versa.
Change-Id: I9d5c2fc9c446c927c5792c9af9ed56c90060b65b
Bug: dawn:800
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53884
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Renames all the RenderPipeline*2 stuff to simple RenderPipeline* but
keeps *2 definitionas around as typedefs and wrappers so that users can
migrate away from it.
Bug: dawn:22
Change-Id: If301d81a829bba0646c3a61068f2279932b191e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51764
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This permits enabling the OpenGL and OpenGL ES backends independently.
This change also enables the OpenGL ES backend on Windows.
This will cause the end2end tests to run on OpenGL ES on the
GPU-less bots, via SwANGLE.
Bug: dawn:580
Change-Id: I43d514b18862d176610b95e97013a67723ddac20
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/50881
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@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>
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>
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>
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>
Also does some updates for the new BindGroupLayoutEntry and
VertexFormats that were missed previously.
Bug: chromium:1177501
Change-Id: Icb336590673158538a1586a1f8d5ace398fb381e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/45282
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@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 is to follow the renames in the upstream WebGPU specification.
Typedef are left in places to make a smooth deprecation period.
Bug: dawn:22
Change-Id: I5134b897930c1fa883c49dd80d2665d6684ec022
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/43882
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Commit-Queue: Brandon Jones <bajones@chromium.org>
As was done for DawnTest, we should set ANGLE's default backend to
SwiftShader for the examples as well.
Bug: dawn:691
Change-Id: I6ced2ffbeed48a555e74a9373c52cbf9e1e3c708
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42301
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Having the [[block]] decorator on the nested Particle struct causes
SPIRV-Cross to not emit it (see bug). Removing the decorator from
the Particle while leaving it on the top-level struct works fine.
This fixes the issue, but validation should be added to Tint
to catch the problem (this work is tracked in https://bugs.chromium.org/p/tint/issues/detail?id=320).
Bug: dawn:611
Change-Id: I8bef811e314ed758f805247977f8b129477abd39
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/42300
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Tint automatically infers a storage class of `handle` for these types
of variable, as per the WGSL spec. Explicitly specifying a storage
class for them will soon become an error.
Bug: tint:332
Change-Id: Ib67e44a5afcdd364470488fd4b456a2b42304daa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/41402
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
This helper is no longer needed now that the descriptor has full
defaults and is even optional in CreateSampler.
Bug: dawn:599
Change-Id: I0d25233ebb1e817ad27f3ddaca988e01e2a5298c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/40520
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>
The CL doing the renaming didn't handle comments and the one string
where "output attachment" appeared.
Bug: None
Change-Id: Ie57159da8278970097271fa5706573444bcdaf61
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38383
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
This Cl updates the `vertex_idx` to the new `vertex_index` decoration
name.
Change-Id: Ic3688e1af87ed0d570b00ccb72d0e84ac920831b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38142
Commit-Queue: dan sinclair <dsinclair@chromium.org>
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This Cl updates the WGSL used by Dawn to use the new `group` decoration
instead of the deprecated `set` decoration.
Change-Id: I145aaff7721dfafff986ddc429c9cdc9389c2110
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/38141
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Fix a bug about mipmap level in SamplerFilterAnisotropicTests.
Sizes of the 3 miplevels should be 4,2,1.
The old code allocates 8,4,2 (which don't have a 1x1 level)
Expected rendered pixel values have to change.
The render result now fits the webgl demo at https://jsfiddle.net/t8k7c95o/5/
(Thanks Kai for the enlarged pixelated canvas)
ComputeBoids.cpp and DawnTest.cpp change is due to git cl format
Bug: dawn:568
Change-Id: I9069732208a16be285be13b8cd1ab19b211995a6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37380
Commit-Queue: Shrek Shao <shrekshao@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This CL updates the tests with WGSL sources to use // for comments
instead of #. This matches the current WGSL spec.
Change-Id: I04e1a18630a16b794955cace7e55a89221c964fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/37520
Auto-Submit: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Animometer's fragment shaders remains unported because it isn't clear
how to use modf in WGSL.
Bug: dawn:572
Change-Id: I29aa0ee657b813e7308f0300addd1d5795bfc16d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/33821
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This also simplifies a bunch of code in backends that was used to handle
getting the indexFormat from the pipeline "late".
Bug: dawn:502
Change-Id: Ibae50c8df21323fd391515f6036552e9fb868d93
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/32023
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
This is enough to get all of the sample apps running on a conformant ES 3.1 implementation, such as ANGLE/Vk or NVidia's OpenGL ES Linux driver.
Implements a new opengl::AdapterDiscoveryOptionsES subclass to specify its creation at adapter discovery time.
Adds a "-b opengles" command-line flag to the code samples.
Asserts on a call to glShaderStorageBlockBinding() on ES.
Works around missing indexed draw buffers support by asserting when a non-0 color attachment is specified.
Works around missing glClearTexSubImage() by asserting. :/
These will likely require front-end validation.
BUG=dawn:580
Change-Id: I4a4240ca695a22388c55073fd2aee0323cd4afc9
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31000
Reviewed-by: Stephen White <senorblanco@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
This makes a nearly one-to-one mapping between the JS and C APIs, which
benefits projects like Blink and Emscripten.
- JavaScript's `undefined` is equivalent to C `WGPU_STRIDE_UNDEFINED`.
- JavaScript's `0` is equivalent to C `0`.
- To implement the API correctly, Blink must special-case an actual
value coming in from JS that is equal to WGPU_STRIDE_UNDEFINED
(0xFFFF'FFFF), and inject an error.
Keeps but deprecates a reasonable approximation of the old behavior.
Bug: dawn:520
Change-Id: Ie9c992ffab82830090d0dfc3120731e89cd9691c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/31140
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>