Ryan Harrison
44382a1857
Add sampler targets to inspector data
...
Allows for reflection of the specific textures that a sampler has
sampled.
BUG=tint:699
Change-Id: Iba47baf5c99c4d03671caf2c01747bd6ad12b1e2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54901
Auto-Submit: Ryan Harrison <rharrison@chromium.org >
Reviewed-by: Ben Clayton <bclayton@google.com >
Commit-Queue: Ryan Harrison <rharrison@chromium.org >
Kokoro: Kokoro <noreply+kokoro@google.com >
2021-06-17 23:29:03 +00:00
David Neto
17287fcf1a
spirv-reader: Set workgroup size, but not specializable
...
The WorkgroupSize builtin decoration applies to a composite constant.
Because WGSL does not yet support specializable constants for this,
use the *default* values for that SPIR-V spec constant.
Update end-to-end test expectations.
Fixed: tint:503
Change-Id: I012b316d13544ab9282e3276b58906327adab133
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/41960
Auto-Submit: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: David Neto <dneto@google.com >
Reviewed-by: Alan Baker <alanbaker@google.com >
2021-06-17 22:40:43 +00:00
Corentin Wallez
b86e45f8ca
Omit types in most WGSL var statements.
...
Bug: None
Change-Id: Id6ed10d98a550d912784b688c5473f67f1889a8c
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54882
Commit-Queue: Ben Clayton <bclayton@google.com >
Auto-Submit: Corentin Wallez <cwallez@chromium.org >
Reviewed-by: Kai Ninomiya <kainino@chromium.org >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-06-17 21:36:11 +00:00
Ben Clayton
fecd5a5977
wgsl: Suppress all VertexFormatTests when using FXC
...
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 >
2021-06-17 20:54:15 +00:00
Ben Clayton
53829a5e42
intrinsics.def: Include access and storage in ptr errors
...
Some overload mismatches just make no sense without this
Change-Id: I2827808ab7dfd9e2d179b5207da8ad3c2ce56d99
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55040
Reviewed-by: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
2021-06-17 20:26:15 +00:00
Ben Clayton
c82b733ff0
intrinsics: Limit storage classes for modf and frexp
...
To function, private or workgroup
See: https://github.com/gpuweb/gpuweb/issues/1846
Change-Id: If84cf4482919e4c7667ca2ff9062edfa79cd9cb6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54655
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Reviewed-by: David Neto <dneto@google.com >
2021-06-17 20:13:25 +00:00
Ben Clayton
313e6184e6
resolver: Resolve atomic types
...
Bug: tint:892
Change-Id: Ib595378b3b126a8f6bc4712ece943ba70816cb46
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54647
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: David Neto <dneto@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
2021-06-17 19:56:14 +00:00
Corentin Wallez
95aa7c5b29
Add SetIndex/VertexBuffer offset argument alignment constraints
...
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 >
2021-06-17 17:48:45 +00:00
Ben Clayton
cf1613ee35
sem: Add atomic type
...
Bug: tint:892
Change-Id: I4826b71e5911c7f66019a956685675e9504551cf
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54646
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-17 15:48:39 +00:00
Ben Clayton
989c3a1811
reader/wgsl: Parse atomic<T> types
...
Bug: tint:892
Change-Id: Ib6338ee78fccfca339f53c9074671f89bae1537f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54645
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-17 15:48:39 +00:00
Ben Clayton
8c7f0da8c8
ast: Add atomic type
...
Bug: tint:892
Change-Id: I00ab3e819a60762ff72b58f8a8255e56adadd71f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54644
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-17 15:48:39 +00:00
Ben Clayton
36edf8d850
wgsl: Fixes for new validation failures
...
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 >
2021-06-17 11:25:09 +00:00
David Neto
74bd7919b0
spirv-reader: support remaining builtin inputs
...
- local_invocation_index
- local_invocation_id
- global_invocation_id
- workgroup_id
- num_workgroups
Fixed: tint:900, tint:902
Change-Id: Icb3e76913eea5cda597ae5903f185d05ac86b33d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54780
Auto-Submit: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Reviewed-by: James Price <jrprice@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-06-17 09:13:34 +00:00
David Neto
1e19b55d19
spirv-reader: switch to HLSL-style pipeline IO
...
- When storing to sample_mask output, write to the 0th element
- Only make a return struct if it has members
- Adjust type signedness coercion when loading special builtins.
- Adapt tests
- Update expectations for end-to-end tests
- Handle sample_mask with stride
Input variables normally don't have layout. But they can have it
up through SPIR-V 1.4.
Handle this case in the SPIR-V reader, by seeing through the
intermediate alias type created for the strided array type.
Bug: tint:508
Change-Id: I0f19dc1305d3f250dbbc0698a602288c34245274
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54743
Auto-Submit: David Neto <dneto@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Reviewed-by: James Price <jrprice@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
2021-06-17 09:10:04 +00:00
James Price
c932b5535f
Implement bitwise complement operator
...
This translates to/from OpNot for SPIR-V, and ~ for all three textual
language backends.
Fixed: tint:866
Change-Id: Id934fb309221e3fca0e7efa33edaaae137fd8085
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54980
Auto-Submit: James Price <jrprice@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-06-17 08:35:54 +00:00
James Price
dcb82432fb
Metal: Remap vertex buffers when using Tint
...
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 >
2021-06-17 08:08:58 +00:00
Yunchao He
5b6c1ebce7
Enable CopySplitTests unittests for 3D texture copy splitter on D3D12
...
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 >
2021-06-17 03:22:48 +00:00
Yunchao He
9288ea605d
Fix a bug in 3D texture copy splitter for D3D12
...
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 >
2021-06-17 02:36:48 +00:00
Ben Clayton
cd417bc9a1
Disable test where FXC emits bad output
...
Bug: tint:904
Change-Id: Ibefd0d83914e39b5a2db942153f183e6f334fcc8
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/54880
Auto-Submit: Ben Clayton <bclayton@google.com >
Commit-Queue: Kai Ninomiya <kainino@chromium.org >
Reviewed-by: Kai Ninomiya <kainino@chromium.org >
2021-06-16 20:18:08 +00:00
Sarah
52b6a004b8
validation: structure containing a RTA cannot be used as a uniform buffer
...
Bug: tint:294
Change-Id: I47a87d902c3bc0df6f62712b7461f51a0f292343
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54860
Auto-Submit: Sarah Mashayekhi <sarahmashay@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Antonio Maiorano <amaiorano@google.com >
2021-06-16 19:40:13 +00:00
Sarah
10442eff7d
validation: limit dynamic indexes to references to matrices and arrays
...
https://github.com/gpuweb/gpuweb/pull/1801
indexes must be of type 'i32' or 'u32'
Bug: tint:867
Change-Id: Ie5bfacf87af5a06d5428dc510145e96fb156c42e
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54720
Kokoro: Kokoro <noreply+kokoro@google.com >
Auto-Submit: Sarah Mashayekhi <sarahmashay@google.com >
Reviewed-by: Antonio Maiorano <amaiorano@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-06-16 18:50:13 +00:00
Sarah
b6fdcc54df
transform: remove VarForDynamicIndex transform.
...
Dynamic indexes are limited to references to matrices and arrays
https://github.com/gpuweb/gpuweb/pull/1801
Bug: tint:867
Change-Id: I114daa053c8a4ffd23ce784ac4538567a551cc21
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54701
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Auto-Submit: Sarah Mashayekhi <sarahmashay@google.com >
2021-06-16 17:42:53 +00:00
Sarah
4b1c9de503
validation: cannot cast to a pointer
...
Bug: tint:73
Change-Id: I913509b4d5bd502c7699364db4e7a02f8895cc58
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54760
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Auto-Submit: Sarah Mashayekhi <sarahmashay@google.com >
2021-06-16 17:42:13 +00:00
James Price
ff7eb1641e
Metal: Run vertex pulling when using Tint
...
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 >
2021-06-16 16:58:39 +00:00
James Price
142108fc8e
Metal: Remap resource bindings when using Tint
...
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 >
2021-06-16 15:42:59 +00:00
Li Hao
b936d23364
Implement internal storage for buffer usage and buffer binding type
...
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 >
2021-06-16 14:33:27 +00:00
Ben Clayton
d47eb3a965
writer/hlsl: Generate padding for UBO padded structs
...
Combined with the new PadArrayElements transform, arrays with strides
are now correctly emitted.
Fixed: tint:182
Fixed: tint:895
Change-Id: I26a1be94dee6e4c9d9747c8317a932fc1fb3c810
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54640
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-16 09:50:11 +00:00
Ben Clayton
31936f375f
Add transform/PadArrayElements
...
Replaces arrays with an explicit stride with an array to a structure holding the element padded with a `[[size]]` decoration.
Note that the HLSL writer is still not correctly emitting structure fields with a `[[size]]`, which will be fixed in a follow up change.
Bug: tint:182
Bug: tint:895
Fixed: tint:180
Fixed: tint:649
Change-Id: Ic135dfc89309ac805507e9f39392577c7f82d154
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54582
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: David Neto <dneto@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-16 09:50:11 +00:00
Ben Clayton
677437d650
resolver: Reenable VS validation for returning position
...
Fixed: tint:730
Change-Id: I7d5ebeffe2d522182d07f554a671bebab1cce2e6
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54420
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-16 09:50:11 +00:00
Ben Clayton
7e00263c01
wgsl: Remove [[access]] and [[offset]] decorations
...
These have been deprecated, and their usages in Dawn, CTS and samples have been updated.
Fixed: tint:846
Change-Id: I74b831fd5be2e7ca02e8208835eac8beddcef9af
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54325
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: David Neto <dneto@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-16 09:19:36 +00:00
Ben Clayton
fe66cbe7bb
writer/hlsl: Implement fma()
...
Change-Id: I30763381bcb0588379e0896f014fa9756b5f3395
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54324
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: David Neto <dneto@google.com >
2021-06-16 09:19:36 +00:00
Ben Clayton
35ce0d1993
writer/hlsl: Implement isNormal
...
Change-Id: I5e5aa81db686b0205ffbf157542c0e85f28b5d5d
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54323
Commit-Queue: Ben Clayton <bclayton@chromium.org >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: David Neto <dneto@google.com >
2021-06-16 09:19:36 +00:00
Ben Clayton
9ef52ffd8c
writer/hlsl: Use the WrapArraysInStructs transform
...
Fixes issues with using arrays as function return types.
Fixed: tint:848
Change-Id: Iee8af0f2cea9d19e448176446c6599be2bd32316
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54321
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-16 09:19:36 +00:00
Ben Clayton
0597a2b51b
Add transform/WrapArraysInStructs
...
And replace the MSL writer's logic to do this with the transform.
We need to do the same thing in HLSL, and in the future GLSL too.
Partially reverts fbfde720
Change-Id: Ie280e011bc3ded8e15ccacc0aeb12da3c2407389
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54242
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-16 09:19:36 +00:00
Ben Clayton
cfed1cb01e
ast: Tweak cloning rules for module-scope decls
...
Previously the Clone() of the AST would clone all the functions, globals
and type declarations in a temporary vector, then assign this to the
ast::Module. This meant that adding new module-scope declarations inside
callbacks of ReplaceAll() would place them right at the top, before any
of the cloned declarations.
As top-level declarations are not statements, ensuring that a new object
comes before the current ReplaceAll() declaration is surprisingly
tricky.
With this change, we can now safely assume that calling
ProgramBuilder::Var(), ProgramBuilder::Func(), ProgramBuilder::Alias()
or ProgramBuilder::Structure() inside a ReplaceAll() will add that
module-scoped declaration before the currently processed top-level
declaration.
Change-Id: I52772fdc85940c8ac8d941fbd53374a4dd64a9f4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54320
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-16 09:19:36 +00:00
Ben Clayton
5d2f34ecf2
writer/hlsl: Simplify emission logic, clean up output
...
And fix issues where global variables would not be emitted unless they were transitively referenced by an entry point.
This change requires crbug.com/tint/697 to be fixed before landing.
Change-Id: I712bd9d369e08c9a3cdfb0f114c3609584f91f28
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54241
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-16 09:19:36 +00:00
David Neto
944c5617ca
spirv-reader: handle initialized gl_Position
...
Bug: tint:508
Change-Id: I57b811c71e9172becfa8a7b9c298824b891d4844
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54565
Auto-Submit: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: David Neto <dneto@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-16 01:33:38 +00:00
David Neto
05cc833ae8
spirv-reader: pipeline IO: handle position builtin
...
Bug: tint:508
Change-Id: I9a4dea29bddf0d511fb62f353dda24de72cf85f4
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54486
Commit-Queue: David Neto <dneto@google.com >
Auto-Submit: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-15 22:47:17 +00:00
Sarah
ebaa4b4f3d
validation: cannot store into a read-only type
...
Bug: tint:443
Change-Id: I4ebb14ab53b2f72d108efb4770241c687bf86ee2
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54484
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: Sarah Mashayekhi <sarahmashay@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
Reviewed-by: Antonio Maiorano <amaiorano@google.com >
2021-06-15 22:39:19 +00:00
David Neto
068aa69037
spirv-reader: pipeline IO: handle sample_mask output
...
No other outputs require signedness conversion, so we can simplify
one part of the code
Bug: tint:508
Change-Id: I71a111b312a0b44f780155fcf6b4420742cc9d88
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54483
Auto-Submit: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: David Neto <dneto@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-15 22:23:37 +00:00
James Price
4daac0e64b
resolver: Allow multiple internal decorations
...
Sometimes a stack of transforms will generate multiple different
DisableValidationDecorations on a single node.
Change-Id: Id4afa148360f98796e67017a9bbdd8adf12eed58
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54700
Auto-Submit: James Price <jrprice@google.com >
Commit-Queue: Ben Clayton <bclayton@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-06-15 16:33:57 +00:00
James Price
3184544182
transform/bound_array_accessors: Use new arrayLength overload
...
Change-Id: I525693c232f1c16ffae5e17f76ae2b9349539469
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54600
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: James Price <jrprice@google.com >
Auto-Submit: James Price <jrprice@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-06-15 15:05:17 +00:00
James Price
7e22196a35
resolver: Always validate return statements
...
Previously we were only validating return statements that had values,
which meant we were not catching issues when the return value was
omitted in a non-void function.
Fixed: chromium:1219037
Change-Id: If68f67a4a79e46894eee08322726000074c9095b
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54561
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: James Price <jrprice@google.com >
Auto-Submit: James Price <jrprice@google.com >
Reviewed-by: Ben Clayton <bclayton@google.com >
2021-06-15 15:00:57 +00:00
David Neto
1a14f2093c
spirv-reader: pipeline IO: handle sample_mask input
...
It's an array in Vulkan SPIR-V, but a scalar u32 in WGSL.
Handle signedness change.
Note that input variables can't have an initializer, so that
doesn't need to be handled.
Bug: tint:508
Change-Id: I7cf4228b31f9c42e4e4436d78cbb1eb0c8196cd5
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54482
Auto-Submit: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: David Neto <dneto@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-14 19:42:27 +00:00
Ryan Harrison
8c584a1f4c
Make usage of overridable constants a validation error
...
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 >
2021-06-14 19:07:17 +00:00
Ben Clayton
58e2fb1253
intrinsics: textureSampleCompareLevel()
...
Fixed: tint:862
Change-Id: If85fd589a500afe2c59ba581fcd0124d4b87dfde
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54181
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: David Neto <dneto@google.com >
2021-06-14 15:29:34 +00:00
Ben Clayton
b4943bab50
Improve function name collision error message
...
Change-Id: Ia1e0460dd0d7b17dab2354311b2989c56143a23f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54180
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Antonio Maiorano <amaiorano@google.com >
2021-06-14 15:29:34 +00:00
David Neto
745aed3f19
spirv-reader: Convert signedness of built-in input when needed
...
Also, complete the list of builtins that need signedness conversion.
Bug: tint:508
Change-Id: I785f283a435e07f9c08e2eb23245883aa272b6b1
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54463
Auto-Submit: David Neto <dneto@google.com >
Kokoro: Kokoro <noreply+kokoro@google.com >
Commit-Queue: David Neto <dneto@google.com >
Reviewed-by: James Price <jrprice@google.com >
2021-06-14 14:58:38 +00:00
James Price
6681114e5e
Update usage of arrayLength() intrinsic
...
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 >
2021-06-14 08:39:02 +00:00
Stephan Hartmann
3dbfbc9460
IWYU: add cstddef for size_t
...
Bug: None
Change-Id: I3371cf10150da2c79004f56c799461b97949b18f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/54421
Commit-Queue: Corentin Wallez <cwallez@chromium.org >
Kokoro: Kokoro <noreply+kokoro@google.com >
Reviewed-by: Corentin Wallez <cwallez@chromium.org >
2021-06-14 08:04:18 +00:00