ShaderRobustnessPerf:
SPIRV-Cross apparently generates incorrect code for MSL and OpenGL, when
attempting to initialize workgroup memory. Disable these tests when not
running with use_tint_generator.
D3D12DescriptorHeapTest:
The UBO layout for a mat2x2 was incorrect, but the test relied upon this.
Temporarily disable the test so we can roll the fix.
Bug: dawn:945
Bug: dawn:946
Change-Id: I810249b26a8a0b583796c0ba63b8a703eb9540e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55248
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Refer the TODO in ShaderModuleBase::InjectCompilationMessages to
issue dawn:944 for further tracking.
Bug: dawn:753
Change-Id: I2ff09ba5914f2df0182bf26e9001a66782811f06
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55223
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Add the formatted tint messages in OwnedCompilationMessages, which will be emit after creating the shader module succeeds of fails.
This patch also change the compilation messages handling in creating shader modules. Now the compilation messages are separated from sparseResult, and should be handled manually. A new method, ShaderModuleBase::InjectCompilationMessages, is introduced to move a given OwnedCompilationMessages into the shader module, and emit the formatted tint errors and warnings. This method should be called explicitly on a valid or error shader module.
Bug: dawn:753
Change-Id: I5825186c6d9c4aa7725aebd0c302bfce5e1f37cf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53890
Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Also tighten previous suppressions to only apply when using the Tint
generator.
TBR=bclayton@google.com
Bug: tint:904
Change-Id: I22210227c428eb38901904966ec2c3bd70ce607b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55200
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Copies between 3D and 2DArray textures need to be done depth/array
slice by slice via CopyTextureRegion() API on D3D12 because this
API can copy one single subresource every time.
However, if both src and dst textures are 3D texture, we can copy
all depth slices in one shot, which is a fast path for this
copy scenario.
Bug: dawn:547
Change-Id: I950ed58319fb0f30dfc8a2de3e57e8a64406f7e4
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55140
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Disabling the one test clearly wasn't enough
Bug: tint:904
Change-Id: I23f448d2f3028fff13e4eb406b08a7175166ea9d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/55100
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com>
Reviewed-by: Sarah Mashayekhi <sarahmashay@google.com>
The vertex buffer alignment in particular is helps make the
implementation of programmable pulling much easier on Metal since the
vertex data will be able to be represented as array<u32>.
Bug: dawn:805
Change-Id: I2bf2742db3b8fa478be620c892925b8b75dc514c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54659
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
This didn't make sense since these members can be specified to have no
data by setting the length to 0.
- Prevent uses of this patten by adding an assert in WireCmd.cpp's
generator.
- Fix SetBindGroup dynamicOffset to not be optional but default to
nullptr instead.
This issues would cause a read of uninitialized pointers becaus the
generator code looked like this:
SetBindGroupCmd cmd;
cmd.dynamicOffsetCount = record.dynamicOffsetCount; // 1
bool has_dynamicOffset = record.has_dynamicOffsetl // false
if (has_dynamicOffset) {
cmd.dynamicOffsets = ...;
}
// Oh no! dynamicOffsets contains garbage even if dynamicOffsetCount
// is set to 1. dawn_native will happily read it.
Bug: chromium:1220036
Change-Id: I5c468b639f671cef3be2fa64667a0bf114fc902b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54643
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Stephen White <senorblanco@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Stephen White <senorblanco@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>
Otherwise bindings with non-zero groups get through to the Tint MSL
backend and break assumptions.
Bug: tint:104, dawn:571
Change-Id: I8d95ba142a386ff0d992ffe5f88a7acf93057ce1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54960
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
CopySplitTests unittests were added for 2D texture copy splitter.
Now that we have added 3D texture copy splitter recently, it's time
to enable these unittests for 3D texture copy splitter.
This change enables the CopySplitTests unittests for 3D texture copy
splitter, with some fixes:
- Footprint depends on bufferOffset and copySize, not bufferSize,
- Copy regions overlap validation incorrectly added 1 extra pixel,
- For 2D texture copy regions, there is one empty row at most in
a copy region. However, it is not true for 3D texture copy
regions when we are copying the last row of each slice.
It also adds a few more tests for 3D texture copy splitter when the
copySize.height is 1 and there is an empty row in the copy region.
Bug: dawn:547
Change-Id: I5381993ed5c656da0f82395e7c7bccc54d784767
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54500
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
TextureOffset should respect both origin and copySize when we are
addressing the empty first row issue. So textureOffset in copy 1
should just move/add (copySize.height - blockInfo.height) rows
in order to copy the last row of all depth slices but the last one.
Bug: dawn:547
Change-Id: I6a1acf656651869c8934897d5c7e8974f1a5eb9a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54441
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
The config was already being set, but the transform itself was not
being added to the manager.
Bug: dawn:571
Change-Id: I850d5b0f37635598427b4a3a3285d243b89fad46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54721
Commit-Queue: James Price <jrprice@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Use the BindingRemapper transform to remap resources binding numbers
to the indices chosen in the pipeline layout.
Bug: dawn:571
Change-Id: I548f063f09970222dea289f05285764fc3ea1b46
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54520
Commit-Queue: James Price <jrprice@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
In the timestamp internal pipeline, the ResolveQuery buffer cannnot be
binded as Storage buffer in binding group layout due to it has not
Storage usage.
Add InternalStorageBuffer for buffer usage and
InternalStorageBufferBinding for buffer binding type, make the
QueryResolve buffer implicitly get InternalStorageBuffer and only
compatible with InternalStorageBufferBinding in BGL, not Storage buffer
binding type.
Bug: dawn:797
Change-Id: I286339e703e26d3786c706ded03f850ca17355fb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54400
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Hao Li <hao.x.li@intel.com>
This feature is not yet implemented in Tint and it not planned for OT.
BUG=dawn:799
Change-Id: Ib97dcd39e8ae956aa6fdc4cc1b148ec7f101b061
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54280
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This reverts commit f102e1138b.
Reason for revert: Continuing to get permissions issues
Original change's description:
> Enable Tint running Dawn try jobs on its CQ
>
> Set ACLs to allow calling the builders and create uniquely named
> builders, so there isn't a name collision.
>
> BUG=tint:734
>
> Change-Id: Ic3e61eac6fcc2f097f8be778abaecde642bdd665
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54100
> Auto-Submit: Ryan Harrison <rharrison@chromium.org>
> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: tint:734
Change-Id: I5d7688771b83a97493ecbfaafed54fa817a25ade
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54564
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
The runtime array parameter is now passed as a pointer, instead of by
value.
Change-Id: I632814d2a2890dbe4476c2b01023a5ff8de42d21
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54485
Auto-Submit: James Price <jrprice@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
It isn't clear if this should be a limitation of the WebGPU
specification. Until further investigation is done, disallow it in Dawn
to avoid undefiend behavior.
Bug: dawn:812
Change-Id: Iab8208f1ea479263b08ede41374ce1a680ce191e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53387
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
We have a new validation rule that states that all calls to functions that return a value must use that value. ignore() is the escape hatch.
Bug: tint:886
Change-Id: I9ab8d288b3c54ad4b7e46feda129c36c9136c20b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54200
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Set ACLs to allow calling the builders and create uniquely named
builders, so there isn't a name collision.
BUG=tint:734
Change-Id: Ic3e61eac6fcc2f097f8be778abaecde642bdd665
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54100
Auto-Submit: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
The log output code snippet duplicates again and again in this test.
So this change put it into a function and all tests can call that
function without duplicated code. It names the new function as
DoTest(), which calls DoTest2D() (the original DoTest()). The new
function can add DoTest3D() into the test in order to test 3D
texture splitter if needed and all tests don't need to change
anything.
It also removes TexelBlockInfo instance in DoTest2D(), which provide
no new info, just as Origin3D instance (for origin) and Extent3D
instance (for copySize).
Bug: dawn:547
Change-Id: I668682c5bdbae56dcdc8cf0e232f27233e17b883
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54221
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
This extension is just added for testing unsupported feature at device
creation. We don't need to update Extensions info because the
invalidExtension is not a valid extension and must be treated as
InvalidEnum.
BUG: chromium:1175091
Change-Id: I11462a053fb5db8e11a54173e13f338c1c4f7b6f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53891
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
If the copy region generated from 2D texture copy splitter has an
empty first row due to alignment adjustment and we simply extend
it to all copied depth slices, the copy region will be incorrect
for 3D texture copy.
If there is an empty first row and the copy height is odd, we can
split the copy region into two:
- copy0: copy the first depth slice
- copy1: copy the rest depth slices because there is no empty
row after alignment adjustment
This method resolves the remaining problem when copy height is 1.
It also is an optimization for other odd copy height cases, say
copy height is 3, 5, 7, etc.
This change implements the special situation when the copy region
generated from 2D texture copy splitter has an empty first row and
its copy height is odd.
Bug: dawn:547
Change-Id: Idf4f4a9b87f783c5328463e0f4182429a7e809f1
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53885
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.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>
The change implements copy non-zero mip level for 3D textures
on D3D12 when the texture has multiple mip levels. The texture
size on level 0 can be either 256-byte aligned or 256-byte
unaligned(its size is non-power-of-two).
Bug: dawn:547
Change-Id: I8ed74fa587cfd814e7f526173dcb653d0a252a1e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/51201
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Yunchao He <yunchao.he@intel.com>
- Pipeline statistics query is not fully implemented, disallow its
creation as unsafe
- Add pipeline statistics creation in UnsafeAPIsTest, because it needs
enable extension, add a separate test class for it.
BUG: chromium:1177506
Change-Id: Ic77e04c9c854b396e7240674bd9deb0caf97a513
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53889
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
On macOS 10.15 on AMD GPU, WriteTimestamp cannot be called without any
copy commands on MTLBlitCommandEncoder, otherwise crash occurs. But this
issue is not reproduced on macOS 11.0, just disable timestamp query on
the bad version on AMD.
BUG: dawn:545
Change-Id: I69a012b2091b8ccd251d23ddb26b72e06c07492f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/53581
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>