To make B2B, B2T and T2B testes work, this CL implements several
missed functions:
- Texture::Clear() is need for initializing texture data
- Texture::Read() is need for readback data from 2d and 3d textures
Bug: dawn:1740,dawn:1768
Change-Id: Ib9e354c82fcdc8cc4e86b1699fa652cfc4a50721
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128621
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
This CL adds "mapping already pending", "offset out of range",
"size out of range", and "validation error".
Those errors will be used in future CLs both in Dawn and Blink.
Bug: chromium:1431622
Change-Id: I70121f49542042b47e30f4acc67a8e9a869fc452
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130260
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Fr <beaufort.francois@gmail.com>
Expect ExternalImageDXGIImpl, most external image related code can
be shared between d3d11 and d3d12. This CL move those code into
d3d namespace
Bug: dawn:1724
Change-Id: I6c32cfd36880d4d009b272886a9369dc99dffbe6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/130100
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Peng Huang <penghuang@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
* Bump timeouts
* Include changes description in results
* Use median times instead of means
* Use CPU time instead of real time
* Bump prority of the benchmark process
Change-Id: I40cb5635016fab4d6a1d1ee2434e94c120f7f6f5
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/121700
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
The cases can pass now with a few fixes.
Bug: dawn:1776
Bug: dawn:1705
Change-Id: I4a38887c51d003b4e9b782fd9217c9ce2c7dd423
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128980
Commit-Queue: Jie A Chen <jie.a.chen@intel.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This CL moves `ir::Bitcast` from `ir::Instruction` to `ir::Call`. The
`bitcast` is, essentially, a templated call instruction.
Bug: tint:1904
Change-Id: Iab8ccffaa484767318433f5fc6c33670c5f6375e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129940
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
The `discard` statement is, essentially, a function call. This CL moves
the `ir` node from being under `Instruction` to be under `Call`.
Bug: tint:1905
Change-Id: I8098dfc6047286b1c5249679139bcc83aa1cb21d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129681
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
type::Struct is the base class of sem::Struct.
type::Struct does not have a Declaration() member, so it does not make sense for it to have a Source.
Given that sem::Struct has a Declaration() method, use this to obtain the source.
Same logic applies to StructMember.
Change-Id: I693f659c35216ebe5eac5ea2a5b6457773077ddc
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129480
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Ben Clayton <bclayton@google.com>
type::Struct does not have an ast::Struct declaration, so use that for
builtin structures.
Fix up logic that assumed sem::Struct for both user-declared and builtin
structures to use type::Struct instead.
Assert in the sem::Struct and sem::StructMember that the AST node is not
nullptr.
Change-Id: Ic8fcf27d5610c814ea3b504694c6a94db6cf1191
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129483
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Ben Clayton <bclayton@google.com>
Removes the need to examine AST attributes.
Change-Id: Iaaa6b10fd56baf732057c4c3960c1bfc5bbdeaa6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129621
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Attributes resolving was done ad-hoc throughout the resolver, with the
validator ensuring that attributes were only applied to the correct nodes.
The ad-hoc nature meant that attributes were inconsistently marked and
resolved, and the attribute arguments were not always validated
(especially when used internally).
This change inlines the attribute processing into the appropriate places
in the resolver, and uses a standardized error message for attributes
that cannot be applied.
Change-Id: Ic084820949bbf8276fb2d33c103fa29b77824a69
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129620
Commit-Queue: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
If an expression has a `sem::ValueExpression` attached we can use it to
directly obtain the result of the expression and stop emission. This Cl
updates the IR builder to pull the expression result if possible.
Several of the tests have been updated to go through a function in order
to stop const-eval from removing all the test content.
Bug: tint:1924
Change-Id: I6458cc297efc7789ac200069c18f75e8eb70c63b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129680
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL does the following:
* Adds a "transient attachment" bit to texture usage. This bit
specifies that the created texture will be used only during
this render pass.
* Adds a TransientAttachments Feature that gates the usage of
transient attachments.
* Adds support for transient attachments on Metal, where they're
used to create textures as memoryless.
* Adds validation tests and an E2T test of the feature.
A followup CL will add support in Vulkan.
Bug: dawn:1695
Change-Id: I3c7322dd1e4bee113062aae2e0494d292ee8cbc3
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129080
Commit-Queue: Colin Blundell <blundell@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Keyed mutex support was deprecated and the only known client using it,
Chromium, has migrated to fences. Remove all related keyed mutex related
code and tests. The useFenceSynchronization field is still present in
the external image descriptor since it's set by Chromium (to true) -
it'll be removed once Chromium stops setting it.
Bug: dawn:1612
Change-Id: Iaec3c16b18bb8ddbde55a7f54eaf4b944d0f06c6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129300
Reviewed-by: Austin Eng <enga@chromium.org>
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL removes the `ir::Runtime` and inherits `ir::Instruction` from
`ir::Value`. This means that any `Value` can be an `Instruction`. The
instruction id is used for debugging purposes.
Bug: tint:1895
Change-Id: I2b79cd6721268712d78a47d383a30f82aa3aa07e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129660
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This CL moves the need to pull in SEM and AST into a specific
`libtint_ir_builder_src` library. This will make it a GN error if we
accidentally try to use the SEM or AST inside the IR after the initial
construction.
This required move the `ToProgram`/`FromProgram` methods out of
`ir::Module` and into an `ir::Converter` class.
Bug: tint:1921
Change-Id: I2e6ae195f9a100030b43f35a2c5dad634433147f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129661
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
This reverts commit f8ef5e95ac.
Reason for revert: Not the cause of flakes.
Original change's description:
> Disable SamplerTests on NVIDIA D3D11
>
> Suspect to be causing flakes in D3D12 sampler tests
>
> Bug: dawn:1779
> Change-Id: I7a8518683142191e05c7befed078d69abdaf9b77
> Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129280
> Reviewed-by: Loko Kung <lokokung@google.com>
> Kokoro: Kokoro <noreply+kokoro@google.com>
> Commit-Queue: Austin Eng <enga@chromium.org>
Change-Id: I72630f21d861acd9e266a0ac0c80e917f4f440bb
Bug: dawn:1779
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129600
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: Austin Eng <enga@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This currently requires that we are not building with Chromium.
Bug: tint:1911
Change-Id: I6c37afe6c2b8250b30d244e8cc2274253b6ce8f6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129560
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Having labels like [CommandBuffer from CommandEncoder "B"] will
provide greater context when developers don't provide labels to
every tier of object.
Bug: dawn:1746
Change-Id: Ibf72f97e054ff943b33c210e457422466e46a013
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/127120
Commit-Queue: Brandon Jones <bajones@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Allow the resolver to understand builtin structures, like
__frexp_result_f16. This allows backend transforms to declare the types,
even if they're "untypable" by the user.
Bug: chromium:1430309
Change-Id: I392709118182a058f737ccf1b7b46fc6b0b7264d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129482
Kokoro: Ben Clayton <bclayton@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
Contains the builtin structure creation logic moved out from
intrinsic_table.cc.
Bug: chromium:1430309
Change-Id: I2207f9ae42c6d7343c2f2ffa81effde59e6023fe
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129481
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
Change-Id: I81ac6e70e086e1f5839733d2dd35c283ed6eba68
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128681
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
These tests seem to cause flakiness in other sampling tests on NVIDIA.
Bug: dawn:1779
Change-Id: Ide341033a4f13d8294021752ad3d18850a7369d6
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129400
Reviewed-by: Austin Eng <enga@chromium.org>
Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This Cl renames the `instr` variables to `inst`.
Bug: tint:1718
Change-Id: Icf3b8c2f612c8dfe4b469d90327fef90ad813a0d
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129460
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
Change-Id: I77044ee7f0ce1b066dd8c8a1ee1b34e07f5e9766
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/128660
Commit-Queue: Loko Kung <lokokung@google.com>
Reviewed-by: Austin Eng <enga@chromium.org>
Kokoro: Kokoro <noreply+kokoro@google.com>
This fixes a linking problem.
The conversion function should be a member of the Convert class,
not a freestanding function.
Change-Id: Ifa351e4ba6fb0e95fed311a11e9dc56e13eb1a0b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129260
Reviewed-by: Ben Clayton <bclayton@google.com>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Suspect to be causing flakes in D3D12 sampler tests
Bug: dawn:1779
Change-Id: I7a8518683142191e05c7befed078d69abdaf9b77
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129280
Reviewed-by: Loko Kung <lokokung@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Austin Eng <enga@chromium.org>
This CL adds Assignment and CompoundAssignment statements to the IR
builder.
Bug: tint:1718
Change-Id: I3037da0115c7f4fe68941565b7e48866d421bbbf
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129201
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
The const variables should all have been const-eval'd and turned into
`constants` at the usage sites. This CL updates the IR to skip constants
when emitting.
A TODO is added to validate they aren't used when identifier expressions
are supported.
Bug: tint:1718
Change-Id: I77328a0cbd3d7f6692d1d1057d6953fcf762cfd7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/129240
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>