mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-11 14:41:50 +00:00
wgsl: Deprecate 'const' for 'let'
Renamed with: https://github.com/gpuweb/gpuweb/pull/1574 Bug: tint:699 Change-Id: I4dda868abe4c5bc0cba46bc81d9eb297a0663717 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/47141 Commit-Queue: Ben Clayton <bclayton@google.com> Reviewed-by: David Neto <dneto@google.com>
This commit is contained in:
committed by
Commit Bot service account
parent
fae0aa6e72
commit
571f2b7363
@@ -33,8 +33,8 @@ struct S {
|
||||
m1 : array<u32>;
|
||||
};
|
||||
|
||||
const c0 : i32 = 10;
|
||||
const c1 : bool = true;
|
||||
let c0 : i32 = 10;
|
||||
let c1 : bool = true;
|
||||
|
||||
type t0 = [[stride(16)]] array<vec4<f32>>;
|
||||
type t1 = array<vec4<f32>>;
|
||||
@@ -102,7 +102,7 @@ fn main() {
|
||||
f1(1.0, 2);
|
||||
}
|
||||
|
||||
const declaration_order_check_0 : i32 = 1;
|
||||
let declaration_order_check_0 : i32 = 1;
|
||||
|
||||
type declaration_order_check_1 = f32;
|
||||
|
||||
@@ -110,7 +110,7 @@ fn declaration_order_check_2() {}
|
||||
|
||||
type declaration_order_check_2 = f32;
|
||||
|
||||
const declaration_order_check_3 : i32 = 1;
|
||||
let declaration_order_check_3 : i32 = 1;
|
||||
|
||||
)");
|
||||
|
||||
|
||||
@@ -46,9 +46,9 @@ class LocationDecoration;
|
||||
/// var computed_depth : i32;
|
||||
/// var area : i32 = compute_area(width, height);
|
||||
///
|
||||
/// 2. A "const" declaration is a name for a typed value. Examples:
|
||||
/// 2. A "let" declaration is a name for a typed value. Examples:
|
||||
///
|
||||
/// const twice_depth : i32 = width + width; // Must have initializer
|
||||
/// let twice_depth : i32 = width + width; // Must have initializer
|
||||
///
|
||||
/// 3. A formal parameter to a function is a name for a typed value to
|
||||
/// be passed into a function. Example:
|
||||
|
||||
Reference in New Issue
Block a user