This CL switches the disassembler back to being recursive and fixes up
the indenting of blocks to better highlight if branches and switch
cases.
Bug: tint:1718
Change-Id: I14e8d7c68a083bf3afd9ff7241d49b2aa76be4ba
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134300
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Change-Id: I049bc6499f22ddb359b9d4701eaa5df31f5a652a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134340
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL updates a bunch of uses of FlowNode to use Block instead. The
InboundBranches are moved from FlowNode to Block.
Bug: tint:1718
Change-Id: Ic1c07dae103e25364a3a6b3333cfcb57d10b30c2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134260
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL moves the FunctionTerminator and RootTerminator nodes to be
blocks instead of FlowNodes.
Bug: tint:1718
Change-Id: Iee7830bccd99e4587b95b22b53268d1d2921e82f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134222
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL removes the Jump instruction. This didn't add much value over
the branch instruction and was confusing as to which to use when.
Bug: tint:1718
Change-Id: I69253aa7baf39b00f698e4e8f9608465f6019dcd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134221
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
The transform was only being run if there was at least one override
without an initializer. We actually need to run the transform if there
are any overrides at all, even if they all have initializers.
Bug: chromium:1447418
Change-Id: Ia300ea4326b675c1fd84dd7709112fb69128963d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134203
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Change the instruction->id map to a generic non-constant value->id map
so that it can be used for other types of values.
Bug: tint:1906
Change-Id: I79a0a7f671214167fa17ca903f9e94a54507d17c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/134201
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Creating scalar types is extremely common when using builders.
Bug: tint:1718
Change-Id: I2c2f0f521af1384bd8dee344ddfa525583535911
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132284
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
This CL adds some helpers to make composites easier to use in tests.
Bug: tint:1718
Change-Id: I16a0e94978c43efa619b31b6815089c8fff6983f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133920
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Add a builder helper function to create a `Function` with a
`string_view` name instead of requiring the creation of a symbol.
Bug: tint:1718
Change-Id: I5d85736b49719246cb31825c3f4ad7a25131cb77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133900
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
The ir::Value objects each have a list of instructions in which their
used. These lists allow us to determine all the places the value is
used. Currently this is unable to track the usage of a value in an
`if` or `switch` condition. It is also unable to track the usage of a
value as a branch argument.
In order to facilitate this tracking, the flow graph has been resolved.
Branches are moved to branch instructions (and jump instructions). A
jump is walk continue branch. A branch is a walk terminating branch. The
`if`, `switch` and `loop` flow nodes are moved to instructions as well.
Bug: tint:1718
Change-Id: I8e4cc4688bb1bdd5c7eecc72d366e6531ec685b3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133840
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: James Price <jrprice@google.com>
On D3D12, there is a limit of the number of texels in a buffer which is 1<<27. See D3D11_REQ_BUFFER_RESOURCE_TEXEL_COUNT_2_TO_EXP and the spec. This patch limits it according to the spec in case of D3D12 in MaxLimitTests.cpp. This fixes MaxLimitTests failure on Arm device.
Bug: dawn:884
Change-Id: Ia14ebca92855ec7b7e8d81b7bd547108948da567
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133961
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Min Lee <lemi@microsoft.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
When an initializer is present, use type inference instead of
explicitly typing `var` and `let` declarations. This reduces the size
of the generated WGSL and improves readability.
Change-Id: I241ee2108279b550735945940f2b62bbbd493708
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132142
Commit-Queue: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: David Neto <dneto@google.com>
This is a small refactor in preparation for exposing GetCurrentTexture
on the SwapChain.
Bug: dawn:1551
Change-Id: I7cc8ec4a9042f48c4af7b2cc2126b1d9248a2003
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133462
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
This is an internal usage only used for barriers management in some
backends, and doesn't need to be exposed publicly.
Fixed: dawn:1535
Change-Id: I0474977227230acbf7dd3cfa91bf589ffd9464fd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133460
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This binds UAV slots all together at the same time.
Bug: dawn:1816
Bug: dawn:1705
Change-Id: Iea7af9cf00caf126a3964cc43bbf2162b35f80e0
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/132600
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Because of the CastableBase, the copy and move constructors and
assignment operators can't be used. They don't need to be explicitly
deleted.
Bug: tint:1718
Change-Id: Iafa000a00f779e1cac0aca8125330906ebd63446
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133660
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Chrome needs to get a ID3D11Device for DComp
Bug: dawn:1705
Change-Id: Ia6a586a38f381b7fddcbc94fe41a7011af59b333
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133780
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Peng Huang <penghuang@chromium.org>
TimestampQueryTests.ResolveTwiceToSameBuffer fails on Mesa driver >=
21.2.0 and D3D driver >= 31.0.101.3413 on Intel Gen12 GPUs due to driver
bugs with different root causes, but the workaround of clearing
destination buffer before resolving queries works for both.
Bug: dawn:1546, dawn:1823
Change-Id: I3f20a9100f4b6d3386e9685b351ad4fed69195bd
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133284
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Hao Li <hao.x.li@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
`namespace dawn {` was written before some #includes
Bug: dawn:302
Change-Id: I1f0e507f63cc47b180d2021cf859d7964cfa4613
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133622
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Bruce Dawson <brucedawson@google.com>
Kokoro: Austin Eng <enga@chromium.org>
DAWN_DEBUG_BREAK_ON_ERROR executes dawn::BreakPoint inside
ErrorData::Create so that an application can inspect their callstack
immediately when an error is generated.
Bug: dawn:1789
Change-Id: I3f31b9713414d31b69ed469474e0f3c0f714540a
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133562
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Brandon Jones <bajones@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Some of the IR classes require setters in order to update dependant
information. In order to keep the IR access symmetrical this CL moves
the IR back to using accessors and private fields.
Bug: tint:1718
Change-Id: I101edda004671e07c4594bdcae4b1576e5771782
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133640
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL updates the IR builder to deduplicate constants such that for a
given constant value only a single `ir::Constant` will be created.
Bug: tint:1935
Change-Id: Ia743cdb7782cf7ea9918b913dac70b0a3dde4499
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133241
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL adds parameters to functions in the IR. Attributes will be
handled in a later CL.
Bug: tint:1915
Change-Id: I99f9342e95ef957e5117465bb396db0b3822ba7d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133401
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
- Adds the feature and the major backend supports.
- Adds initial validation testing.
Bug: dawn:1664
Change-Id: I9918c3de8cce379319d3d1877e45c51acb388961
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133281
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Brandon Jones <bajones@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Bug: dawn:302
Change-Id: I8af045c609d1552c491d6e6f48b13b172172c2ab
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133520
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Bug: dawn:302
Change-Id: I91c9dd26456c7f7b8b72a24c332d1aae053fd73d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133365
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Austin Eng <enga@chromium.org>
Kokoro: Austin Eng <enga@chromium.org>
Reviewed-by: Loko Kung <lokokung@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
- Before since it was in the TearDown, cleanup can be called before
the device was gone which meant that async tasks could still be in
flight.
Bug: dawn:1374
Change-Id: I4cd5a4e096a3fe13e230197a6a4d4d57daea31c8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133480
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
This CL updates the IR to only show types on the LHS of an assignment.
The RHS does not show the types anymore. This removes a lot of clutter
from the output.
Bug: tint:1718
Change-Id: I5e9cff2ae5cd727a7a8cb256d08b417233a197d3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133240
Reviewed-by: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
Auto-Submit: Dan Sinclair <dsinclair@chromium.org>