This was a temporary measure to be able to roll Tint into Dawn with this
change. The macro will be removed in Tint once this lands.
Bug: tint:984
Change-Id: If599e92b16b5edd96b357ce5ee57143a2c00e22d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58365
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
1. Validate the buffer range for both vertex step mode and instance step mode vertex buffers in Draw,
2. Validate the buffer range for instance step mode vertex buffers and the range of index buffer in DrawIndexed, and
3. Add related validation unit tests DrawVertexAndIndexBufferOOBValidationTests, and remove out-of-date vertex buffer robustness tests.
Bug: dawn:808
Change-Id: Ic27a95138cb1e21b72a1da392b7828368bfe2010
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56361
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
TextureViewDescriptor's default values for dimension and
arrayLayerCount in Dawn are not correct according to WebGPU spec.
This change fixes these bugs.
Bug: dawn:760
Change-Id: Ic1d069838d6c0f7bb1afa1dceaf73e91bdfdb20a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58020
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
And print this to the Dawn logger.
Tests will now print any diagnostic logging calls from Dawn.
Change-Id: Idd4bf816303c182809924f9a432570def808e1b6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57381
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Remove deprecated functions and change new functions to pure
virtual since they are implemented both on dawn and chromium
side.
Bug: dawn:773
Change-Id: I5adfe42ad1155276f533660b938b869c775025bf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58100
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
And print the WGSL program even when !force_wgsl_step
Shaders are often built through string concatenation.
Being able to always dump this is useful.
Change-Id: I5da3866b333e8a80931c7c2837f0247e8f38213d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57380
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Conditional on whether TINT_EXPECTS_UBOS_TO_BE_MULTIPLE_OF_16 is
defined, which it will be in a future Tint CL.
Bug: tint:984
Change-Id: I191cd59fe6947c9113a8fad7dbfbf79903969b27
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57960
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
R=rharrison
Bug: chromium:1216166
Change-Id: Iabc72c400eff4a2f71179b5f4779eaccfd42d697
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57423
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Buffers are padded to be at least 4 bytes. Dawn would
produce invalid barriers for buffers that were "zero"
bytes large. The size for the barrier must be either
non-zero or VK_WHOLE_SIZE. Since we always intend
to transition the entire buffer, simply use
VK_WHOLE_SIZE instead of GetSize() as the size.
Fixed: dawn:969
Change-Id: Ifed4e8f9164bafa3c44917074fcf214e72919c56
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57940
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Austin Eng <enga@chromium.org>
When we clear an uninitialized 3D texture, we should clear all depth
slices for each mip level. The current implementation only clears one
slice (the first slice) for each mip level. This change fixes this
bug. Dawn end2end tests of NonzeroTextureCreationTests can pass with
this fix. These tests fail on D3D12 without the fix.
This change also renames arguments for GetRTVDescriptor() for 3D
texture: change baseArrayLayer/layerCount to baseSlice/sliceCount.
Bug: dawn:547
Change-Id: Ic56f28e9e6430058c31aaa2bb21f4e42f7b7621c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57840
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Not running the renamer can produce code that fails to compile
on the backend, resulting in device lost errors.
Change-Id: I4a841a281142bb8eda1402e1ebd6a5d23b77bfe0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57745
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
crbug.com/tint/386 has been fixed.
We don't need these work arounds any more.
Original CL by bclayton@:
https://dawn-review.googlesource.com/c/dawn/+/54641
Bug: tint:386
Fixed: dawn:943
Fixed: dawn:975
Change-Id: I1b94d1e33b023b7d9b3153094f829885a75b5a5e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57743
Commit-Queue: Austin Eng <enga@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
This also creates a new commit to test 20% of realms :)
R=rharrison
Bug: chromium:1216166
Change-Id: I7a496c11ecba617620ae080a39c594a8800fc952
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57422
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
3D texture implementation has already been done. It's time to remove
the UnsafeAPI toggle for it.
Bug: dawn:547
Change-Id: Ic9e0930d7906ee5274b9e412ebacb2574744b2b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56480
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
R=rharrison
Bug: chromium:1216166
Change-Id: I773f502b741b26a5d591a600b08b7265abceb03c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57465
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
Also:
* remove redundant luci-scheduler permission.
* make ./main.star executable on mac/linux.
R=rharrison
Bug: chromium:1216166
Change-Id: Icd5e1612f7d201b640eeafa7217342b97e0fe5aa
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57464
Auto-Submit: Andrii Shyshkalov <tandrii@google.com>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
This change moves function ViewDimensionToTextureDimension() to
TextureFormatUtils.h|.cpp.
This change also renames TextureFormatUtils.h|.cpp to TextureUtils.h|.cpp
because the new name makes more sense now.
Bug: dawn:547
Change-Id: I183c68d26365a6cda722be55b8ba3556c1b4c82b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57482
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
The main part of this change is to add a few end2end tests, with
some renaming stuff like arrayLayerCount to sliceCount in order to
include both 2DArray and 3D textures.
The implementation is quite simple: just set UAV descriptor on D3D12.
The new tests can pass on Vulkan and Metal, which indicates the
implementation has been done on them.
The new tests fail on OpenGL and OpenGLES. I will take a look and
submit separate patch for GL and GLES.
Bug: dawn:547
Change-Id: Ic03eab6b06654c48341c935f64f4885be544985c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57160
Commit-Queue: Yunchao He <yunchao.he@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Change dawn read/write handle for buffer mapping to be created at buffer
creation time instead of at mapAsync time. Update related buffer mapping
tests and wire tests.
Bug: dawn:773
Change-Id: I7dd423c94e1bc15cfe561ea33ec9e348ddf2bfe0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51164
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Shrek Shao <shrekshao@google.com>
Tint now has a single-function API for code generation that
automatically runs the backend-specific sanitizer transforms. This API
allows for backend-specific configuration options such as the fixed
sample mask for MSL (and, in the future, information about which
compiler/version is being targeted), and returns any backend-specific
metadata such as whether a UBO of buffer sizes is required by the
shader.
This change prevents the post-sanitizer program from being exposed to
Dawn, which is a potential foot-gun (e.g. the Inspector is not
expected to be run after the sanitizer transforms, and Dawn is
currently doing this).
The old Generator class API will be removed from Tint shortly after
landing this change.
Bug: tint:697
Change-Id: I9b988d55514f810d3091ec6471731e6eb41dc27f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/57103
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
Float16 is not standardized in WGSL or implemented in Tint,
so remove support of the extension for now.
Bug: dawn:571, dawn:426
Change-Id: Ia26f0ddb07cabf6057c0d7db9ade547494d2cc6e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/56441
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
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>