Commit Graph

8 Commits

Author SHA1 Message Date
Ben Clayton f3f2d0a218 Resolver: Remove texture_storage read access
The intrinsics that did anything useful with this were deprecated
several releases ago.

Change-Id: I79e3c901b6a78583853a067ec46cfa98e346517c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66262
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-14 10:10:45 +00:00
Ben Clayton 11c9656b14 docs: Fix origin trial number
The listed changes aren't going to land into M97, as M96 has already been cut.

Change-Id: I7b636bf7a6da3b831ad8f121acd0f8c3f87a1423
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66381
Auto-Submit: Ben Clayton <bclayton@google.com>
Commit-Queue: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
2021-10-14 03:17:32 +00:00
Ben Clayton 2aa6855914 intrinsics: Remove deprecated modf & frexp overloads
These have been deprecated for multiple chrome releases.

Change-Id: I4cc05a74ff8f085e6d13f93aefb93077480e52f5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/66261
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
2021-10-12 21:57:47 +00:00
Ben Clayton 5e35864c1b writer/spirv: Fix abs() on unsigned integers
GLSLstd450SAbs expects a *signed* integer.
abs() of an unsigned number is now a no-op.

Fixes WebGPU CTS tests:
webgpu:shader,execution,robust_access_vertex:vertex_buffer_access:*

Bug: tint:1194
Change-Id: I65c5e9f2f03aac0b788b9ba88c383cbec136d7c6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/65620
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Kokoro: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2021-10-01 08:41:55 +00:00
David Neto ddc9eb2b85 wgsl-reader: reject identifiers starting with underscrore
Update one test to avoid this error.

Fixed: tint:1179
Change-Id: Id41b0eb0f404648de4e86a835fe43f1729cb4696
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/64464
Auto-Submit: David Neto <dneto@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: David Neto <dneto@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-20 14:38:45 +00:00
James Price 922fce7295 Implement and test num_workgroups for all backends
For HLSL, use the new NumWorkgroupsFromUniform transform, and expose
the binding point to use for the generated uniform as a backend
option.

The MSL mapping is trivial, and it was already implemented for WGSL
and SPIR-V.

Bug: tint:752
Change-Id: I4bd37b5d26181629d72b152fe064a60caf8ecdc5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/63962
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-13 17:11:58 +00:00
David Neto be514a1efb wgsl-reader: hex float: zero mantissa results in zero result
When the magnitude is zero, then we don't care about the magnitude
of the exponent. The result value is always zero, without emitting
an error.

Fixed: tint:1166
Change-Id: I303d7c336e7ea42719571854f0a22cbfd19da32c
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/63520
Kokoro: Kokoro <noreply+kokoro@google.com>
Auto-Submit: David Neto <dneto@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-09-08 13:46:51 +00:00
James Price 4cc4315d6c Allow array size to be a module-scope constant
Change ast::Array to use an ast::Expression for its `size` field. The
WGSL frontend now parses the array size as an `primary_expression`,
and the Resolver is responsible for validating the expression is a
signed or unsigned integer, and either a literal or a non-overridable
module-scope constant.

The Resolver evaluates the constant value of the size expression, and
so the resolved sem::Array type still has a constant size as before.

Fixed: tint:1068
Fixed: tint:1117

Change-Id: Icfa141482ea1e47ea8c21a25e9eb48221f176e9a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/63061
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-02 13:49:59 +00:00