blob: 4d0ca08b47fcc0b6600cd64529fb371a3f293372 [file] [log] [blame] [view]
James Price4cc43152021-09-02 13:49:59 +00001# Tint changes during Origin Trial
2
dan sinclairf374b812023-01-30 15:34:49 +00003## Changes for M112
4
5### Breaking changes
6
Ben Claytonb549b302023-02-22 16:18:22 +00007* Most builtin functions that return a value can no longer be used as a call statement. [tint:1844](crbug.com/tint/1844)
James Priced9c0f212023-02-07 19:40:01 +00008* The `sig` member of the return type of `frexp()` has been renamed to `fract`. [tint:1766](crbug.com/tint/1766)
9* Calling a function with multiple pointer arguments that alias each other is now a error. [tint:1675](crbug.com/tint/1675)
dan sinclair21571702023-02-21 16:55:07 +000010* `type` deprecation has been removed. `alias` must be used now. [tint:1812](crbug.com/tint/1812)
dan sinclairb92ff392023-02-21 18:44:16 +000011* `static_assert` deprecation has been removed. `const_assert` must now be used. [tint:1807](crbug.com/tint/1807)
dan sinclairf374b812023-01-30 15:34:49 +000012
Ben Clayton9dc48bc2023-01-24 14:55:17 +000013## Changes for M111
14
James Priceb4049dc2023-01-26 13:02:59 +000015### New features
16
17* The `workgroupUniformLoad` builtin function is now supported. [tint:1780](crbug.com/tint/1780)
18* The `diagnostic` directive and `@diagnostic` attribute are now supported. [tint:1809](crbug.com/tint/1809)
19 * The attribute is currently only supported on function declarations.
20
Ben Clayton41884e42023-01-24 19:32:04 +000021### Breaking changes
22
23* You may need to add parentheses to less-than or greater-than binary expressions that now parse as template lists. For example `a(b<c, d>e)` will need parentheses around `b<c` or `d>e`. [tint:1810](crbug.com/tint/1810).
James Priceb4049dc2023-01-26 13:02:59 +000024* Uniformity analysis failures are now an error [tint:880](crbug.com/tint/880)
25 * The `derivative_uniformity` diagnostic filter can be used to modify the severity if needed.
Ben Clayton41884e42023-01-24 19:32:04 +000026
Ben Clayton9dc48bc2023-01-24 14:55:17 +000027## Deprecated Features
28
29* The keyword to alias a type has been renamed from `type` to `alias`. [tint:1812](crbug.com/tint/1812)
Ben Claytonc98d57d2023-01-24 14:59:43 +000030* `static_assert` has been renamed to `const_assert`. [tint:1807](crbug.com/tint/1807)
Ben Clayton9dc48bc2023-01-24 14:55:17 +000031
Ben Clayton10fae7a2022-11-14 15:29:29 +000032## Changes for M110
33
Ben Clayton543dd182022-11-18 11:17:41 +000034### Breaking changes
35
36* The `textureSampleLevel()` overload for `texture_external` has been removed. Use `textureSampleBaseClampToEdge()`. [tint:1671](crbug.com/tint/1671)
37
Ben Clayton10fae7a2022-11-14 15:29:29 +000038### Deprecated Features
39
40* The `sig` member of the return type of `frexp()` has been renamed to `fract`. [tint:1757](crbug.com/tint/1757)
James Price4d65fc92022-11-17 17:27:27 +000041* Calling a function with multiple pointer arguments that alias each other is now a warning, and
42 will become an error in a future release. [tint:1675](crbug.com/tint/1675)
Ben Clayton10fae7a2022-11-14 15:29:29 +000043
Antonio Maiorano0640c812022-10-26 00:27:38 +000044## Changes for M109
45
Ben Clayton13f08902022-10-26 18:36:44 +000046### Breaking changes
47
48* `textureDimensions()`, `textureNumLayers()` and `textureNumLevels()` now return unsigned integers / vectors. [tint:1526](crbug.com/tint/1526)
dan sinclairf218af02022-11-07 11:34:34 +000049* The `@stage` attribute has been removed. The short forms should be used
50 instead (`@vertex`, `@fragment`, or `@compute`). [tint:1503](crbug.com/tint/1503)
dan sinclair3b2b5482022-11-07 14:20:33 +000051* Module-scope `let` is now an error. Use module-scope `const` instead. [tint:1580](crbug.com/tint/1584)
dan sinclair5071a542022-11-07 16:15:55 +000052* Reserved words are now an error instead of a deprecation. [tint:1463](crbug.com/tint/1463)
Ben Clayton55a8eac2022-11-09 20:11:43 +000053* You may no longer use pointer parameters in `workgroup` address space. [tint:1721](crbug.com/tint/1721)
Ben Clayton13f08902022-10-26 18:36:44 +000054
Antonio Maiorano0640c812022-10-26 00:27:38 +000055### New features
56
57* Uniformity analysis failures are warnings again [tint:1728](crbug.com/tint/1728)
Ben Clayton2e376a92022-10-26 18:47:02 +000058* You can now call texture builtins with a mix of signed and unsigned integer arguments. [tint:1733](crbug.com/tint/1733)
Antonio Maiorano0640c812022-10-26 00:27:38 +000059
Ben Claytonc4ebf2c2022-09-22 22:59:16 +000060## Changes for M108
61
62### New features
63
64* `textureSampleBaseClampToEdge()` has been implemented. [tint:1671](crbug.com/tint/1671)
65
66### Deprecated Features
67
68* The `external_texture` overload of `textureSampleLevel()` has been deprecated. Use `textureSampleBaseClampToEdge()` instead. [tint:1671](crbug.com/tint/1671)
69
Ben Clayton75bc93c2022-10-11 20:36:48 +000070### Fixes
71
72* Constant evaluation of type conversions where the value exceeds the limits of the target type have been fixed. [tint:1707](crbug.com/tint/1707)
73
Ben Clayton4d8fa432022-09-21 13:20:13 +000074## Changes for M107
75
76### New features
77
78* `saturate()` has been implemented. [tint:1591](crbug.com/tint/1591)
79
80### Breaking changes
81
Ben Clayton4c70d7f2022-09-26 12:30:05 +000082* Uniformity analysis failures are now an error [tint:880](crbug.com/tint/880)
Ben Clayton4d8fa432022-09-21 13:20:13 +000083* Indexing an array, vector or matrix with a compile-time expression that's out-of-bounds is now an error [tint:1665](crbug.com/tint/1665)
84
Ben Claytoncae55472022-08-02 16:14:25 +000085## Changes for M106
86
87### New features
88
89* `array()` constructor can now infer type and count. [tint:1628](crbug.com/tint/1628)
Ben Claytonf7953082022-08-03 12:12:25 +000090* `static_assert` statement has been added. [tint:1625](crbug.com/tint/1625)
Ben Claytonf3d9ea42022-09-13 22:47:12 +000091
dan sinclair0e141c22022-08-03 14:34:16 +000092### Deprecated Features
93
94* The list of reserved words has been sync'd to the WGSL specification. [tint:1463](crbug.com/tint/1463)
95
dan sinclair0fa572f2022-06-09 15:33:42 +000096## Changes for M105
97
Ben Clayton53af1582022-06-28 12:53:56 +000098### New features
99
100* Module-scope `var<private>` can now infer the storage type, like function-scope `var`. [tint:1584](crbug.com/tint/1584)
dan sinclaird23f2962022-06-28 15:27:44 +0000101* The `acosh`, `asinh`, and `atanh` builtin functions are now supported [tint:1465](crbug.com/tint/1465)
Ben Clayton53af1582022-06-28 12:53:56 +0000102
James Price3e38d7e2022-06-15 23:32:14 +0000103### Breaking changes
104
105* The `smoothStep()` builtin has been removed (use `smoothstep` instead). [tint:1483](crbug.com/tint/1483)
Ben Claytonc64ca232022-06-29 00:55:36 +0000106* Module-scope `let` has been replaced with module-scope `const`. [tint:1580](crbug.com/tint/1584)
107 * Note: Module-scope `const` does not support structure types. Use `var<private>` if you need a module-scope structure type.
dan sinclaircfa951a2022-07-04 16:58:00 +0000108* Struct members can no longer be separated with semicolons (use commas instead). [tint:1475](crbug.com/tint/1475)
Ben Claytonf19cb022022-07-15 15:25:30 +0000109* Single scalar matrix constructors have been removed. These were never part of the WGSL spec. [tint:1597](crbug.com/tint/1597)
James Price3e38d7e2022-06-15 23:32:14 +0000110
dan sinclair0fa572f2022-06-09 15:33:42 +0000111### Deprecated Features
112
113* The `@stage` attribute has been deprecated. The short forms should be used
114 instead (`@vertex`, `@fragment`, or `@compute`). [tint:1503](crbug.com/tint/1503)
115
116## Changes for M104
117
Ben Clayton81747132022-06-09 16:45:05 +0000118### New features
119
120* Tint now supports abstract-numerics, removing the need to always suffix unsigned integers with `u` [tint:1504](crbug.com/tint/1504)
dan sinclair0fa572f2022-06-09 15:33:42 +0000121* Parsing of `@compute`, `@fragment` and `@vertex` added.
122
James Pricebe656f72022-05-11 22:05:15 +0000123## Changes for M103
124
125### New features
126
127* Produce warnings for when calling barriers, textureSample, and derivative
128builtins in non-uniform control flow [tint:880](crbug.com/tint/880)
Ben Clayton3b5edf12022-05-16 21:14:11 +0000129* Matrix identity constructors and constructors for a single scalar value are now supported [tint:1545](crbug.com/tint/1545)
James Pricebe656f72022-05-11 22:05:15 +0000130
Antonio Maiorano6ac7c8a2022-05-31 22:35:49 +0000131### Breaking changes
Ben Clayton81747132022-06-09 16:45:05 +0000132
Antonio Maiorano6ac7c8a2022-05-31 22:35:49 +0000133* Builtin `atomicCompareExchangeWeak` returns a struct instead of a vec2. [tint:1185](crbug.com/tint/1185)
134
James Price8bcecf32022-03-21 16:09:17 +0000135## Changes for M102
136
James Priced9d08ae2022-03-23 09:11:03 +0000137### New Features
138
139* Parentheses are no longer required around expressions for if and switch statements [tint:1424](crbug.com/tint/1424)
James Pricee47b3132022-03-31 22:30:10 +0000140* Compound assignment statements are now supported. [tint:1325](https://crbug.com/tint/1325)
James Priced68d3a92022-04-07 13:42:45 +0000141* Postfix increment and decrement statements are now supported. [tint:1488](crbug.com/tint/1488)
James Pricee6c7fd72022-04-05 21:01:09 +0000142* The colon in case statements is now optional. [tint:1485](crbug.com/tint/1485)
James Priced9d08ae2022-03-23 09:11:03 +0000143
James Price8bcecf32022-03-21 16:09:17 +0000144### Breaking changes
145
James Price3b671cb2022-03-28 14:31:22 +0000146* Struct members are now separated by commas. [tint:1475](crbug.com/tint/1475)
James Price8bcecf32022-03-21 16:09:17 +0000147* The `@block` attribute has been removed. [tint:1324](crbug.com/tint/1324)
James Pricedfc1a2c2022-03-21 16:09:17 +0000148* The `@stride` attribute has been removed. [tint:1381](crbug.com/tint/1381)
James Price6bd90d62022-03-21 16:09:17 +0000149* Attributes using `[[attribute]]` syntax are no longer supported. [tint:1382](crbug.com/tint/1382)
James Price7d38b882022-03-21 16:09:17 +0000150* The `elseif` keyword is no longer supported. [tint:1289](crbug.com/tint/1289)
James Price8bcecf32022-03-21 16:09:17 +0000151
James Pricee6c76092022-03-30 17:57:39 +0000152### Deprecated Features
153
154* The `smoothStep()` builtin has been renamed to `smoothstep()`. [tint:1483](crbug.com/tint/1483)
155
James Price3fac6022022-02-18 21:47:24 +0000156## Changes for M101
157
158### New Features
159
160* Tint now supports unicode identifiers. [tint:1437](crbug.com/tint/1437)
161
James Pricebcd9ad22022-03-05 00:39:14 +0000162### Breaking changes
163
164* The `isNan()`, `isInf()`, `isFinite()`, and `isNormal()` builtins have been removed. [tint:1312](https://crbug.com/tint/1312)
165
James Price1c02eb82022-01-25 01:01:39 +0000166## Changes for M100
167
168### Breaking changes
169
170* The `@interpolate(flat)` attribute must now be specified on integral user-defined IO. [tint:1224](crbug.com/tint/1224)
Ben Claytonb80e2f32022-02-01 17:21:52 +0000171* The `ignore()` intrinsic has been removed. Use phoney-assignment instead: `ignore(expr);` -> `_ = expr;`.
Ben Clayton8250f2b2022-02-03 00:12:52 +0000172* `break` statements in `continuing` blocks are now correctly validated.
James Price1c02eb82022-01-25 01:01:39 +0000173
Ben Claytonf1d570a2022-02-14 21:56:06 +0000174### New Features
175
176* Module-scope declarations can now be declared in any order. [tint:1266](crbug.com/tint/1266)
James Priced0ec88c2022-02-15 16:36:57 +0000177* The `override` keyword and `@id()` attribute for pipeline-overridable constants are now supported, replacing the `@override` attribute. [tint:1403](crbug.com/tint/1403)
Ben Claytonf1d570a2022-02-14 21:56:06 +0000178
Ben Clayton30d55fa2021-12-09 22:53:14 +0000179## Changes for M99
180
Ben Claytone5919ac2022-01-14 17:16:32 +0000181### Breaking changes
182
183Obviously infinite loops (no condition, no break) are now a validation error.
184
Ben Clayton30d55fa2021-12-09 22:53:14 +0000185### Deprecated Features
186
Ben Clayton13722222022-01-04 20:06:49 +0000187The following features have been deprecated and will be removed in M102:
188
189* The `[[block]]` attribute has been deprecated. [tint:1324](https://crbug.com/tint/1324)
Ben Clayton01e4b6f2022-01-19 22:46:57 +0000190* Attributes now use the `@decoration` syntax instead of the `[[decoration]]` syntax. [tint:1382](https://crbug.com/tint/1382)
191* `elseif` has been replaced with `else if`. [tint:1289](https://crbug.com/tint/1289)
James Pricef6e5cc02022-01-20 22:11:07 +0000192* The `[[stride]]` attribute has been deprecated. [tint:1381](https://crbug.com/tint/1381)
Ben Clayton30d55fa2021-12-09 22:53:14 +0000193
194### New Features
195
196* Vector and matrix element type can now be inferred from constructor argument types. [tint:1334](https://crbug.com/tint/1334)
Ben Clayton5c99ed02022-01-05 20:11:00 +0000197* Added builtins `degrees()` and `radians()` for converting between degrees and radians. [tint:1329](https://crbug.com/tint/1329)
Ben Clayton3cbb1362022-01-06 18:11:01 +0000198* `let` arrays and matrices can now be dynamically indexed. [tint:1352](https://crbug.com/tint/1352)
James Priceecf43d62022-01-19 15:55:56 +0000199* Storage and Uniform buffer types no longer have to be structures. [tint:1372](crbug.com/tint/1372)
James Price6b1e5f52022-01-19 18:11:17 +0000200* A struct declaration does not have to be followed by a semicolon. [tint:1380](crbug.com/tint/1380)
Ben Clayton30d55fa2021-12-09 22:53:14 +0000201
Ben Claytone4e74852022-01-06 21:32:41 +0000202### Fixes
203
204* Fixed an issue where for-loops that contain array or structure constructors in the loop initializer statements, condition expressions or continuing statements could fail to compile. [tint:1364](https://crbug.com/tint/1364)
205
James Price85170d72021-11-04 19:55:57 +0000206## Changes for M98
207
208### Breaking Changes
209
210* Taking the address of a vector component is no longer allowed.
Ben Clayton0ea236f2021-11-26 09:56:19 +0000211* Module-scope declarations can no longer alias a builtin name. [tint:1318](https://crbug.com/tint/1318)
Ben Claytonea3eee92021-12-03 17:51:48 +0000212* It is now an error to call a function either directly or transitively, from a loop continuing block, that uses `discard`. [tint:1302](https://crbug.com/tint/1302)
James Price85170d72021-11-04 19:55:57 +0000213
Ben Claytona40e4552021-11-23 18:57:57 +0000214### Deprecated Features
215
216* The `isNan()`, `isInf()`, `isFinite()` and `isNormal()` builtins has been deprecated and will be removed in M101. [tint:1312](https://crbug.com/tint/1312)
217
Ben Clayton189dc7d2021-11-05 18:37:16 +0000218### New Features
219
Ben Clayton37035222021-12-08 19:54:08 +0000220* New texture gather builtins: `textureGather()` and `textureGatherCompare()`. [tint:1330](https://crbug.com/tint/1330)
Ben Claytonb05e1852021-11-23 20:45:51 +0000221* Shadowing is now fully supported. [tint:819](https://crbug.com/tint/819)
Ben Clayton189dc7d2021-11-05 18:37:16 +0000222* The `dot()` builtin now supports integer vector types.
Ben Clayton177e7bf2021-11-22 15:24:16 +0000223* Identifiers can now start with a single leading underscore. [tint:1292](https://crbug.com/tint/1292)
Ben Claytonea3eee92021-12-03 17:51:48 +0000224* Control flow analysis has been improved, and functions no longer need to `return` if the statement is unreachable. [tint:1302](https://crbug.com/tint/1302)
225* Unreachable statements now produce a warning instead of an error, to allow WGSL code to be updated to the new analysis behavior. These warnings may become errors in the future [gpuweb#2378](https://github.com/gpuweb/gpuweb/issues/2378)
Ben Clayton189dc7d2021-11-05 18:37:16 +0000226
Ben Claytond1f0a142021-11-23 21:46:48 +0000227### Fixes
228
229* Fixed an issue where using a module-scoped `let` in a `workgroup_size` may result in a compilation error. [tint:1320](https://crbug.com/tint/1320)
230
Ben Clayton11c96562021-10-14 03:17:32 +0000231## Changes for M97
Ben Clayton2aa68552021-10-12 21:57:47 +0000232
233### Breaking Changes
234
235* Deprecated `modf()` and `frexp()` builtin overloads that take a pointer second parameter have been removed.
Ben Claytonf3f2d0a2021-10-14 10:10:45 +0000236* Deprecated texture builtin functions that accepted a `read` access controlled storage texture have been removed.
237* Storage textures must now only use the `write` access control.
Ben Clayton2aa68552021-10-12 21:57:47 +0000238
Ben Clayton7b776f12021-10-22 06:23:12 +0000239### Deprecated Features
240
241* The `ignore()` builtin has been replaced with phony-assignment. [gpuweb#2127](https://github.com/gpuweb/gpuweb/pull/2127)
242
Ben Clayton8cab28c2021-10-21 09:39:13 +0000243### New Features
244
245* `any()` and `all()` now support a `bool` parameter. These simply return the passed argument. [tint:1253](https://crbug.com/tint/1253)
Ben Clayton72789de2021-10-21 20:36:04 +0000246* Call statements may now include functions that return a value (`ignore()` is no longer needed).
James Pricea41694e2021-10-21 23:08:44 +0000247* The `interpolate(flat)` attribute can now be specified on integral user-defined IO. It will eventually become an error to define integral user-defined IO without this attribute.
James Price91689fb2021-10-25 19:20:31 +0000248* Matrix construction from scalar element values is now supported.
Ben Clayton8cab28c2021-10-21 09:39:13 +0000249
Ben Clayton7103f512021-10-20 16:12:33 +0000250### Fixes
251
252* Swizzling of `vec3` types in `storage` and `uniform` buffers has been fixed for Metal 1.x. [tint:1249](https://crbug.com/tint/1249)
Ben Clayton33c13c62021-10-25 11:00:44 +0000253* Calling a function that returns an unused value no longer produces an FXC compilation error. [tint:1259](https://crbug.com/tint/1259)
Ben Clayton7dc901f2022-01-05 21:03:10 +0000254* `abs()` fixed for unsigned integers on SPIR-V backend
Ben Clayton7103f512021-10-20 16:12:33 +0000255
James Price4cc43152021-09-02 13:49:59 +0000256## Changes for M95
257
258### New Features
Ben Clayton5e358642021-10-01 08:41:55 +0000259
James Price4cc43152021-09-02 13:49:59 +0000260* The size of an array can now be defined using a non-overridable module-scope constant
James Price922fce72021-09-13 17:11:58 +0000261* The `num_workgroups` builtin is now supported.
David Netobe514a12021-09-08 13:46:51 +0000262
263### Fixes
David Netobe514a12021-09-08 13:46:51 +0000264
Ben Clayton5e358642021-10-01 08:41:55 +0000265* Hex floats: now correctly errors when the magnitude is non-zero, and the exponent would cause overflow. [tint:1150](https://crbug.com/tint/1150), [tint:1166](https://crbug.com/tint/1166)
Ben Clayton2aa68552021-10-12 21:57:47 +0000266* Identifiers beginning with an underscore are now correctly rejected. [tint:1179](https://crbug.com/tint/1179)