2021-09-02 13:49:59 +00:00
# Tint changes during Origin Trial
2021-11-04 19:55:57 +00:00
## Changes for M98
### Breaking Changes
* Taking the address of a vector component is no longer allowed.
2021-11-26 09:56:19 +00:00
* Module-scope declarations can no longer alias a builtin name. [tint:1318 ](https://crbug.com/tint/1318 )
2021-12-03 17:51:48 +00:00
* 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 )
2021-11-04 19:55:57 +00:00
2021-11-23 18:57:57 +00:00
### Deprecated Features
* The `isNan()` , `isInf()` , `isFinite()` and `isNormal()` builtins has been deprecated and will be removed in M101. [tint:1312 ](https://crbug.com/tint/1312 )
2021-11-05 18:37:16 +00:00
### New Features
2021-12-09 14:37:37 +00:00
* Vector and matrix element type can now be inferred from constructor argument types. [tint:1334 ](https://crbug.com/tint/1334 )
2021-12-08 19:54:08 +00:00
* New texture gather builtins: `textureGather()` and `textureGatherCompare()` . [tint:1330 ](https://crbug.com/tint/1330 )
2021-11-23 20:45:51 +00:00
* Shadowing is now fully supported. [tint:819 ](https://crbug.com/tint/819 )
2021-11-05 18:37:16 +00:00
* The `dot()` builtin now supports integer vector types.
2021-11-22 15:24:16 +00:00
* Identifiers can now start with a single leading underscore. [tint:1292 ](https://crbug.com/tint/1292 )
2021-12-03 17:51:48 +00:00
* 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 )
* 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 )
2021-11-05 18:37:16 +00:00
2021-11-23 21:46:48 +00:00
### Fixes
* 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 )
2021-10-14 03:17:32 +00:00
## Changes for M97
2021-10-12 21:57:47 +00:00
### Breaking Changes
* Deprecated `modf()` and `frexp()` builtin overloads that take a pointer second parameter have been removed.
2021-10-14 10:10:45 +00:00
* Deprecated texture builtin functions that accepted a `read` access controlled storage texture have been removed.
* Storage textures must now only use the `write` access control.
2021-10-12 21:57:47 +00:00
2021-10-22 06:23:12 +00:00
### Deprecated Features
* The `ignore()` builtin has been replaced with phony-assignment. [gpuweb#2127 ](https://github.com/gpuweb/gpuweb/pull/2127 )
2021-10-21 09:39:13 +00:00
### New Features
* `any()` and `all()` now support a `bool` parameter. These simply return the passed argument. [tint:1253 ](https://crbug.com/tint/1253 )
2021-10-21 20:36:04 +00:00
* Call statements may now include functions that return a value (`ignore()` is no longer needed).
2021-10-21 23:08:44 +00:00
* 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.
2021-10-25 19:20:31 +00:00
* Matrix construction from scalar element values is now supported.
2021-10-21 09:39:13 +00:00
2021-10-20 16:12:33 +00:00
### Fixes
* Swizzling of `vec3` types in `storage` and `uniform` buffers has been fixed for Metal 1.x. [tint:1249 ](https://crbug.com/tint/1249 )
2021-10-25 11:00:44 +00:00
* Calling a function that returns an unused value no longer produces an FXC compilation error. [tint:1259 ](https://crbug.com/tint/1259 )
2021-10-20 16:12:33 +00:00
2021-09-02 13:49:59 +00:00
## Changes for M95
### New Features
2021-10-01 08:41:55 +00:00
2021-09-02 13:49:59 +00:00
* The size of an array can now be defined using a non-overridable module-scope constant
2021-09-13 17:11:58 +00:00
* The `num_workgroups` builtin is now supported.
2021-09-08 13:46:51 +00:00
### Fixes
2021-10-01 08:41:55 +00:00
* 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 )
2021-10-12 21:57:47 +00:00
* Identifiers beginning with an underscore are now correctly rejected. [tint:1179 ](https://crbug.com/tint/1179 )
2021-11-22 15:24:16 +00:00
* `abs()` fixed for unsigned integers on SPIR-V backend