From 03f88e6f49e41a888b729df633a0356a1a3321ec Mon Sep 17 00:00:00 2001 From: Ben Clayton Date: Wed, 29 Jun 2022 00:51:46 +0000 Subject: [PATCH] test/tint/expressions/type_ctor: Use 'var' instead of 'let' Module-scope 'let' is getting replaced by 'const'. For all backends, 'const' will be inlined into the place of usage, making most of these tests produce no output (if replaced with 'const'). Instead switch to emitting with 'var'. Bug: tint:1580 Change-Id: Ied5ddf9cdb7fbd3cef8e7b0c6f4983748aaa3d07 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/94688 Kokoro: Kokoro Commit-Queue: Ben Clayton Reviewed-by: Dan Sinclair --- .../mat2x2/explicit/identity/f32.wgsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.glsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.hlsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../explicit/identity/f32.wgsl.expected.wgsl | 2 +- .../mat2x2/explicit/scalars/f32.wgsl | 4 ++-- .../explicit/scalars/f32.wgsl.expected.glsl | 2 +- .../explicit/scalars/f32.wgsl.expected.hlsl | 2 +- .../explicit/scalars/f32.wgsl.expected.msl | 2 -- .../explicit/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/scalars/f32.wgsl.expected.wgsl | 2 +- .../mat2x2/explicit/vectors/f32.wgsl | 4 ++-- .../explicit/vectors/f32.wgsl.expected.glsl | 2 +- .../explicit/vectors/f32.wgsl.expected.hlsl | 2 +- .../explicit/vectors/f32.wgsl.expected.msl | 2 -- .../explicit/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/vectors/f32.wgsl.expected.wgsl | 2 +- .../mat2x2/inferred/identity/f32.wgsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.glsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.hlsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../inferred/identity/f32.wgsl.expected.wgsl | 2 +- .../inferred/scalars/abstract-float.wgsl | 4 ++-- .../scalars/abstract-float.wgsl.expected.glsl | 2 +- .../scalars/abstract-float.wgsl.expected.hlsl | 2 +- .../scalars/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../scalars/abstract-float.wgsl.expected.wgsl | 2 +- .../mat2x2/inferred/scalars/f32.wgsl | 4 ++-- .../inferred/scalars/f32.wgsl.expected.glsl | 2 +- .../inferred/scalars/f32.wgsl.expected.hlsl | 2 +- .../inferred/scalars/f32.wgsl.expected.msl | 2 -- .../inferred/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/scalars/f32.wgsl.expected.wgsl | 2 +- .../inferred/vectors/abstract-float.wgsl | 4 ++-- .../vectors/abstract-float.wgsl.expected.glsl | 2 +- .../vectors/abstract-float.wgsl.expected.hlsl | 2 +- .../vectors/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../vectors/abstract-float.wgsl.expected.wgsl | 2 +- .../mat2x2/inferred/vectors/f32.wgsl | 4 ++-- .../inferred/vectors/f32.wgsl.expected.glsl | 2 +- .../inferred/vectors/f32.wgsl.expected.hlsl | 2 +- .../inferred/vectors/f32.wgsl.expected.msl | 2 -- .../inferred/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/vectors/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/mat2x2/zero/f32.wgsl | 2 +- .../mat2x2/zero/f32.wgsl.expected.glsl | 2 +- .../mat2x2/zero/f32.wgsl.expected.hlsl | 2 +- .../mat2x2/zero/f32.wgsl.expected.msl | 2 -- .../mat2x2/zero/f32.wgsl.expected.spvasm | 12 ++++++----- .../mat2x2/zero/f32.wgsl.expected.wgsl | 2 +- .../mat2x3/explicit/identity/f32.wgsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.glsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.hlsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../explicit/identity/f32.wgsl.expected.wgsl | 2 +- .../mat2x3/explicit/scalars/f32.wgsl | 4 ++-- .../explicit/scalars/f32.wgsl.expected.glsl | 2 +- .../explicit/scalars/f32.wgsl.expected.hlsl | 2 +- .../explicit/scalars/f32.wgsl.expected.msl | 2 -- .../explicit/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/scalars/f32.wgsl.expected.wgsl | 2 +- .../mat2x3/explicit/vectors/f32.wgsl | 4 ++-- .../explicit/vectors/f32.wgsl.expected.glsl | 2 +- .../explicit/vectors/f32.wgsl.expected.hlsl | 2 +- .../explicit/vectors/f32.wgsl.expected.msl | 2 -- .../explicit/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/vectors/f32.wgsl.expected.wgsl | 2 +- .../mat2x3/inferred/identity/f32.wgsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.glsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.hlsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../inferred/identity/f32.wgsl.expected.wgsl | 2 +- .../inferred/scalars/abstract-float.wgsl | 4 ++-- .../scalars/abstract-float.wgsl.expected.glsl | 2 +- .../scalars/abstract-float.wgsl.expected.hlsl | 2 +- .../scalars/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../scalars/abstract-float.wgsl.expected.wgsl | 2 +- .../mat2x3/inferred/scalars/f32.wgsl | 4 ++-- .../inferred/scalars/f32.wgsl.expected.glsl | 2 +- .../inferred/scalars/f32.wgsl.expected.hlsl | 2 +- .../inferred/scalars/f32.wgsl.expected.msl | 2 -- .../inferred/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/scalars/f32.wgsl.expected.wgsl | 2 +- .../inferred/vectors/abstract-float.wgsl | 4 ++-- .../vectors/abstract-float.wgsl.expected.glsl | 2 +- .../vectors/abstract-float.wgsl.expected.hlsl | 2 +- .../vectors/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../vectors/abstract-float.wgsl.expected.wgsl | 2 +- .../mat2x3/inferred/vectors/f32.wgsl | 4 ++-- .../inferred/vectors/f32.wgsl.expected.glsl | 2 +- .../inferred/vectors/f32.wgsl.expected.hlsl | 2 +- .../inferred/vectors/f32.wgsl.expected.msl | 2 -- .../inferred/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/vectors/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/mat2x3/zero/f32.wgsl | 2 +- .../mat2x3/zero/f32.wgsl.expected.glsl | 2 +- .../mat2x3/zero/f32.wgsl.expected.hlsl | 2 +- .../mat2x3/zero/f32.wgsl.expected.msl | 2 -- .../mat2x3/zero/f32.wgsl.expected.spvasm | 12 ++++++----- .../mat2x3/zero/f32.wgsl.expected.wgsl | 2 +- .../mat2x4/explicit/identity/f32.wgsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.glsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.hlsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../explicit/identity/f32.wgsl.expected.wgsl | 2 +- .../mat2x4/explicit/scalars/f32.wgsl | 4 ++-- .../explicit/scalars/f32.wgsl.expected.glsl | 2 +- .../explicit/scalars/f32.wgsl.expected.hlsl | 2 +- .../explicit/scalars/f32.wgsl.expected.msl | 2 -- .../explicit/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/scalars/f32.wgsl.expected.wgsl | 2 +- .../mat2x4/explicit/vectors/f32.wgsl | 4 ++-- .../explicit/vectors/f32.wgsl.expected.glsl | 2 +- .../explicit/vectors/f32.wgsl.expected.hlsl | 2 +- .../explicit/vectors/f32.wgsl.expected.msl | 2 -- .../explicit/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/vectors/f32.wgsl.expected.wgsl | 2 +- .../mat2x4/inferred/identity/f32.wgsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.glsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.hlsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../inferred/identity/f32.wgsl.expected.wgsl | 2 +- .../inferred/scalars/abstract-float.wgsl | 4 ++-- .../scalars/abstract-float.wgsl.expected.glsl | 2 +- .../scalars/abstract-float.wgsl.expected.hlsl | 2 +- .../scalars/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../scalars/abstract-float.wgsl.expected.wgsl | 2 +- .../mat2x4/inferred/scalars/f32.wgsl | 4 ++-- .../inferred/scalars/f32.wgsl.expected.glsl | 2 +- .../inferred/scalars/f32.wgsl.expected.hlsl | 2 +- .../inferred/scalars/f32.wgsl.expected.msl | 2 -- .../inferred/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/scalars/f32.wgsl.expected.wgsl | 2 +- .../inferred/vectors/abstract-float.wgsl | 4 ++-- .../vectors/abstract-float.wgsl.expected.glsl | 2 +- .../vectors/abstract-float.wgsl.expected.hlsl | 2 +- .../vectors/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../vectors/abstract-float.wgsl.expected.wgsl | 2 +- .../mat2x4/inferred/vectors/f32.wgsl | 4 ++-- .../inferred/vectors/f32.wgsl.expected.glsl | 2 +- .../inferred/vectors/f32.wgsl.expected.hlsl | 2 +- .../inferred/vectors/f32.wgsl.expected.msl | 2 -- .../inferred/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/vectors/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/mat2x4/zero/f32.wgsl | 2 +- .../mat2x4/zero/f32.wgsl.expected.glsl | 2 +- .../mat2x4/zero/f32.wgsl.expected.hlsl | 2 +- .../mat2x4/zero/f32.wgsl.expected.msl | 2 -- .../mat2x4/zero/f32.wgsl.expected.spvasm | 12 ++++++----- .../mat2x4/zero/f32.wgsl.expected.wgsl | 2 +- .../mat3x2/explicit/identity/f32.wgsl | 6 +++--- .../explicit/identity/f32.wgsl.expected.glsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.hlsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../explicit/identity/f32.wgsl.expected.wgsl | 2 +- .../mat3x2/explicit/scalars/f32.wgsl | 6 +++--- .../explicit/scalars/f32.wgsl.expected.glsl | 2 +- .../explicit/scalars/f32.wgsl.expected.hlsl | 2 +- .../explicit/scalars/f32.wgsl.expected.msl | 2 -- .../explicit/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/scalars/f32.wgsl.expected.wgsl | 2 +- .../mat3x2/explicit/vectors/f32.wgsl | 6 +++--- .../explicit/vectors/f32.wgsl.expected.glsl | 2 +- .../explicit/vectors/f32.wgsl.expected.hlsl | 2 +- .../explicit/vectors/f32.wgsl.expected.msl | 2 -- .../explicit/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/vectors/f32.wgsl.expected.wgsl | 2 +- .../mat3x2/inferred/identity/f32.wgsl | 6 +++--- .../inferred/identity/f32.wgsl.expected.glsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.hlsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../inferred/identity/f32.wgsl.expected.wgsl | 2 +- .../inferred/scalars/abstract-float.wgsl | 6 +++--- .../scalars/abstract-float.wgsl.expected.glsl | 2 +- .../scalars/abstract-float.wgsl.expected.hlsl | 2 +- .../scalars/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../scalars/abstract-float.wgsl.expected.wgsl | 2 +- .../mat3x2/inferred/scalars/f32.wgsl | 6 +++--- .../inferred/scalars/f32.wgsl.expected.glsl | 2 +- .../inferred/scalars/f32.wgsl.expected.hlsl | 2 +- .../inferred/scalars/f32.wgsl.expected.msl | 2 -- .../inferred/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/scalars/f32.wgsl.expected.wgsl | 2 +- .../inferred/vectors/abstract-float.wgsl | 6 +++--- .../vectors/abstract-float.wgsl.expected.glsl | 2 +- .../vectors/abstract-float.wgsl.expected.hlsl | 2 +- .../vectors/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../vectors/abstract-float.wgsl.expected.wgsl | 2 +- .../mat3x2/inferred/vectors/f32.wgsl | 6 +++--- .../inferred/vectors/f32.wgsl.expected.glsl | 2 +- .../inferred/vectors/f32.wgsl.expected.hlsl | 2 +- .../inferred/vectors/f32.wgsl.expected.msl | 2 -- .../inferred/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/vectors/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/mat3x2/zero/f32.wgsl | 2 +- .../mat3x2/zero/f32.wgsl.expected.glsl | 2 +- .../mat3x2/zero/f32.wgsl.expected.hlsl | 2 +- .../mat3x2/zero/f32.wgsl.expected.msl | 2 -- .../mat3x2/zero/f32.wgsl.expected.spvasm | 12 ++++++----- .../mat3x2/zero/f32.wgsl.expected.wgsl | 2 +- .../mat3x3/explicit/identity/f32.wgsl | 6 +++--- .../explicit/identity/f32.wgsl.expected.glsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.hlsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../explicit/identity/f32.wgsl.expected.wgsl | 2 +- .../mat3x3/explicit/scalars/f32.wgsl | 6 +++--- .../explicit/scalars/f32.wgsl.expected.glsl | 2 +- .../explicit/scalars/f32.wgsl.expected.hlsl | 2 +- .../explicit/scalars/f32.wgsl.expected.msl | 2 -- .../explicit/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/scalars/f32.wgsl.expected.wgsl | 2 +- .../mat3x3/explicit/vectors/f32.wgsl | 6 +++--- .../explicit/vectors/f32.wgsl.expected.glsl | 2 +- .../explicit/vectors/f32.wgsl.expected.hlsl | 2 +- .../explicit/vectors/f32.wgsl.expected.msl | 2 -- .../explicit/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/vectors/f32.wgsl.expected.wgsl | 2 +- .../mat3x3/inferred/identity/f32.wgsl | 6 +++--- .../inferred/identity/f32.wgsl.expected.glsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.hlsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../inferred/identity/f32.wgsl.expected.wgsl | 2 +- .../inferred/scalars/abstract-float.wgsl | 6 +++--- .../scalars/abstract-float.wgsl.expected.glsl | 2 +- .../scalars/abstract-float.wgsl.expected.hlsl | 2 +- .../scalars/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../scalars/abstract-float.wgsl.expected.wgsl | 2 +- .../mat3x3/inferred/scalars/f32.wgsl | 6 +++--- .../inferred/scalars/f32.wgsl.expected.glsl | 2 +- .../inferred/scalars/f32.wgsl.expected.hlsl | 2 +- .../inferred/scalars/f32.wgsl.expected.msl | 2 -- .../inferred/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/scalars/f32.wgsl.expected.wgsl | 2 +- .../inferred/vectors/abstract-float.wgsl | 6 +++--- .../vectors/abstract-float.wgsl.expected.glsl | 2 +- .../vectors/abstract-float.wgsl.expected.hlsl | 2 +- .../vectors/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../vectors/abstract-float.wgsl.expected.wgsl | 2 +- .../mat3x3/inferred/vectors/f32.wgsl | 6 +++--- .../inferred/vectors/f32.wgsl.expected.glsl | 2 +- .../inferred/vectors/f32.wgsl.expected.hlsl | 2 +- .../inferred/vectors/f32.wgsl.expected.msl | 2 -- .../inferred/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/vectors/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/mat3x3/zero/f32.wgsl | 2 +- .../mat3x3/zero/f32.wgsl.expected.glsl | 2 +- .../mat3x3/zero/f32.wgsl.expected.hlsl | 2 +- .../mat3x3/zero/f32.wgsl.expected.msl | 2 -- .../mat3x3/zero/f32.wgsl.expected.spvasm | 12 ++++++----- .../mat3x3/zero/f32.wgsl.expected.wgsl | 2 +- .../mat3x4/explicit/identity/f32.wgsl | 6 +++--- .../explicit/identity/f32.wgsl.expected.glsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.hlsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../explicit/identity/f32.wgsl.expected.wgsl | 2 +- .../mat3x4/explicit/scalars/f32.wgsl | 6 +++--- .../explicit/scalars/f32.wgsl.expected.glsl | 2 +- .../explicit/scalars/f32.wgsl.expected.hlsl | 2 +- .../explicit/scalars/f32.wgsl.expected.msl | 2 -- .../explicit/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/scalars/f32.wgsl.expected.wgsl | 2 +- .../mat3x4/explicit/vectors/f32.wgsl | 6 +++--- .../explicit/vectors/f32.wgsl.expected.glsl | 2 +- .../explicit/vectors/f32.wgsl.expected.hlsl | 2 +- .../explicit/vectors/f32.wgsl.expected.msl | 2 -- .../explicit/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/vectors/f32.wgsl.expected.wgsl | 2 +- .../mat3x4/inferred/identity/f32.wgsl | 6 +++--- .../inferred/identity/f32.wgsl.expected.glsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.hlsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../inferred/identity/f32.wgsl.expected.wgsl | 2 +- .../inferred/scalars/abstract-float.wgsl | 6 +++--- .../scalars/abstract-float.wgsl.expected.glsl | 2 +- .../scalars/abstract-float.wgsl.expected.hlsl | 2 +- .../scalars/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../scalars/abstract-float.wgsl.expected.wgsl | 2 +- .../mat3x4/inferred/scalars/f32.wgsl | 6 +++--- .../inferred/scalars/f32.wgsl.expected.glsl | 2 +- .../inferred/scalars/f32.wgsl.expected.hlsl | 2 +- .../inferred/scalars/f32.wgsl.expected.msl | 2 -- .../inferred/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/scalars/f32.wgsl.expected.wgsl | 2 +- .../inferred/vectors/abstract-float.wgsl | 6 +++--- .../vectors/abstract-float.wgsl.expected.glsl | 2 +- .../vectors/abstract-float.wgsl.expected.hlsl | 2 +- .../vectors/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../vectors/abstract-float.wgsl.expected.wgsl | 2 +- .../mat3x4/inferred/vectors/f32.wgsl | 6 +++--- .../inferred/vectors/f32.wgsl.expected.glsl | 2 +- .../inferred/vectors/f32.wgsl.expected.hlsl | 2 +- .../inferred/vectors/f32.wgsl.expected.msl | 2 -- .../inferred/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/vectors/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/mat3x4/zero/f32.wgsl | 2 +- .../mat3x4/zero/f32.wgsl.expected.glsl | 2 +- .../mat3x4/zero/f32.wgsl.expected.hlsl | 2 +- .../mat3x4/zero/f32.wgsl.expected.msl | 2 -- .../mat3x4/zero/f32.wgsl.expected.spvasm | 12 ++++++----- .../mat3x4/zero/f32.wgsl.expected.wgsl | 2 +- .../mat4x2/explicit/identity/f32.wgsl | 8 +++---- .../explicit/identity/f32.wgsl.expected.glsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.hlsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../explicit/identity/f32.wgsl.expected.wgsl | 2 +- .../mat4x2/explicit/scalars/f32.wgsl | 8 +++---- .../explicit/scalars/f32.wgsl.expected.glsl | 2 +- .../explicit/scalars/f32.wgsl.expected.hlsl | 2 +- .../explicit/scalars/f32.wgsl.expected.msl | 2 -- .../explicit/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/scalars/f32.wgsl.expected.wgsl | 2 +- .../mat4x2/explicit/vectors/f32.wgsl | 8 +++---- .../explicit/vectors/f32.wgsl.expected.glsl | 2 +- .../explicit/vectors/f32.wgsl.expected.hlsl | 2 +- .../explicit/vectors/f32.wgsl.expected.msl | 2 -- .../explicit/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/vectors/f32.wgsl.expected.wgsl | 2 +- .../mat4x2/inferred/identity/f32.wgsl | 8 +++---- .../inferred/identity/f32.wgsl.expected.glsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.hlsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../inferred/identity/f32.wgsl.expected.wgsl | 2 +- .../inferred/scalars/abstract-float.wgsl | 8 +++---- .../scalars/abstract-float.wgsl.expected.glsl | 2 +- .../scalars/abstract-float.wgsl.expected.hlsl | 2 +- .../scalars/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../scalars/abstract-float.wgsl.expected.wgsl | 2 +- .../mat4x2/inferred/scalars/f32.wgsl | 8 +++---- .../inferred/scalars/f32.wgsl.expected.glsl | 2 +- .../inferred/scalars/f32.wgsl.expected.hlsl | 2 +- .../inferred/scalars/f32.wgsl.expected.msl | 2 -- .../inferred/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/scalars/f32.wgsl.expected.wgsl | 2 +- .../inferred/vectors/abstract-float.wgsl | 8 +++---- .../vectors/abstract-float.wgsl.expected.glsl | 2 +- .../vectors/abstract-float.wgsl.expected.hlsl | 2 +- .../vectors/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../vectors/abstract-float.wgsl.expected.wgsl | 2 +- .../mat4x2/inferred/vectors/f32.wgsl | 8 +++---- .../inferred/vectors/f32.wgsl.expected.glsl | 2 +- .../inferred/vectors/f32.wgsl.expected.hlsl | 2 +- .../inferred/vectors/f32.wgsl.expected.msl | 2 -- .../inferred/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/vectors/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/mat4x2/zero/f32.wgsl | 2 +- .../mat4x2/zero/f32.wgsl.expected.glsl | 2 +- .../mat4x2/zero/f32.wgsl.expected.hlsl | 2 +- .../mat4x2/zero/f32.wgsl.expected.msl | 2 -- .../mat4x2/zero/f32.wgsl.expected.spvasm | 12 ++++++----- .../mat4x2/zero/f32.wgsl.expected.wgsl | 2 +- .../mat4x3/explicit/identity/f32.wgsl | 8 +++---- .../explicit/identity/f32.wgsl.expected.glsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.hlsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../explicit/identity/f32.wgsl.expected.wgsl | 2 +- .../mat4x3/explicit/scalars/f32.wgsl | 8 +++---- .../explicit/scalars/f32.wgsl.expected.glsl | 2 +- .../explicit/scalars/f32.wgsl.expected.hlsl | 2 +- .../explicit/scalars/f32.wgsl.expected.msl | 2 -- .../explicit/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/scalars/f32.wgsl.expected.wgsl | 2 +- .../mat4x3/explicit/vectors/f32.wgsl | 8 +++---- .../explicit/vectors/f32.wgsl.expected.glsl | 2 +- .../explicit/vectors/f32.wgsl.expected.hlsl | 2 +- .../explicit/vectors/f32.wgsl.expected.msl | 2 -- .../explicit/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/vectors/f32.wgsl.expected.wgsl | 2 +- .../mat4x3/inferred/identity/f32.wgsl | 8 +++---- .../inferred/identity/f32.wgsl.expected.glsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.hlsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../inferred/identity/f32.wgsl.expected.wgsl | 2 +- .../inferred/scalars/abstract-float.wgsl | 8 +++---- .../scalars/abstract-float.wgsl.expected.glsl | 2 +- .../scalars/abstract-float.wgsl.expected.hlsl | 2 +- .../scalars/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../scalars/abstract-float.wgsl.expected.wgsl | 2 +- .../mat4x3/inferred/scalars/f32.wgsl | 8 +++---- .../inferred/scalars/f32.wgsl.expected.glsl | 2 +- .../inferred/scalars/f32.wgsl.expected.hlsl | 2 +- .../inferred/scalars/f32.wgsl.expected.msl | 2 -- .../inferred/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/scalars/f32.wgsl.expected.wgsl | 2 +- .../inferred/vectors/abstract-float.wgsl | 8 +++---- .../vectors/abstract-float.wgsl.expected.glsl | 2 +- .../vectors/abstract-float.wgsl.expected.hlsl | 2 +- .../vectors/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../vectors/abstract-float.wgsl.expected.wgsl | 2 +- .../mat4x3/inferred/vectors/f32.wgsl | 8 +++---- .../inferred/vectors/f32.wgsl.expected.glsl | 2 +- .../inferred/vectors/f32.wgsl.expected.hlsl | 2 +- .../inferred/vectors/f32.wgsl.expected.msl | 2 -- .../inferred/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/vectors/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/mat4x3/zero/f32.wgsl | 2 +- .../mat4x3/zero/f32.wgsl.expected.glsl | 2 +- .../mat4x3/zero/f32.wgsl.expected.hlsl | 2 +- .../mat4x3/zero/f32.wgsl.expected.msl | 2 -- .../mat4x3/zero/f32.wgsl.expected.spvasm | 12 ++++++----- .../mat4x3/zero/f32.wgsl.expected.wgsl | 2 +- .../mat4x4/explicit/identity/f32.wgsl | 8 +++---- .../explicit/identity/f32.wgsl.expected.glsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.hlsl | 4 ++-- .../explicit/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../explicit/identity/f32.wgsl.expected.wgsl | 2 +- .../mat4x4/explicit/scalars/f32.wgsl | 8 +++---- .../explicit/scalars/f32.wgsl.expected.glsl | 2 +- .../explicit/scalars/f32.wgsl.expected.hlsl | 2 +- .../explicit/scalars/f32.wgsl.expected.msl | 2 -- .../explicit/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/scalars/f32.wgsl.expected.wgsl | 2 +- .../mat4x4/explicit/vectors/f32.wgsl | 8 +++---- .../explicit/vectors/f32.wgsl.expected.glsl | 2 +- .../explicit/vectors/f32.wgsl.expected.hlsl | 2 +- .../explicit/vectors/f32.wgsl.expected.msl | 2 -- .../explicit/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../explicit/vectors/f32.wgsl.expected.wgsl | 2 +- .../mat4x4/inferred/identity/f32.wgsl | 8 +++---- .../inferred/identity/f32.wgsl.expected.glsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.hlsl | 4 ++-- .../inferred/identity/f32.wgsl.expected.msl | 5 ++--- .../identity/f32.wgsl.expected.spvasm | 21 +++++++++++-------- .../inferred/identity/f32.wgsl.expected.wgsl | 2 +- .../inferred/scalars/abstract-float.wgsl | 8 +++---- .../scalars/abstract-float.wgsl.expected.glsl | 2 +- .../scalars/abstract-float.wgsl.expected.hlsl | 2 +- .../scalars/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../scalars/abstract-float.wgsl.expected.wgsl | 2 +- .../mat4x4/inferred/scalars/f32.wgsl | 8 +++---- .../inferred/scalars/f32.wgsl.expected.glsl | 2 +- .../inferred/scalars/f32.wgsl.expected.hlsl | 2 +- .../inferred/scalars/f32.wgsl.expected.msl | 2 -- .../inferred/scalars/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/scalars/f32.wgsl.expected.wgsl | 2 +- .../inferred/vectors/abstract-float.wgsl | 8 +++---- .../vectors/abstract-float.wgsl.expected.glsl | 2 +- .../vectors/abstract-float.wgsl.expected.hlsl | 2 +- .../vectors/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../vectors/abstract-float.wgsl.expected.wgsl | 2 +- .../mat4x4/inferred/vectors/f32.wgsl | 8 +++---- .../inferred/vectors/f32.wgsl.expected.glsl | 2 +- .../inferred/vectors/f32.wgsl.expected.hlsl | 2 +- .../inferred/vectors/f32.wgsl.expected.msl | 2 -- .../inferred/vectors/f32.wgsl.expected.spvasm | 12 ++++++----- .../inferred/vectors/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/mat4x4/zero/f32.wgsl | 2 +- .../mat4x4/zero/f32.wgsl.expected.glsl | 2 +- .../mat4x4/zero/f32.wgsl.expected.hlsl | 2 +- .../mat4x4/zero/f32.wgsl.expected.msl | 2 -- .../mat4x4/zero/f32.wgsl.expected.spvasm | 12 ++++++----- .../mat4x4/zero/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec2/explicit/bool.wgsl | 2 +- .../vec2/explicit/bool.wgsl.expected.glsl | 2 +- .../vec2/explicit/bool.wgsl.expected.hlsl | 2 +- .../vec2/explicit/bool.wgsl.expected.msl | 2 -- .../vec2/explicit/bool.wgsl.expected.spvasm | 12 ++++++----- .../vec2/explicit/bool.wgsl.expected.wgsl | 2 +- .../type_ctor/vec2/explicit/f32.wgsl | 2 +- .../vec2/explicit/f32.wgsl.expected.glsl | 2 +- .../vec2/explicit/f32.wgsl.expected.hlsl | 2 +- .../vec2/explicit/f32.wgsl.expected.msl | 2 -- .../vec2/explicit/f32.wgsl.expected.spvasm | 12 ++++++----- .../vec2/explicit/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec2/explicit/i32.wgsl | 2 +- .../vec2/explicit/i32.wgsl.expected.glsl | 2 +- .../vec2/explicit/i32.wgsl.expected.hlsl | 2 +- .../vec2/explicit/i32.wgsl.expected.msl | 2 -- .../vec2/explicit/i32.wgsl.expected.spvasm | 12 ++++++----- .../vec2/explicit/i32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec2/explicit/u32.wgsl | 2 +- .../vec2/explicit/u32.wgsl.expected.glsl | 2 +- .../vec2/explicit/u32.wgsl.expected.hlsl | 2 +- .../vec2/explicit/u32.wgsl.expected.msl | 2 -- .../vec2/explicit/u32.wgsl.expected.spvasm | 12 ++++++----- .../vec2/explicit/u32.wgsl.expected.wgsl | 2 +- .../vec2/inferred/abstract-float.wgsl | 2 +- .../abstract-float.wgsl.expected.glsl | 2 +- .../abstract-float.wgsl.expected.hlsl | 2 +- .../inferred/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../abstract-float.wgsl.expected.wgsl | 2 +- .../type_ctor/vec2/inferred/abstract-int.wgsl | 2 +- .../inferred/abstract-int.wgsl.expected.glsl | 2 +- .../inferred/abstract-int.wgsl.expected.hlsl | 2 +- .../inferred/abstract-int.wgsl.expected.msl | 2 -- .../abstract-int.wgsl.expected.spvasm | 12 ++++++----- .../inferred/abstract-int.wgsl.expected.wgsl | 2 +- .../type_ctor/vec2/inferred/bool.wgsl | 2 +- .../vec2/inferred/bool.wgsl.expected.glsl | 2 +- .../vec2/inferred/bool.wgsl.expected.hlsl | 2 +- .../vec2/inferred/bool.wgsl.expected.msl | 2 -- .../vec2/inferred/bool.wgsl.expected.spvasm | 12 ++++++----- .../vec2/inferred/bool.wgsl.expected.wgsl | 2 +- .../type_ctor/vec2/inferred/f32.wgsl | 2 +- .../vec2/inferred/f32.wgsl.expected.glsl | 2 +- .../vec2/inferred/f32.wgsl.expected.hlsl | 2 +- .../vec2/inferred/f32.wgsl.expected.msl | 2 -- .../vec2/inferred/f32.wgsl.expected.spvasm | 12 ++++++----- .../vec2/inferred/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec2/inferred/i32.wgsl | 2 +- .../vec2/inferred/i32.wgsl.expected.glsl | 2 +- .../vec2/inferred/i32.wgsl.expected.hlsl | 2 +- .../vec2/inferred/i32.wgsl.expected.msl | 2 -- .../vec2/inferred/i32.wgsl.expected.spvasm | 12 ++++++----- .../vec2/inferred/i32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec2/inferred/u32.wgsl | 2 +- .../vec2/inferred/u32.wgsl.expected.glsl | 2 +- .../vec2/inferred/u32.wgsl.expected.hlsl | 2 +- .../vec2/inferred/u32.wgsl.expected.msl | 2 -- .../vec2/inferred/u32.wgsl.expected.spvasm | 12 ++++++----- .../vec2/inferred/u32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec3/explicit/bool.wgsl | 2 +- .../vec3/explicit/bool.wgsl.expected.glsl | 2 +- .../vec3/explicit/bool.wgsl.expected.hlsl | 2 +- .../vec3/explicit/bool.wgsl.expected.msl | 2 -- .../vec3/explicit/bool.wgsl.expected.spvasm | 12 ++++++----- .../vec3/explicit/bool.wgsl.expected.wgsl | 2 +- .../type_ctor/vec3/explicit/f32.wgsl | 2 +- .../vec3/explicit/f32.wgsl.expected.glsl | 2 +- .../vec3/explicit/f32.wgsl.expected.hlsl | 2 +- .../vec3/explicit/f32.wgsl.expected.msl | 2 -- .../vec3/explicit/f32.wgsl.expected.spvasm | 12 ++++++----- .../vec3/explicit/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec3/explicit/i32.wgsl | 2 +- .../vec3/explicit/i32.wgsl.expected.glsl | 2 +- .../vec3/explicit/i32.wgsl.expected.hlsl | 2 +- .../vec3/explicit/i32.wgsl.expected.msl | 2 -- .../vec3/explicit/i32.wgsl.expected.spvasm | 12 ++++++----- .../vec3/explicit/i32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec3/explicit/u32.wgsl | 2 +- .../vec3/explicit/u32.wgsl.expected.glsl | 2 +- .../vec3/explicit/u32.wgsl.expected.hlsl | 2 +- .../vec3/explicit/u32.wgsl.expected.msl | 2 -- .../vec3/explicit/u32.wgsl.expected.spvasm | 12 ++++++----- .../vec3/explicit/u32.wgsl.expected.wgsl | 2 +- .../vec3/inferred/abstract-float.wgsl | 2 +- .../abstract-float.wgsl.expected.glsl | 2 +- .../abstract-float.wgsl.expected.hlsl | 2 +- .../inferred/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../abstract-float.wgsl.expected.wgsl | 2 +- .../type_ctor/vec3/inferred/abstract-int.wgsl | 2 +- .../inferred/abstract-int.wgsl.expected.glsl | 2 +- .../inferred/abstract-int.wgsl.expected.hlsl | 2 +- .../inferred/abstract-int.wgsl.expected.msl | 2 -- .../abstract-int.wgsl.expected.spvasm | 12 ++++++----- .../inferred/abstract-int.wgsl.expected.wgsl | 2 +- .../type_ctor/vec3/inferred/bool.wgsl | 2 +- .../vec3/inferred/bool.wgsl.expected.glsl | 2 +- .../vec3/inferred/bool.wgsl.expected.hlsl | 2 +- .../vec3/inferred/bool.wgsl.expected.msl | 2 -- .../vec3/inferred/bool.wgsl.expected.spvasm | 12 ++++++----- .../vec3/inferred/bool.wgsl.expected.wgsl | 2 +- .../type_ctor/vec3/inferred/f32.wgsl | 2 +- .../vec3/inferred/f32.wgsl.expected.glsl | 2 +- .../vec3/inferred/f32.wgsl.expected.hlsl | 2 +- .../vec3/inferred/f32.wgsl.expected.msl | 2 -- .../vec3/inferred/f32.wgsl.expected.spvasm | 12 ++++++----- .../vec3/inferred/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec3/inferred/i32.wgsl | 2 +- .../vec3/inferred/i32.wgsl.expected.glsl | 2 +- .../vec3/inferred/i32.wgsl.expected.hlsl | 2 +- .../vec3/inferred/i32.wgsl.expected.msl | 2 -- .../vec3/inferred/i32.wgsl.expected.spvasm | 12 ++++++----- .../vec3/inferred/i32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec3/inferred/u32.wgsl | 2 +- .../vec3/inferred/u32.wgsl.expected.glsl | 2 +- .../vec3/inferred/u32.wgsl.expected.hlsl | 2 +- .../vec3/inferred/u32.wgsl.expected.msl | 2 -- .../vec3/inferred/u32.wgsl.expected.spvasm | 12 ++++++----- .../vec3/inferred/u32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec4/explicit/bool.wgsl | 2 +- .../vec4/explicit/bool.wgsl.expected.glsl | 2 +- .../vec4/explicit/bool.wgsl.expected.hlsl | 2 +- .../vec4/explicit/bool.wgsl.expected.msl | 2 -- .../vec4/explicit/bool.wgsl.expected.spvasm | 12 ++++++----- .../vec4/explicit/bool.wgsl.expected.wgsl | 2 +- .../type_ctor/vec4/explicit/f32.wgsl | 2 +- .../vec4/explicit/f32.wgsl.expected.glsl | 2 +- .../vec4/explicit/f32.wgsl.expected.hlsl | 2 +- .../vec4/explicit/f32.wgsl.expected.msl | 2 -- .../vec4/explicit/f32.wgsl.expected.spvasm | 12 ++++++----- .../vec4/explicit/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec4/explicit/i32.wgsl | 2 +- .../vec4/explicit/i32.wgsl.expected.glsl | 2 +- .../vec4/explicit/i32.wgsl.expected.hlsl | 2 +- .../vec4/explicit/i32.wgsl.expected.msl | 2 -- .../vec4/explicit/i32.wgsl.expected.spvasm | 12 ++++++----- .../vec4/explicit/i32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec4/explicit/u32.wgsl | 2 +- .../vec4/explicit/u32.wgsl.expected.glsl | 2 +- .../vec4/explicit/u32.wgsl.expected.hlsl | 2 +- .../vec4/explicit/u32.wgsl.expected.msl | 2 -- .../vec4/explicit/u32.wgsl.expected.spvasm | 12 ++++++----- .../vec4/explicit/u32.wgsl.expected.wgsl | 2 +- .../vec4/inferred/abstract-float.wgsl | 2 +- .../abstract-float.wgsl.expected.glsl | 2 +- .../abstract-float.wgsl.expected.hlsl | 2 +- .../inferred/abstract-float.wgsl.expected.msl | 2 -- .../abstract-float.wgsl.expected.spvasm | 12 ++++++----- .../abstract-float.wgsl.expected.wgsl | 2 +- .../type_ctor/vec4/inferred/abstract-int.wgsl | 2 +- .../inferred/abstract-int.wgsl.expected.glsl | 2 +- .../inferred/abstract-int.wgsl.expected.hlsl | 2 +- .../inferred/abstract-int.wgsl.expected.msl | 2 -- .../abstract-int.wgsl.expected.spvasm | 12 ++++++----- .../inferred/abstract-int.wgsl.expected.wgsl | 2 +- .../type_ctor/vec4/inferred/bool.wgsl | 2 +- .../vec4/inferred/bool.wgsl.expected.glsl | 2 +- .../vec4/inferred/bool.wgsl.expected.hlsl | 2 +- .../vec4/inferred/bool.wgsl.expected.msl | 2 -- .../vec4/inferred/bool.wgsl.expected.spvasm | 12 ++++++----- .../vec4/inferred/bool.wgsl.expected.wgsl | 2 +- .../type_ctor/vec4/inferred/f32.wgsl | 2 +- .../vec4/inferred/f32.wgsl.expected.glsl | 2 +- .../vec4/inferred/f32.wgsl.expected.hlsl | 2 +- .../vec4/inferred/f32.wgsl.expected.msl | 2 -- .../vec4/inferred/f32.wgsl.expected.spvasm | 12 ++++++----- .../vec4/inferred/f32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec4/inferred/i32.wgsl | 2 +- .../vec4/inferred/i32.wgsl.expected.glsl | 2 +- .../vec4/inferred/i32.wgsl.expected.hlsl | 2 +- .../vec4/inferred/i32.wgsl.expected.msl | 2 -- .../vec4/inferred/i32.wgsl.expected.spvasm | 12 ++++++----- .../vec4/inferred/i32.wgsl.expected.wgsl | 2 +- .../type_ctor/vec4/inferred/u32.wgsl | 2 +- .../vec4/inferred/u32.wgsl.expected.glsl | 2 +- .../vec4/inferred/u32.wgsl.expected.hlsl | 2 +- .../vec4/inferred/u32.wgsl.expected.msl | 2 -- .../vec4/inferred/u32.wgsl.expected.spvasm | 12 ++++++----- .../vec4/inferred/u32.wgsl.expected.wgsl | 2 +- 666 files changed, 1527 insertions(+), 1491 deletions(-) diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl index 32493404e9..195dba5f26 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl @@ -1,5 +1,5 @@ -let m = mat2x2(mat2x2(0.0f, 1.0f, - 2.0f, 3.0f)); +var m = mat2x2(mat2x2(0.0f, 1.0f, + 2.0f, 3.0f)); fn f() -> mat2x2 { let m_1 = mat2x2(m); diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.glsl index 9f372602c4..f820bd4695 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); +mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); mat2 f() { - mat2 m_1 = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); + mat2 m_1 = mat2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.hlsl index 4e8ff0b1ec..738053f3f9 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); +static float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); float2x2 f() { - const float2x2 m_1 = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); + const float2x2 m_1 = float2x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.msl index c464132ffa..dcbe1b0e2f 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); - float2x2 f() { - float2x2 const m_1 = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); + thread float2x2 tint_symbol = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); + float2x2 const m_1 = float2x2(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.spvasm index b2cc1c486c..07b1ba1123 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 18 +; Bound: 22 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -19,15 +19,18 @@ %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 %9 = OpConstantComposite %v2float %float_2 %float_3 - %m = OpConstantComposite %mat2v2float %6 %9 + %10 = OpConstantComposite %mat2v2float %6 %9 +%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float + %m = OpVariable %_ptr_Private_mat2v2float Private %10 %void = OpTypeVoid - %11 = OpTypeFunction %void - %15 = OpTypeFunction %mat2v2float -%unused_entry_point = OpFunction %void None %11 - %14 = OpLabel + %13 = OpTypeFunction %void + %17 = OpTypeFunction %mat2v2float +%unused_entry_point = OpFunction %void None %13 + %16 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat2v2float None %15 - %17 = OpLabel - OpReturnValue %m + %f = OpFunction %mat2v2float None %17 + %19 = OpLabel + %21 = OpLoad %mat2v2float %m + OpReturnValue %21 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.wgsl index 27431a6c0a..5950793a1a 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat2x2(mat2x2(0.0f, 1.0f, 2.0f, 3.0f)); +var m = mat2x2(mat2x2(0.0f, 1.0f, 2.0f, 3.0f)); fn f() -> mat2x2 { let m_1 = mat2x2(m); diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl index d2f7f21133..8f8c2f9f03 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x2(0.0f, 1.0f, - 2.0f, 3.0f); +var m = mat2x2(0.0f, 1.0f, + 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.glsl index f2eeed59ea..cb3e1d20c9 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); +mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.hlsl index c2e0d31160..28c5d1f90e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); +static float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.msl index b62a321cb2..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.spvasm index 126308b017..c04960ae18 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 15 +; Bound: 17 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -18,10 +18,12 @@ %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 %9 = OpConstantComposite %v2float %float_2 %float_3 - %m = OpConstantComposite %mat2v2float %6 %9 + %10 = OpConstantComposite %mat2v2float %6 %9 +%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float + %m = OpVariable %_ptr_Private_mat2v2float Private %10 %void = OpTypeVoid - %11 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %11 - %14 = OpLabel + %13 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %13 + %16 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.wgsl index 39cec7918e..027ab224dd 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x2(0.0f, 1.0f, 2.0f, 3.0f); +var m = mat2x2(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl index 3841d4ef34..691281633b 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x2(vec2(0.0f, 1.0f), - vec2(2.0f, 3.0f)); +var m = mat2x2(vec2(0.0f, 1.0f), + vec2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.glsl index f2eeed59ea..cb3e1d20c9 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); +mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.hlsl index c2e0d31160..28c5d1f90e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); +static float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.msl index b62a321cb2..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.spvasm index 126308b017..c04960ae18 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 15 +; Bound: 17 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -18,10 +18,12 @@ %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 %9 = OpConstantComposite %v2float %float_2 %float_3 - %m = OpConstantComposite %mat2v2float %6 %9 + %10 = OpConstantComposite %mat2v2float %6 %9 +%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float + %m = OpVariable %_ptr_Private_mat2v2float Private %10 %void = OpTypeVoid - %11 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %11 - %14 = OpLabel + %13 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %13 + %16 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.wgsl index ff4e2760d8..b3b5d6e3fa 100644 --- a/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/explicit/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); +var m = mat2x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl index 3b4c5e2e8b..bd51d6bc40 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl @@ -1,5 +1,5 @@ -let m = mat2x2(mat2x2(0.0f, 1.0f, - 2.0f, 3.0f)); +var m = mat2x2(mat2x2(0.0f, 1.0f, + 2.0f, 3.0f)); fn f() -> mat2x2 { let m_1 = mat2x2(m); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.glsl index 9f372602c4..f820bd4695 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); +mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); mat2 f() { - mat2 m_1 = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); + mat2 m_1 = mat2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.hlsl index 4e8ff0b1ec..738053f3f9 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); +static float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); float2x2 f() { - const float2x2 m_1 = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); + const float2x2 m_1 = float2x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.msl index c464132ffa..dcbe1b0e2f 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); - float2x2 f() { - float2x2 const m_1 = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); + thread float2x2 tint_symbol = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); + float2x2 const m_1 = float2x2(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.spvasm index b2cc1c486c..07b1ba1123 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 18 +; Bound: 22 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -19,15 +19,18 @@ %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 %9 = OpConstantComposite %v2float %float_2 %float_3 - %m = OpConstantComposite %mat2v2float %6 %9 + %10 = OpConstantComposite %mat2v2float %6 %9 +%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float + %m = OpVariable %_ptr_Private_mat2v2float Private %10 %void = OpTypeVoid - %11 = OpTypeFunction %void - %15 = OpTypeFunction %mat2v2float -%unused_entry_point = OpFunction %void None %11 - %14 = OpLabel + %13 = OpTypeFunction %void + %17 = OpTypeFunction %mat2v2float +%unused_entry_point = OpFunction %void None %13 + %16 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat2v2float None %15 - %17 = OpLabel - OpReturnValue %m + %f = OpFunction %mat2v2float None %17 + %19 = OpLabel + %21 = OpLoad %mat2v2float %m + OpReturnValue %21 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.wgsl index cd44a0f01e..fb8399a4e9 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat2x2(mat2x2(0.0f, 1.0f, 2.0f, 3.0f)); +var m = mat2x2(mat2x2(0.0f, 1.0f, 2.0f, 3.0f)); fn f() -> mat2x2 { let m_1 = mat2x2(m); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl index 0195661eb0..99f7353021 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl @@ -1,2 +1,2 @@ -let m = mat2x2(0.0, 1.0, - 2.0, 3.0); +var m = mat2x2(0.0, 1.0, + 2.0, 3.0); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.glsl index f2eeed59ea..cb3e1d20c9 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); +mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.hlsl index c2e0d31160..28c5d1f90e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); +static float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.msl index b62a321cb2..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.spvasm index 126308b017..c04960ae18 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 15 +; Bound: 17 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -18,10 +18,12 @@ %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 %9 = OpConstantComposite %v2float %float_2 %float_3 - %m = OpConstantComposite %mat2v2float %6 %9 + %10 = OpConstantComposite %mat2v2float %6 %9 +%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float + %m = OpVariable %_ptr_Private_mat2v2float Private %10 %void = OpTypeVoid - %11 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %11 - %14 = OpLabel + %13 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %13 + %16 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.wgsl index e4941d5989..e1064e8dc8 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x2(0.0, 1.0, 2.0, 3.0); +var m = mat2x2(0.0, 1.0, 2.0, 3.0); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl index 802bd0beef..0fb8992f97 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x2(0.0f, 1.0f, - 2.0f, 3.0f); +var m = mat2x2(0.0f, 1.0f, + 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.glsl index f2eeed59ea..cb3e1d20c9 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); +mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.hlsl index c2e0d31160..28c5d1f90e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); +static float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.msl index b62a321cb2..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.spvasm index 126308b017..c04960ae18 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 15 +; Bound: 17 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -18,10 +18,12 @@ %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 %9 = OpConstantComposite %v2float %float_2 %float_3 - %m = OpConstantComposite %mat2v2float %6 %9 + %10 = OpConstantComposite %mat2v2float %6 %9 +%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float + %m = OpVariable %_ptr_Private_mat2v2float Private %10 %void = OpTypeVoid - %11 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %11 - %14 = OpLabel + %13 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %13 + %16 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.wgsl index 1078c57ce2..4a3c56d60e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x2(0.0f, 1.0f, 2.0f, 3.0f); +var m = mat2x2(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl index 0698377a39..8c1ad0ef94 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl @@ -1,2 +1,2 @@ -let m = mat2x2(vec2(0.0, 1.0), - vec2(2.0, 3.0)); +var m = mat2x2(vec2(0.0, 1.0), + vec2(2.0, 3.0)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.glsl index f2eeed59ea..cb3e1d20c9 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); +mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.hlsl index c2e0d31160..28c5d1f90e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); +static float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.msl index b62a321cb2..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.spvasm index 126308b017..c04960ae18 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 15 +; Bound: 17 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -18,10 +18,12 @@ %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 %9 = OpConstantComposite %v2float %float_2 %float_3 - %m = OpConstantComposite %mat2v2float %6 %9 + %10 = OpConstantComposite %mat2v2float %6 %9 +%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float + %m = OpVariable %_ptr_Private_mat2v2float Private %10 %void = OpTypeVoid - %11 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %11 - %14 = OpLabel + %13 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %13 + %16 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.wgsl index 873422d9c9..38d5333d4e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x2(vec2(0.0, 1.0), vec2(2.0, 3.0)); +var m = mat2x2(vec2(0.0, 1.0), vec2(2.0, 3.0)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl index f802821326..c592c6c7d4 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x2(vec2(0.0, 1.0), - vec2(2.0, 3.0)); +var m = mat2x2(vec2(0.0, 1.0), + vec2(2.0, 3.0)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.glsl index f2eeed59ea..cb3e1d20c9 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); +mat2 m = mat2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.hlsl index c2e0d31160..28c5d1f90e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); +static float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.msl index b62a321cb2..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x2 m = float2x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.spvasm index 126308b017..c04960ae18 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 15 +; Bound: 17 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -18,10 +18,12 @@ %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 %9 = OpConstantComposite %v2float %float_2 %float_3 - %m = OpConstantComposite %mat2v2float %6 %9 + %10 = OpConstantComposite %mat2v2float %6 %9 +%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float + %m = OpVariable %_ptr_Private_mat2v2float Private %10 %void = OpTypeVoid - %11 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %11 - %14 = OpLabel + %13 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %13 + %16 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.wgsl index 9a1f4c6dc8..48f4288f53 100644 --- a/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/inferred/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x2(vec2(0.0, 1.0), vec2(2.0, 3.0)); +var m = mat2x2(vec2(0.0, 1.0), vec2(2.0, 3.0)); diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl index 7d23bcf297..8f77ea2b6e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl @@ -1 +1 @@ -let m = mat2x2(); +var m = mat2x2(); diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.glsl index a496f95ee4..bd82c138e5 100644 --- a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2 m = mat2(vec2(0.0f), vec2(0.0f)); +mat2 m = mat2(vec2(0.0f), vec2(0.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.hlsl index a38b32bc1c..1140175688 100644 --- a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x2 m = float2x2((0.0f).xx, (0.0f).xx); +static float2x2 m = float2x2((0.0f).xx, (0.0f).xx); diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.msl index 9076107a14..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x2 m = float2x2(float2(0.0f), float2(0.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.spvasm index 849d656716..cd2602abb4 100644 --- a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 9 +; Bound: 11 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -12,10 +12,12 @@ %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 %mat2v2float = OpTypeMatrix %v2float 2 - %m = OpConstantNull %mat2v2float + %4 = OpConstantNull %mat2v2float +%_ptr_Private_mat2v2float = OpTypePointer Private %mat2v2float + %m = OpVariable %_ptr_Private_mat2v2float Private %4 %void = OpTypeVoid - %5 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %5 - %8 = OpLabel + %7 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %7 + %10 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.wgsl index 7d23bcf297..8f77ea2b6e 100644 --- a/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x2/zero/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x2(); +var m = mat2x2(); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl index dff89c8da0..2c63c91d2f 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl @@ -1,5 +1,5 @@ -let m = mat2x3(mat2x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f)); +var m = mat2x3(mat2x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f)); fn f() -> mat2x3 { let m_1 = mat2x3(m); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.glsl index 8b1bb8deba..03da8f60b0 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); mat2x3 f() { - mat2x3 m_1 = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); + mat2x3 m_1 = mat2x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.hlsl index 96f34728cb..4fee3744cd 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); +static float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); float2x3 f() { - const float2x3 m_1 = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); + const float2x3 m_1 = float2x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.msl index e0619e16e0..03b6fd7c8e 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); - float2x3 f() { - float2x3 const m_1 = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); + thread float2x3 tint_symbol = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); + float2x3 const m_1 = float2x3(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.spvasm index 075746aee7..8c235ee3b2 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 20 +; Bound: 24 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -21,15 +21,18 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %11 = OpConstantComposite %v3float %float_3 %float_4 %float_5 - %m = OpConstantComposite %mat2v3float %7 %11 + %12 = OpConstantComposite %mat2v3float %7 %11 +%_ptr_Private_mat2v3float = OpTypePointer Private %mat2v3float + %m = OpVariable %_ptr_Private_mat2v3float Private %12 %void = OpTypeVoid - %13 = OpTypeFunction %void - %17 = OpTypeFunction %mat2v3float -%unused_entry_point = OpFunction %void None %13 - %16 = OpLabel + %15 = OpTypeFunction %void + %19 = OpTypeFunction %mat2v3float +%unused_entry_point = OpFunction %void None %15 + %18 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat2v3float None %17 - %19 = OpLabel - OpReturnValue %m + %f = OpFunction %mat2v3float None %19 + %21 = OpLabel + %23 = OpLoad %mat2v3float %m + OpReturnValue %23 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.wgsl index 5c9282f1d2..e934f8332e 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat2x3(mat2x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f)); +var m = mat2x3(mat2x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f)); fn f() -> mat2x3 { let m_1 = mat2x3(m); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl index 4f73038e51..eb4e496b06 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f); +var m = mat2x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.glsl index 919400a470..275e22bc4b 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.hlsl index fb12d01088..c2d1be771d 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); +static float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.msl index 443c61f166..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.spvasm index c4ce1bdf32..578716d4c1 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 17 +; Bound: 19 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -20,10 +20,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %11 = OpConstantComposite %v3float %float_3 %float_4 %float_5 - %m = OpConstantComposite %mat2v3float %7 %11 + %12 = OpConstantComposite %mat2v3float %7 %11 +%_ptr_Private_mat2v3float = OpTypePointer Private %mat2v3float + %m = OpVariable %_ptr_Private_mat2v3float Private %12 %void = OpTypeVoid - %13 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %13 - %16 = OpLabel + %15 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %15 + %18 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.wgsl index 6de0a5f01c..a886d0995b 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f); +var m = mat2x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl index 736b493eeb..2439d6d752 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x3(vec3(0.0f, 1.0f, 2.0f), - vec3(3.0f, 4.0f, 5.0f)); +var m = mat2x3(vec3(0.0f, 1.0f, 2.0f), + vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.glsl index 919400a470..275e22bc4b 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.hlsl index fb12d01088..c2d1be771d 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); +static float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.msl index 443c61f166..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.spvasm index c4ce1bdf32..578716d4c1 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 17 +; Bound: 19 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -20,10 +20,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %11 = OpConstantComposite %v3float %float_3 %float_4 %float_5 - %m = OpConstantComposite %mat2v3float %7 %11 + %12 = OpConstantComposite %mat2v3float %7 %11 +%_ptr_Private_mat2v3float = OpTypePointer Private %mat2v3float + %m = OpVariable %_ptr_Private_mat2v3float Private %12 %void = OpTypeVoid - %13 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %13 - %16 = OpLabel + %15 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %15 + %18 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.wgsl index 6bfd68290e..79d55b3a82 100644 --- a/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/explicit/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +var m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl index 93c90e77e5..6babe00fcd 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl @@ -1,5 +1,5 @@ -let m = mat2x3(mat2x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f)); +var m = mat2x3(mat2x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f)); fn f() -> mat2x3 { let m_1 = mat2x3(m); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.glsl index 8b1bb8deba..03da8f60b0 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); mat2x3 f() { - mat2x3 m_1 = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); + mat2x3 m_1 = mat2x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.hlsl index 96f34728cb..4fee3744cd 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); +static float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); float2x3 f() { - const float2x3 m_1 = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); + const float2x3 m_1 = float2x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.msl index e0619e16e0..03b6fd7c8e 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); - float2x3 f() { - float2x3 const m_1 = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); + thread float2x3 tint_symbol = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); + float2x3 const m_1 = float2x3(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.spvasm index 075746aee7..8c235ee3b2 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 20 +; Bound: 24 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -21,15 +21,18 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %11 = OpConstantComposite %v3float %float_3 %float_4 %float_5 - %m = OpConstantComposite %mat2v3float %7 %11 + %12 = OpConstantComposite %mat2v3float %7 %11 +%_ptr_Private_mat2v3float = OpTypePointer Private %mat2v3float + %m = OpVariable %_ptr_Private_mat2v3float Private %12 %void = OpTypeVoid - %13 = OpTypeFunction %void - %17 = OpTypeFunction %mat2v3float -%unused_entry_point = OpFunction %void None %13 - %16 = OpLabel + %15 = OpTypeFunction %void + %19 = OpTypeFunction %mat2v3float +%unused_entry_point = OpFunction %void None %15 + %18 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat2v3float None %17 - %19 = OpLabel - OpReturnValue %m + %f = OpFunction %mat2v3float None %19 + %21 = OpLabel + %23 = OpLoad %mat2v3float %m + OpReturnValue %23 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.wgsl index f0a318279b..a6cf4e64c1 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat2x3(mat2x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f)); +var m = mat2x3(mat2x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f)); fn f() -> mat2x3 { let m_1 = mat2x3(m); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl index dc7f65ff3e..c13c5b1eb6 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl @@ -1,2 +1,2 @@ -let m = mat2x3(0.0, 1.0, 2.0, - 3.0, 4.0, 5.0); +var m = mat2x3(0.0, 1.0, 2.0, + 3.0, 4.0, 5.0); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.glsl index 919400a470..275e22bc4b 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.hlsl index fb12d01088..c2d1be771d 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); +static float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.msl index 443c61f166..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.spvasm index c4ce1bdf32..578716d4c1 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 17 +; Bound: 19 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -20,10 +20,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %11 = OpConstantComposite %v3float %float_3 %float_4 %float_5 - %m = OpConstantComposite %mat2v3float %7 %11 + %12 = OpConstantComposite %mat2v3float %7 %11 +%_ptr_Private_mat2v3float = OpTypePointer Private %mat2v3float + %m = OpVariable %_ptr_Private_mat2v3float Private %12 %void = OpTypeVoid - %13 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %13 - %16 = OpLabel + %15 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %15 + %18 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.wgsl index 0be516f032..2dae43bb79 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x3(0.0, 1.0, 2.0, 3.0, 4.0, 5.0); +var m = mat2x3(0.0, 1.0, 2.0, 3.0, 4.0, 5.0); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl index 7107d4ba15..79031cb85f 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f); +var m = mat2x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.glsl index 919400a470..275e22bc4b 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.hlsl index fb12d01088..c2d1be771d 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); +static float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.msl index 443c61f166..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.spvasm index c4ce1bdf32..578716d4c1 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 17 +; Bound: 19 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -20,10 +20,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %11 = OpConstantComposite %v3float %float_3 %float_4 %float_5 - %m = OpConstantComposite %mat2v3float %7 %11 + %12 = OpConstantComposite %mat2v3float %7 %11 +%_ptr_Private_mat2v3float = OpTypePointer Private %mat2v3float + %m = OpVariable %_ptr_Private_mat2v3float Private %12 %void = OpTypeVoid - %13 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %13 - %16 = OpLabel + %15 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %15 + %18 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.wgsl index c5a27d61aa..d183723816 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f); +var m = mat2x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl index 24f8a6c920..bb589a1c49 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl @@ -1,2 +1,2 @@ -let m = mat2x3(vec3(0.0, 1.0, 2.0), - vec3(3.0, 4.0, 5.0)); +var m = mat2x3(vec3(0.0, 1.0, 2.0), + vec3(3.0, 4.0, 5.0)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.glsl index 919400a470..275e22bc4b 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.hlsl index fb12d01088..c2d1be771d 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); +static float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.msl index 443c61f166..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.spvasm index c4ce1bdf32..578716d4c1 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 17 +; Bound: 19 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -20,10 +20,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %11 = OpConstantComposite %v3float %float_3 %float_4 %float_5 - %m = OpConstantComposite %mat2v3float %7 %11 + %12 = OpConstantComposite %mat2v3float %7 %11 +%_ptr_Private_mat2v3float = OpTypePointer Private %mat2v3float + %m = OpVariable %_ptr_Private_mat2v3float Private %12 %void = OpTypeVoid - %13 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %13 - %16 = OpLabel + %15 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %15 + %18 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.wgsl index a23b1e2739..b194c30246 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x3(vec3(0.0, 1.0, 2.0), vec3(3.0, 4.0, 5.0)); +var m = mat2x3(vec3(0.0, 1.0, 2.0), vec3(3.0, 4.0, 5.0)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl index 5b8ed92203..ab3d40304a 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x3(vec3(0.0f, 1.0f, 2.0f), - vec3(3.0f, 4.0f, 5.0f)); +var m = mat2x3(vec3(0.0f, 1.0f, 2.0f), + vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.glsl index 919400a470..275e22bc4b 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +mat2x3 m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.hlsl index fb12d01088..c2d1be771d 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); +static float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.msl index 443c61f166..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x3 m = float2x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.spvasm index c4ce1bdf32..578716d4c1 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 17 +; Bound: 19 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -20,10 +20,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %11 = OpConstantComposite %v3float %float_3 %float_4 %float_5 - %m = OpConstantComposite %mat2v3float %7 %11 + %12 = OpConstantComposite %mat2v3float %7 %11 +%_ptr_Private_mat2v3float = OpTypePointer Private %mat2v3float + %m = OpVariable %_ptr_Private_mat2v3float Private %12 %void = OpTypeVoid - %13 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %13 - %16 = OpLabel + %15 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %15 + %18 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.wgsl index bbc2d2af70..709c5a8969 100644 --- a/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/inferred/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); +var m = mat2x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl index 52d5139550..e9b1825c78 100644 --- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl @@ -1 +1 @@ -let m = mat2x3(); +var m = mat2x3(); diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.glsl index 147f758b00..6d2c8f5745 100644 --- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x3 m = mat2x3(vec3(0.0f), vec3(0.0f)); +mat2x3 m = mat2x3(vec3(0.0f), vec3(0.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.hlsl index c8959e9099..3fe1f11e7d 100644 --- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x3 m = float2x3((0.0f).xxx, (0.0f).xxx); +static float2x3 m = float2x3((0.0f).xxx, (0.0f).xxx); diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.msl index 05150a20f0..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x3 m = float2x3(float3(0.0f), float3(0.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.spvasm index c4d0912e80..ee697139bf 100644 --- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 9 +; Bound: 11 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -12,10 +12,12 @@ %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 %mat2v3float = OpTypeMatrix %v3float 2 - %m = OpConstantNull %mat2v3float + %4 = OpConstantNull %mat2v3float +%_ptr_Private_mat2v3float = OpTypePointer Private %mat2v3float + %m = OpVariable %_ptr_Private_mat2v3float Private %4 %void = OpTypeVoid - %5 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %5 - %8 = OpLabel + %7 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %7 + %10 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.wgsl index 52d5139550..e9b1825c78 100644 --- a/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x3/zero/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x3(); +var m = mat2x3(); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl index 3d3f9c2638..c8f8bc5549 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl @@ -1,5 +1,5 @@ -let m = mat2x4(mat2x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat2x4(mat2x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f)); fn f() -> mat2x4 { let m_1 = mat2x4(m); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.glsl index 4f30e2f696..06eabf0f26 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); mat2x4 f() { - mat2x4 m_1 = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); + mat2x4 m_1 = mat2x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.hlsl index 96e6b19a29..b37e3b77bf 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); +static float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); float2x4 f() { - const float2x4 m_1 = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); + const float2x4 m_1 = float2x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.msl index d3c4da980a..63b4e2a0d0 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); - float2x4 f() { - float2x4 const m_1 = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); + thread float2x4 tint_symbol = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); + float2x4 const m_1 = float2x4(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.spvasm index 7cab4d6208..6dbb4cea02 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 22 +; Bound: 26 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -23,15 +23,18 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %13 = OpConstantComposite %v4float %float_4 %float_5 %float_6 %float_7 - %m = OpConstantComposite %mat2v4float %8 %13 + %14 = OpConstantComposite %mat2v4float %8 %13 +%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float + %m = OpVariable %_ptr_Private_mat2v4float Private %14 %void = OpTypeVoid - %15 = OpTypeFunction %void - %19 = OpTypeFunction %mat2v4float -%unused_entry_point = OpFunction %void None %15 - %18 = OpLabel + %17 = OpTypeFunction %void + %21 = OpTypeFunction %mat2v4float +%unused_entry_point = OpFunction %void None %17 + %20 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat2v4float None %19 - %21 = OpLabel - OpReturnValue %m + %f = OpFunction %mat2v4float None %21 + %23 = OpLabel + %25 = OpLoad %mat2v4float %m + OpReturnValue %25 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.wgsl index f31ac212d9..476ed2cce0 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat2x4(mat2x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat2x4(mat2x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f)); fn f() -> mat2x4 { let m_1 = mat2x4(m); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl index 56d25f5f64..a65308ee5a 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f); +var m = mat2x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.glsl index 461bebd73a..15a453537c 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.hlsl index 5ed2b1bb39..7f63f53176 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); +static float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.msl index b309bde1e4..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.spvasm index 39a2a212bb..c97b583900 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 19 +; Bound: 21 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -22,10 +22,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %13 = OpConstantComposite %v4float %float_4 %float_5 %float_6 %float_7 - %m = OpConstantComposite %mat2v4float %8 %13 + %14 = OpConstantComposite %mat2v4float %8 %13 +%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float + %m = OpVariable %_ptr_Private_mat2v4float Private %14 %void = OpTypeVoid - %15 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %15 - %18 = OpLabel + %17 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %17 + %20 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.wgsl index f342196030..0eea600cec 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f); +var m = mat2x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl index 5465c36451..00a8d119a1 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), - vec4(4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), + vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.glsl index 461bebd73a..15a453537c 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.hlsl index 5ed2b1bb39..7f63f53176 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); +static float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.msl index b309bde1e4..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.spvasm index 39a2a212bb..c97b583900 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 19 +; Bound: 21 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -22,10 +22,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %13 = OpConstantComposite %v4float %float_4 %float_5 %float_6 %float_7 - %m = OpConstantComposite %mat2v4float %8 %13 + %14 = OpConstantComposite %mat2v4float %8 %13 +%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float + %m = OpVariable %_ptr_Private_mat2v4float Private %14 %void = OpTypeVoid - %15 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %15 - %18 = OpLabel + %17 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %17 + %20 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.wgsl index be987bb01b..760becb0d3 100644 --- a/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/explicit/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl index cc6f3fd343..345e097d4e 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl @@ -1,5 +1,5 @@ -let m = mat2x4(mat2x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat2x4(mat2x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f)); fn f() -> mat2x4 { let m_1 = mat2x4(m); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.glsl index 4f30e2f696..06eabf0f26 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); mat2x4 f() { - mat2x4 m_1 = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); + mat2x4 m_1 = mat2x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.hlsl index 96e6b19a29..b37e3b77bf 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); +static float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); float2x4 f() { - const float2x4 m_1 = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); + const float2x4 m_1 = float2x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.msl index d3c4da980a..63b4e2a0d0 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); - float2x4 f() { - float2x4 const m_1 = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); + thread float2x4 tint_symbol = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); + float2x4 const m_1 = float2x4(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.spvasm index 7cab4d6208..6dbb4cea02 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 22 +; Bound: 26 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -23,15 +23,18 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %13 = OpConstantComposite %v4float %float_4 %float_5 %float_6 %float_7 - %m = OpConstantComposite %mat2v4float %8 %13 + %14 = OpConstantComposite %mat2v4float %8 %13 +%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float + %m = OpVariable %_ptr_Private_mat2v4float Private %14 %void = OpTypeVoid - %15 = OpTypeFunction %void - %19 = OpTypeFunction %mat2v4float -%unused_entry_point = OpFunction %void None %15 - %18 = OpLabel + %17 = OpTypeFunction %void + %21 = OpTypeFunction %mat2v4float +%unused_entry_point = OpFunction %void None %17 + %20 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat2v4float None %19 - %21 = OpLabel - OpReturnValue %m + %f = OpFunction %mat2v4float None %21 + %23 = OpLabel + %25 = OpLoad %mat2v4float %m + OpReturnValue %25 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.wgsl index 644d882905..3e388e1afb 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat2x4(mat2x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat2x4(mat2x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f)); fn f() -> mat2x4 { let m_1 = mat2x4(m); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl index 81abe9f668..0fb3201d78 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl @@ -1,2 +1,2 @@ -let m = mat2x4(0.0, 1.0, 2.0, 3.0, - 4.0, 5.0, 6.0, 7.0); +var m = mat2x4(0.0, 1.0, 2.0, 3.0, + 4.0, 5.0, 6.0, 7.0); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.glsl index 461bebd73a..15a453537c 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.hlsl index 5ed2b1bb39..7f63f53176 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); +static float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.msl index b309bde1e4..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.spvasm index 39a2a212bb..c97b583900 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 19 +; Bound: 21 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -22,10 +22,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %13 = OpConstantComposite %v4float %float_4 %float_5 %float_6 %float_7 - %m = OpConstantComposite %mat2v4float %8 %13 + %14 = OpConstantComposite %mat2v4float %8 %13 +%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float + %m = OpVariable %_ptr_Private_mat2v4float Private %14 %void = OpTypeVoid - %15 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %15 - %18 = OpLabel + %17 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %17 + %20 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.wgsl index bcb4dfe908..7103b47df7 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x4(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0); +var m = mat2x4(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl index 394b079e70..ea9a9c4bbd 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f); +var m = mat2x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.glsl index 461bebd73a..15a453537c 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.hlsl index 5ed2b1bb39..7f63f53176 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); +static float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.msl index b309bde1e4..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.spvasm index 39a2a212bb..c97b583900 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 19 +; Bound: 21 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -22,10 +22,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %13 = OpConstantComposite %v4float %float_4 %float_5 %float_6 %float_7 - %m = OpConstantComposite %mat2v4float %8 %13 + %14 = OpConstantComposite %mat2v4float %8 %13 +%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float + %m = OpVariable %_ptr_Private_mat2v4float Private %14 %void = OpTypeVoid - %15 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %15 - %18 = OpLabel + %17 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %17 + %20 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.wgsl index dc53810d1c..7e04fcf835 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f); +var m = mat2x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl index e391fbe021..db96125a40 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl @@ -1,2 +1,2 @@ -let m = mat2x4(vec4(0.0, 1.0, 2.0, 3.0), - vec4(4.0, 5.0, 6.0, 7.0)); +var m = mat2x4(vec4(0.0, 1.0, 2.0, 3.0), + vec4(4.0, 5.0, 6.0, 7.0)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.glsl index 461bebd73a..15a453537c 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.hlsl index 5ed2b1bb39..7f63f53176 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); +static float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.msl index b309bde1e4..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.spvasm index 39a2a212bb..c97b583900 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 19 +; Bound: 21 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -22,10 +22,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %13 = OpConstantComposite %v4float %float_4 %float_5 %float_6 %float_7 - %m = OpConstantComposite %mat2v4float %8 %13 + %14 = OpConstantComposite %mat2v4float %8 %13 +%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float + %m = OpVariable %_ptr_Private_mat2v4float Private %14 %void = OpTypeVoid - %15 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %15 - %18 = OpLabel + %17 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %17 + %20 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.wgsl index 80bb8ca202..7f64fdb575 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x4(vec4(0.0, 1.0, 2.0, 3.0), vec4(4.0, 5.0, 6.0, 7.0)); +var m = mat2x4(vec4(0.0, 1.0, 2.0, 3.0), vec4(4.0, 5.0, 6.0, 7.0)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl index 4a9db50269..946f9ad8ac 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl @@ -1,2 +1,2 @@ -let m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), - vec4(4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), + vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.glsl index 461bebd73a..15a453537c 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +mat2x4 m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.hlsl index 5ed2b1bb39..7f63f53176 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); +static float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.msl index b309bde1e4..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x4 m = float2x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.spvasm index 39a2a212bb..c97b583900 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 19 +; Bound: 21 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -22,10 +22,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %13 = OpConstantComposite %v4float %float_4 %float_5 %float_6 %float_7 - %m = OpConstantComposite %mat2v4float %8 %13 + %14 = OpConstantComposite %mat2v4float %8 %13 +%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float + %m = OpVariable %_ptr_Private_mat2v4float Private %14 %void = OpTypeVoid - %15 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %15 - %18 = OpLabel + %17 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %17 + %20 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.wgsl index 99f104bbd7..5e4e09ad8f 100644 --- a/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/inferred/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat2x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl index 6748d70b2a..f9c67c829a 100644 --- a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl @@ -1 +1 @@ -let m = mat2x4(); +var m = mat2x4(); diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.glsl index 09ae675872..addaec52d1 100644 --- a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat2x4 m = mat2x4(vec4(0.0f), vec4(0.0f)); +mat2x4 m = mat2x4(vec4(0.0f), vec4(0.0f)); diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.hlsl index 2879c880a9..aaeb1e05f7 100644 --- a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2x4 m = float2x4((0.0f).xxxx, (0.0f).xxxx); +static float2x4 m = float2x4((0.0f).xxxx, (0.0f).xxxx); diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.msl index 035e80e900..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2x4 m = float2x4(float4(0.0f), float4(0.0f)); - diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.spvasm index b4edef253e..edf312f14f 100644 --- a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 9 +; Bound: 11 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -12,10 +12,12 @@ %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 %mat2v4float = OpTypeMatrix %v4float 2 - %m = OpConstantNull %mat2v4float + %4 = OpConstantNull %mat2v4float +%_ptr_Private_mat2v4float = OpTypePointer Private %mat2v4float + %m = OpVariable %_ptr_Private_mat2v4float Private %4 %void = OpTypeVoid - %5 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %5 - %8 = OpLabel + %7 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %7 + %10 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.wgsl index 6748d70b2a..f9c67c829a 100644 --- a/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat2x4/zero/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat2x4(); +var m = mat2x4(); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl index 7a14231092..53bc3aa633 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl @@ -1,6 +1,6 @@ -let m = mat3x2(mat3x2(0.0f, 1.0f, - 2.0f, 3.0f, - 4.0f, 5.0f)); +var m = mat3x2(mat3x2(0.0f, 1.0f, + 2.0f, 3.0f, + 4.0f, 5.0f)); fn f() -> mat3x2 { let m_1 = mat3x2(m); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.glsl index e06777447d..076d42483d 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); mat3x2 f() { - mat3x2 m_1 = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); + mat3x2 m_1 = mat3x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.hlsl index 5897ac6818..6a51b6633e 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); +static float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); float3x2 f() { - const float3x2 m_1 = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); + const float3x2 m_1 = float3x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.msl index 43ec39631b..41fb71ebba 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); - float3x2 f() { - float3x2 const m_1 = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); + thread float3x2 tint_symbol = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); + float3x2 const m_1 = float3x2(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.spvasm index 95ffb2b982..2c46731f20 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 25 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -22,15 +22,18 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %12 = OpConstantComposite %v2float %float_4 %float_5 - %m = OpConstantComposite %mat3v2float %6 %9 %12 + %13 = OpConstantComposite %mat3v2float %6 %9 %12 +%_ptr_Private_mat3v2float = OpTypePointer Private %mat3v2float + %m = OpVariable %_ptr_Private_mat3v2float Private %13 %void = OpTypeVoid - %14 = OpTypeFunction %void - %18 = OpTypeFunction %mat3v2float -%unused_entry_point = OpFunction %void None %14 - %17 = OpLabel + %16 = OpTypeFunction %void + %20 = OpTypeFunction %mat3v2float +%unused_entry_point = OpFunction %void None %16 + %19 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat3v2float None %18 - %20 = OpLabel - OpReturnValue %m + %f = OpFunction %mat3v2float None %20 + %22 = OpLabel + %24 = OpLoad %mat3v2float %m + OpReturnValue %24 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.wgsl index 06f3edff2e..1be72c65ec 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat3x2(mat3x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f)); +var m = mat3x2(mat3x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f)); fn f() -> mat3x2 { let m_1 = mat3x2(m); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl index b6fb489c88..e724832eed 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x2(0.0f, 1.0f, - 2.0f, 3.0f, - 4.0f, 5.0f); +var m = mat3x2(0.0f, 1.0f, + 2.0f, 3.0f, + 4.0f, 5.0f); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.glsl index 1447967e95..3df809bb93 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.hlsl index 27568edf53..3c86bed2b6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); +static float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.msl index ae7f33c2da..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.spvasm index ba1666141f..cfc645fbcc 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 18 +; Bound: 20 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -21,10 +21,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %12 = OpConstantComposite %v2float %float_4 %float_5 - %m = OpConstantComposite %mat3v2float %6 %9 %12 + %13 = OpConstantComposite %mat3v2float %6 %9 %12 +%_ptr_Private_mat3v2float = OpTypePointer Private %mat3v2float + %m = OpVariable %_ptr_Private_mat3v2float Private %13 %void = OpTypeVoid - %14 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %14 - %17 = OpLabel + %16 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %16 + %19 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.wgsl index c1034f7f91..14bc7c9ce3 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f); +var m = mat3x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl index 6d080cbd8b..9abe9948d9 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x2(vec2(0.0f, 1.0f), - vec2(2.0f, 3.0f), - vec2(4.0f, 5.0f)); +var m = mat3x2(vec2(0.0f, 1.0f), + vec2(2.0f, 3.0f), + vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.glsl index 1447967e95..3df809bb93 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.hlsl index 27568edf53..3c86bed2b6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); +static float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.msl index ae7f33c2da..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.spvasm index ba1666141f..cfc645fbcc 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 18 +; Bound: 20 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -21,10 +21,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %12 = OpConstantComposite %v2float %float_4 %float_5 - %m = OpConstantComposite %mat3v2float %6 %9 %12 + %13 = OpConstantComposite %mat3v2float %6 %9 %12 +%_ptr_Private_mat3v2float = OpTypePointer Private %mat3v2float + %m = OpVariable %_ptr_Private_mat3v2float Private %13 %void = OpTypeVoid - %14 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %14 - %17 = OpLabel + %16 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %16 + %19 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.wgsl index 5ba17fb363..6e2dea94b5 100644 --- a/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/explicit/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +var m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl index d77e83b595..73d3fd1f5b 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl @@ -1,6 +1,6 @@ -let m = mat3x2(mat3x2(0.0f, 1.0f, - 2.0f, 3.0f, - 4.0f, 5.0f)); +var m = mat3x2(mat3x2(0.0f, 1.0f, + 2.0f, 3.0f, + 4.0f, 5.0f)); fn f() -> mat3x2 { let m_1 = mat3x2(m); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.glsl index e06777447d..076d42483d 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); mat3x2 f() { - mat3x2 m_1 = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); + mat3x2 m_1 = mat3x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.hlsl index 5897ac6818..6a51b6633e 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); +static float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); float3x2 f() { - const float3x2 m_1 = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); + const float3x2 m_1 = float3x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.msl index 43ec39631b..41fb71ebba 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); - float3x2 f() { - float3x2 const m_1 = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); + thread float3x2 tint_symbol = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); + float3x2 const m_1 = float3x2(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.spvasm index 95ffb2b982..2c46731f20 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 25 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -22,15 +22,18 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %12 = OpConstantComposite %v2float %float_4 %float_5 - %m = OpConstantComposite %mat3v2float %6 %9 %12 + %13 = OpConstantComposite %mat3v2float %6 %9 %12 +%_ptr_Private_mat3v2float = OpTypePointer Private %mat3v2float + %m = OpVariable %_ptr_Private_mat3v2float Private %13 %void = OpTypeVoid - %14 = OpTypeFunction %void - %18 = OpTypeFunction %mat3v2float -%unused_entry_point = OpFunction %void None %14 - %17 = OpLabel + %16 = OpTypeFunction %void + %20 = OpTypeFunction %mat3v2float +%unused_entry_point = OpFunction %void None %16 + %19 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat3v2float None %18 - %20 = OpLabel - OpReturnValue %m + %f = OpFunction %mat3v2float None %20 + %22 = OpLabel + %24 = OpLoad %mat3v2float %m + OpReturnValue %24 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.wgsl index e16eab4c29..bc65cbb191 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat3x2(mat3x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f)); +var m = mat3x2(mat3x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f)); fn f() -> mat3x2 { let m_1 = mat3x2(m); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl index 6fbe3b8504..9507f0e196 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl @@ -1,3 +1,3 @@ -let m = mat3x2(0.0, 1.0, - 2.0, 3.0, - 4.0, 5.0); +var m = mat3x2(0.0, 1.0, + 2.0, 3.0, + 4.0, 5.0); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.glsl index 1447967e95..3df809bb93 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.hlsl index 27568edf53..3c86bed2b6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); +static float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.msl index ae7f33c2da..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.spvasm index ba1666141f..cfc645fbcc 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 18 +; Bound: 20 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -21,10 +21,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %12 = OpConstantComposite %v2float %float_4 %float_5 - %m = OpConstantComposite %mat3v2float %6 %9 %12 + %13 = OpConstantComposite %mat3v2float %6 %9 %12 +%_ptr_Private_mat3v2float = OpTypePointer Private %mat3v2float + %m = OpVariable %_ptr_Private_mat3v2float Private %13 %void = OpTypeVoid - %14 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %14 - %17 = OpLabel + %16 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %16 + %19 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.wgsl index 4d48f5936f..28d39157bb 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x2(0.0, 1.0, 2.0, 3.0, 4.0, 5.0); +var m = mat3x2(0.0, 1.0, 2.0, 3.0, 4.0, 5.0); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl index f64977f15c..e5f9de67f3 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x2(0.0f, 1.0f, - 2.0f, 3.0f, - 4.0f, 5.0f); +var m = mat3x2(0.0f, 1.0f, + 2.0f, 3.0f, + 4.0f, 5.0f); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.glsl index 1447967e95..3df809bb93 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.hlsl index 27568edf53..3c86bed2b6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); +static float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.msl index ae7f33c2da..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.spvasm index ba1666141f..cfc645fbcc 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 18 +; Bound: 20 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -21,10 +21,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %12 = OpConstantComposite %v2float %float_4 %float_5 - %m = OpConstantComposite %mat3v2float %6 %9 %12 + %13 = OpConstantComposite %mat3v2float %6 %9 %12 +%_ptr_Private_mat3v2float = OpTypePointer Private %mat3v2float + %m = OpVariable %_ptr_Private_mat3v2float Private %13 %void = OpTypeVoid - %14 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %14 - %17 = OpLabel + %16 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %16 + %19 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.wgsl index f418892fd7..045b91db45 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f); +var m = mat3x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl index 990b243a42..bb7736253a 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl @@ -1,3 +1,3 @@ -let m = mat3x2(vec2(0.0, 1.0), - vec2(2.0, 3.0), - vec2(4.0, 5.0)); +var m = mat3x2(vec2(0.0, 1.0), + vec2(2.0, 3.0), + vec2(4.0, 5.0)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.glsl index 1447967e95..3df809bb93 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.hlsl index 27568edf53..3c86bed2b6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); +static float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.msl index ae7f33c2da..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.spvasm index ba1666141f..cfc645fbcc 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 18 +; Bound: 20 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -21,10 +21,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %12 = OpConstantComposite %v2float %float_4 %float_5 - %m = OpConstantComposite %mat3v2float %6 %9 %12 + %13 = OpConstantComposite %mat3v2float %6 %9 %12 +%_ptr_Private_mat3v2float = OpTypePointer Private %mat3v2float + %m = OpVariable %_ptr_Private_mat3v2float Private %13 %void = OpTypeVoid - %14 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %14 - %17 = OpLabel + %16 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %16 + %19 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.wgsl index b8ff25a09a..4cb423621b 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x2(vec2(0.0, 1.0), vec2(2.0, 3.0), vec2(4.0, 5.0)); +var m = mat3x2(vec2(0.0, 1.0), vec2(2.0, 3.0), vec2(4.0, 5.0)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl index 287ee1b932..029a9b0252 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x2(vec2(0.0f, 1.0f), - vec2(2.0f, 3.0f), - vec2(4.0f, 5.0f)); +var m = mat3x2(vec2(0.0f, 1.0f), + vec2(2.0f, 3.0f), + vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.glsl index 1447967e95..3df809bb93 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +mat3x2 m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.hlsl index 27568edf53..3c86bed2b6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); +static float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.msl index ae7f33c2da..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x2 m = float3x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.spvasm index ba1666141f..cfc645fbcc 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 18 +; Bound: 20 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -21,10 +21,12 @@ %float_4 = OpConstant %float 4 %float_5 = OpConstant %float 5 %12 = OpConstantComposite %v2float %float_4 %float_5 - %m = OpConstantComposite %mat3v2float %6 %9 %12 + %13 = OpConstantComposite %mat3v2float %6 %9 %12 +%_ptr_Private_mat3v2float = OpTypePointer Private %mat3v2float + %m = OpVariable %_ptr_Private_mat3v2float Private %13 %void = OpTypeVoid - %14 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %14 - %17 = OpLabel + %16 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %16 + %19 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.wgsl index 913dd6bb47..d813053a0e 100644 --- a/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/inferred/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); +var m = mat3x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl index 559c1805ba..817cb6cf92 100644 --- a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl @@ -1 +1 @@ -let m = mat3x2(); +var m = mat3x2(); diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.glsl index 9ecf735770..809c79a3f2 100644 --- a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x2 m = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)); +mat3x2 m = mat3x2(vec2(0.0f), vec2(0.0f), vec2(0.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.hlsl index a4755f3755..b279d96690 100644 --- a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x2 m = float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx); +static float3x2 m = float3x2((0.0f).xx, (0.0f).xx, (0.0f).xx); diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.msl index 1dc48eba2d..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x2 m = float3x2(float2(0.0f), float2(0.0f), float2(0.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.spvasm index 30f1d27ace..e4bc4d5a81 100644 --- a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 9 +; Bound: 11 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -12,10 +12,12 @@ %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 %mat3v2float = OpTypeMatrix %v2float 3 - %m = OpConstantNull %mat3v2float + %4 = OpConstantNull %mat3v2float +%_ptr_Private_mat3v2float = OpTypePointer Private %mat3v2float + %m = OpVariable %_ptr_Private_mat3v2float Private %4 %void = OpTypeVoid - %5 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %5 - %8 = OpLabel + %7 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %7 + %10 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.wgsl index 559c1805ba..817cb6cf92 100644 --- a/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x2/zero/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x2(); +var m = mat3x2(); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl index 9f5749950d..f3b62f5c56 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl @@ -1,6 +1,6 @@ -let m = mat3x3(mat3x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f, - 6.0f, 7.0f, 8.0f)); +var m = mat3x3(mat3x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f, + 6.0f, 7.0f, 8.0f)); fn f() -> mat3x3 { let m_1 = mat3x3(m); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.glsl index e3e750e283..6bb27b8702 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); mat3 f() { - mat3 m_1 = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); + mat3 m_1 = mat3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.hlsl index 1795dfb44d..2d4c4b28c8 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); +static float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); float3x3 f() { - const float3x3 m_1 = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); + const float3x3 m_1 = float3x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.msl index f6a7b59bc1..d19a026f19 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); - float3x3 f() { - float3x3 const m_1 = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); + thread float3x3 tint_symbol = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); + float3x3 const m_1 = float3x3(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.spvasm index d213c9996f..4fe3bbd59d 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 28 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -25,15 +25,18 @@ %float_7 = OpConstant %float 7 %float_8 = OpConstant %float 8 %15 = OpConstantComposite %v3float %float_6 %float_7 %float_8 - %m = OpConstantComposite %mat3v3float %7 %11 %15 + %16 = OpConstantComposite %mat3v3float %7 %11 %15 +%_ptr_Private_mat3v3float = OpTypePointer Private %mat3v3float + %m = OpVariable %_ptr_Private_mat3v3float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void - %21 = OpTypeFunction %mat3v3float -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void + %23 = OpTypeFunction %mat3v3float +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat3v3float None %21 - %23 = OpLabel - OpReturnValue %m + %f = OpFunction %mat3v3float None %23 + %25 = OpLabel + %27 = OpLoad %mat3v3float %m + OpReturnValue %27 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.wgsl index 4ed58da214..028783d3b4 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat3x3(mat3x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f)); +var m = mat3x3(mat3x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f)); fn f() -> mat3x3 { let m_1 = mat3x3(m); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl index 33d7b14418..1d80d6947e 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f, - 6.0f, 7.0f, 8.0f); +var m = mat3x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f, + 6.0f, 7.0f, 8.0f); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.glsl index f4631cb30a..31b0b4ab12 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.hlsl index c35ca2af2e..65b0c98407 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); +static float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.msl index 2635df5e2e..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.spvasm index 16290c031d..c0f68aa95a 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_7 = OpConstant %float 7 %float_8 = OpConstant %float 8 %15 = OpConstantComposite %v3float %float_6 %float_7 %float_8 - %m = OpConstantComposite %mat3v3float %7 %11 %15 + %16 = OpConstantComposite %mat3v3float %7 %11 %15 +%_ptr_Private_mat3v3float = OpTypePointer Private %mat3v3float + %m = OpVariable %_ptr_Private_mat3v3float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.wgsl index 033c8f659b..d1ef960e80 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f); +var m = mat3x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl index cb6ac10f06..8a1972e201 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x3(vec3(0.0f, 1.0f, 2.0f), - vec3(3.0f, 4.0f, 5.0f), - vec3(6.0f, 7.0f, 8.0f)); +var m = mat3x3(vec3(0.0f, 1.0f, 2.0f), + vec3(3.0f, 4.0f, 5.0f), + vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.glsl index f4631cb30a..31b0b4ab12 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.hlsl index c35ca2af2e..65b0c98407 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); +static float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.msl index 2635df5e2e..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.spvasm index 16290c031d..c0f68aa95a 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_7 = OpConstant %float 7 %float_8 = OpConstant %float 8 %15 = OpConstantComposite %v3float %float_6 %float_7 %float_8 - %m = OpConstantComposite %mat3v3float %7 %11 %15 + %16 = OpConstantComposite %mat3v3float %7 %11 %15 +%_ptr_Private_mat3v3float = OpTypePointer Private %mat3v3float + %m = OpVariable %_ptr_Private_mat3v3float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.wgsl index 9ac30b5b1c..914a6a7e76 100644 --- a/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/explicit/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +var m = mat3x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl index d1792d192a..b06cadc493 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl @@ -1,6 +1,6 @@ -let m = mat3x3(mat3x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f, - 6.0f, 7.0f, 8.0f)); +var m = mat3x3(mat3x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f, + 6.0f, 7.0f, 8.0f)); fn f() -> mat3x3 { let m_1 = mat3x3(m); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.glsl index e3e750e283..6bb27b8702 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); mat3 f() { - mat3 m_1 = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); + mat3 m_1 = mat3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.hlsl index 1795dfb44d..2d4c4b28c8 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); +static float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); float3x3 f() { - const float3x3 m_1 = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); + const float3x3 m_1 = float3x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.msl index f6a7b59bc1..d19a026f19 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); - float3x3 f() { - float3x3 const m_1 = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); + thread float3x3 tint_symbol = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); + float3x3 const m_1 = float3x3(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.spvasm index d213c9996f..4fe3bbd59d 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 28 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -25,15 +25,18 @@ %float_7 = OpConstant %float 7 %float_8 = OpConstant %float 8 %15 = OpConstantComposite %v3float %float_6 %float_7 %float_8 - %m = OpConstantComposite %mat3v3float %7 %11 %15 + %16 = OpConstantComposite %mat3v3float %7 %11 %15 +%_ptr_Private_mat3v3float = OpTypePointer Private %mat3v3float + %m = OpVariable %_ptr_Private_mat3v3float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void - %21 = OpTypeFunction %mat3v3float -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void + %23 = OpTypeFunction %mat3v3float +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat3v3float None %21 - %23 = OpLabel - OpReturnValue %m + %f = OpFunction %mat3v3float None %23 + %25 = OpLabel + %27 = OpLoad %mat3v3float %m + OpReturnValue %27 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.wgsl index 6bf1918154..03f3cd0934 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat3x3(mat3x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f)); +var m = mat3x3(mat3x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f)); fn f() -> mat3x3 { let m_1 = mat3x3(m); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl index ecdafe7191..cfb9789423 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl @@ -1,3 +1,3 @@ -let m = mat3x3(0.0, 1.0, 2.0, - 3.0, 4.0, 5.0, - 6.0, 7.0, 8.0); +var m = mat3x3(0.0, 1.0, 2.0, + 3.0, 4.0, 5.0, + 6.0, 7.0, 8.0); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.glsl index f4631cb30a..31b0b4ab12 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.hlsl index c35ca2af2e..65b0c98407 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); +static float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.msl index 2635df5e2e..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.spvasm index 16290c031d..c0f68aa95a 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_7 = OpConstant %float 7 %float_8 = OpConstant %float 8 %15 = OpConstantComposite %v3float %float_6 %float_7 %float_8 - %m = OpConstantComposite %mat3v3float %7 %11 %15 + %16 = OpConstantComposite %mat3v3float %7 %11 %15 +%_ptr_Private_mat3v3float = OpTypePointer Private %mat3v3float + %m = OpVariable %_ptr_Private_mat3v3float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.wgsl index 18ca6e3c20..51e56891d1 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x3(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0); +var m = mat3x3(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl index de0b7c5c91..84ea539866 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f, - 6.0f, 7.0f, 8.0f); +var m = mat3x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f, + 6.0f, 7.0f, 8.0f); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.glsl index f4631cb30a..31b0b4ab12 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.hlsl index c35ca2af2e..65b0c98407 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); +static float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.msl index 2635df5e2e..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.spvasm index 16290c031d..c0f68aa95a 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_7 = OpConstant %float 7 %float_8 = OpConstant %float 8 %15 = OpConstantComposite %v3float %float_6 %float_7 %float_8 - %m = OpConstantComposite %mat3v3float %7 %11 %15 + %16 = OpConstantComposite %mat3v3float %7 %11 %15 +%_ptr_Private_mat3v3float = OpTypePointer Private %mat3v3float + %m = OpVariable %_ptr_Private_mat3v3float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.wgsl index c4f87ec1b6..ce6bd445e7 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f); +var m = mat3x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl index 7b5f129ecd..d8fa2b4090 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl @@ -1,3 +1,3 @@ -let m = mat3x3(vec3(0.0, 1.0, 2.0), - vec3(3.0, 4.0, 5.0), - vec3(6.0, 7.0, 8.0)); +var m = mat3x3(vec3(0.0, 1.0, 2.0), + vec3(3.0, 4.0, 5.0), + vec3(6.0, 7.0, 8.0)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.glsl index f4631cb30a..31b0b4ab12 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.hlsl index c35ca2af2e..65b0c98407 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); +static float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.msl index 2635df5e2e..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.spvasm index 16290c031d..c0f68aa95a 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_7 = OpConstant %float 7 %float_8 = OpConstant %float 8 %15 = OpConstantComposite %v3float %float_6 %float_7 %float_8 - %m = OpConstantComposite %mat3v3float %7 %11 %15 + %16 = OpConstantComposite %mat3v3float %7 %11 %15 +%_ptr_Private_mat3v3float = OpTypePointer Private %mat3v3float + %m = OpVariable %_ptr_Private_mat3v3float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.wgsl index 21c62e8e24..3b34421488 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x3(vec3(0.0, 1.0, 2.0), vec3(3.0, 4.0, 5.0), vec3(6.0, 7.0, 8.0)); +var m = mat3x3(vec3(0.0, 1.0, 2.0), vec3(3.0, 4.0, 5.0), vec3(6.0, 7.0, 8.0)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl index ab6a8dd7ff..aeff918657 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x3(vec3(0.0f, 1.0f, 2.0f), - vec3(3.0f, 4.0f, 5.0f), - vec3(6.0f, 7.0f, 8.0f)); +var m = mat3x3(vec3(0.0f, 1.0f, 2.0f), + vec3(3.0f, 4.0f, 5.0f), + vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.glsl index f4631cb30a..31b0b4ab12 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +mat3 m = mat3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.hlsl index c35ca2af2e..65b0c98407 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); +static float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.msl index 2635df5e2e..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x3 m = float3x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.spvasm index 16290c031d..c0f68aa95a 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_7 = OpConstant %float 7 %float_8 = OpConstant %float 8 %15 = OpConstantComposite %v3float %float_6 %float_7 %float_8 - %m = OpConstantComposite %mat3v3float %7 %11 %15 + %16 = OpConstantComposite %mat3v3float %7 %11 %15 +%_ptr_Private_mat3v3float = OpTypePointer Private %mat3v3float + %m = OpVariable %_ptr_Private_mat3v3float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.wgsl index 9117012306..f9d685ee0c 100644 --- a/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/inferred/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); +var m = mat3x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl index 1e2d9f89e0..0ecffa30db 100644 --- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl @@ -1 +1 @@ -let m = mat3x3(); +var m = mat3x3(); diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.glsl index e16f26c744..421fc2b69a 100644 --- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3 m = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); +mat3 m = mat3(vec3(0.0f), vec3(0.0f), vec3(0.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.hlsl index 4c120a7b8d..b96d4e1071 100644 --- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x3 m = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); +static float3x3 m = float3x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx); diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.msl index ddcb08ddf1..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x3 m = float3x3(float3(0.0f), float3(0.0f), float3(0.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.spvasm index 0ec90cbe78..743b9d42f6 100644 --- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 9 +; Bound: 11 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -12,10 +12,12 @@ %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 %mat3v3float = OpTypeMatrix %v3float 3 - %m = OpConstantNull %mat3v3float + %4 = OpConstantNull %mat3v3float +%_ptr_Private_mat3v3float = OpTypePointer Private %mat3v3float + %m = OpVariable %_ptr_Private_mat3v3float Private %4 %void = OpTypeVoid - %5 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %5 - %8 = OpLabel + %7 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %7 + %10 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.wgsl index 1e2d9f89e0..0ecffa30db 100644 --- a/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x3/zero/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x3(); +var m = mat3x3(); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl index 823be666e0..6997b0ee76 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl @@ -1,6 +1,6 @@ -let m = mat3x4(mat3x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat3x4(mat3x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f)); fn f() -> mat3x4 { let m_1 = mat3x4(m); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.glsl index 6c64f684a7..cd411382a2 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); mat3x4 f() { - mat3x4 m_1 = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); + mat3x4 m_1 = mat3x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.hlsl index 77ea8aff25..11e3fe8d54 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); +static float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); float3x4 f() { - const float3x4 m_1 = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); + const float3x4 m_1 = float3x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.msl index 4ee3d7b89d..9295b89377 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); - float3x4 f() { - float3x4 const m_1 = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); + thread float3x4 tint_symbol = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); + float3x4 const m_1 = float3x4(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.spvasm index 8019731814..707e9ce5b8 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 27 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,15 +28,18 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %18 = OpConstantComposite %v4float %float_8 %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat3v4float %8 %13 %18 + %19 = OpConstantComposite %mat3v4float %8 %13 %18 +%_ptr_Private_mat3v4float = OpTypePointer Private %mat3v4float + %m = OpVariable %_ptr_Private_mat3v4float Private %19 %void = OpTypeVoid - %20 = OpTypeFunction %void - %24 = OpTypeFunction %mat3v4float -%unused_entry_point = OpFunction %void None %20 - %23 = OpLabel + %22 = OpTypeFunction %void + %26 = OpTypeFunction %mat3v4float +%unused_entry_point = OpFunction %void None %22 + %25 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat3v4float None %24 - %26 = OpLabel - OpReturnValue %m + %f = OpFunction %mat3v4float None %26 + %28 = OpLabel + %30 = OpLoad %mat3v4float %m + OpReturnValue %30 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.wgsl index 4c6c2d02c4..14caa3e737 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat3x4(mat3x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat3x4(mat3x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f)); fn f() -> mat3x4 { let m_1 = mat3x4(m); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl index 0a2e8e04d8..99d896b920 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f); +var m = mat3x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.glsl index 2b8f5786b9..766e72cdd8 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.hlsl index fae68dfa2d..b23383ef7d 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); +static float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.msl index 3608220014..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.spvasm index 9740914c4c..d29b311ecf 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 26 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,10 +27,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %18 = OpConstantComposite %v4float %float_8 %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat3v4float %8 %13 %18 + %19 = OpConstantComposite %mat3v4float %8 %13 %18 +%_ptr_Private_mat3v4float = OpTypePointer Private %mat3v4float + %m = OpVariable %_ptr_Private_mat3v4float Private %19 %void = OpTypeVoid - %20 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %20 - %23 = OpLabel + %22 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %22 + %25 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.wgsl index 205baa2a5f..e4268e1f5a 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f); +var m = mat3x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl index a3fc9c6fa5..672ac2e95b 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), - vec4(4.0f, 5.0f, 6.0f, 7.0f), - vec4(8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), + vec4(4.0f, 5.0f, 6.0f, 7.0f), + vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.glsl index 2b8f5786b9..766e72cdd8 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.hlsl index fae68dfa2d..b23383ef7d 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); +static float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.msl index 3608220014..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.spvasm index 9740914c4c..d29b311ecf 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 26 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,10 +27,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %18 = OpConstantComposite %v4float %float_8 %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat3v4float %8 %13 %18 + %19 = OpConstantComposite %mat3v4float %8 %13 %18 +%_ptr_Private_mat3v4float = OpTypePointer Private %mat3v4float + %m = OpVariable %_ptr_Private_mat3v4float Private %19 %void = OpTypeVoid - %20 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %20 - %23 = OpLabel + %22 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %22 + %25 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.wgsl index 05bc2e61d4..8a529c9032 100644 --- a/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/explicit/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl index b80dbc5d08..b46182b390 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl @@ -1,6 +1,6 @@ -let m = mat3x4(mat3x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat3x4(mat3x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f)); fn f() -> mat3x4 { let m_1 = mat3x4(m); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.glsl index 6c64f684a7..cd411382a2 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); mat3x4 f() { - mat3x4 m_1 = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); + mat3x4 m_1 = mat3x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.hlsl index 77ea8aff25..11e3fe8d54 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); +static float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); float3x4 f() { - const float3x4 m_1 = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); + const float3x4 m_1 = float3x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.msl index 4ee3d7b89d..9295b89377 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); - float3x4 f() { - float3x4 const m_1 = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); + thread float3x4 tint_symbol = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); + float3x4 const m_1 = float3x4(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.spvasm index 8019731814..707e9ce5b8 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 27 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,15 +28,18 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %18 = OpConstantComposite %v4float %float_8 %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat3v4float %8 %13 %18 + %19 = OpConstantComposite %mat3v4float %8 %13 %18 +%_ptr_Private_mat3v4float = OpTypePointer Private %mat3v4float + %m = OpVariable %_ptr_Private_mat3v4float Private %19 %void = OpTypeVoid - %20 = OpTypeFunction %void - %24 = OpTypeFunction %mat3v4float -%unused_entry_point = OpFunction %void None %20 - %23 = OpLabel + %22 = OpTypeFunction %void + %26 = OpTypeFunction %mat3v4float +%unused_entry_point = OpFunction %void None %22 + %25 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat3v4float None %24 - %26 = OpLabel - OpReturnValue %m + %f = OpFunction %mat3v4float None %26 + %28 = OpLabel + %30 = OpLoad %mat3v4float %m + OpReturnValue %30 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.wgsl index 46be1d3c0d..83bb686814 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat3x4(mat3x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat3x4(mat3x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f)); fn f() -> mat3x4 { let m_1 = mat3x4(m); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl index cce81618e0..ac7c5bde23 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl @@ -1,3 +1,3 @@ -let m = mat3x4(0.0, 1.0, 2.0, 3.0, - 4.0, 5.0, 6.0, 7.0, - 8.0, 9.0, 10.0, 11.0); +var m = mat3x4(0.0, 1.0, 2.0, 3.0, + 4.0, 5.0, 6.0, 7.0, + 8.0, 9.0, 10.0, 11.0); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.glsl index 2b8f5786b9..766e72cdd8 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.hlsl index fae68dfa2d..b23383ef7d 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); +static float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.msl index 3608220014..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.spvasm index 9740914c4c..d29b311ecf 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 26 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,10 +27,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %18 = OpConstantComposite %v4float %float_8 %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat3v4float %8 %13 %18 + %19 = OpConstantComposite %mat3v4float %8 %13 %18 +%_ptr_Private_mat3v4float = OpTypePointer Private %mat3v4float + %m = OpVariable %_ptr_Private_mat3v4float Private %19 %void = OpTypeVoid - %20 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %20 - %23 = OpLabel + %22 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %22 + %25 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.wgsl index 5fce07ff64..cdc7e44c3b 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x4(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0); +var m = mat3x4(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl index 9af3d0e53d..21f4e06102 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f); +var m = mat3x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.glsl index 2b8f5786b9..766e72cdd8 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.hlsl index fae68dfa2d..b23383ef7d 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); +static float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.msl index 3608220014..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.spvasm index 9740914c4c..d29b311ecf 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 26 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,10 +27,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %18 = OpConstantComposite %v4float %float_8 %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat3v4float %8 %13 %18 + %19 = OpConstantComposite %mat3v4float %8 %13 %18 +%_ptr_Private_mat3v4float = OpTypePointer Private %mat3v4float + %m = OpVariable %_ptr_Private_mat3v4float Private %19 %void = OpTypeVoid - %20 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %20 - %23 = OpLabel + %22 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %22 + %25 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.wgsl index 8843467662..7af29f037f 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f); +var m = mat3x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl index cf638c26be..0fdc26b243 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl @@ -1,3 +1,3 @@ -let m = mat3x4(vec4(0.0, 1.0, 2.0, 3.0), - vec4(4.0, 5.0, 6.0, 7.0), - vec4(8.0, 9.0, 10.0, 11.0)); +var m = mat3x4(vec4(0.0, 1.0, 2.0, 3.0), + vec4(4.0, 5.0, 6.0, 7.0), + vec4(8.0, 9.0, 10.0, 11.0)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.glsl index 2b8f5786b9..766e72cdd8 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.hlsl index fae68dfa2d..b23383ef7d 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); +static float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.msl index 3608220014..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.spvasm index 9740914c4c..d29b311ecf 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 26 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,10 +27,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %18 = OpConstantComposite %v4float %float_8 %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat3v4float %8 %13 %18 + %19 = OpConstantComposite %mat3v4float %8 %13 %18 +%_ptr_Private_mat3v4float = OpTypePointer Private %mat3v4float + %m = OpVariable %_ptr_Private_mat3v4float Private %19 %void = OpTypeVoid - %20 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %20 - %23 = OpLabel + %22 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %22 + %25 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.wgsl index 4b5d529ee0..bec21cf1a0 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x4(vec4(0.0, 1.0, 2.0, 3.0), vec4(4.0, 5.0, 6.0, 7.0), vec4(8.0, 9.0, 10.0, 11.0)); +var m = mat3x4(vec4(0.0, 1.0, 2.0, 3.0), vec4(4.0, 5.0, 6.0, 7.0), vec4(8.0, 9.0, 10.0, 11.0)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl index 32169b897f..7cb7da6399 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl @@ -1,3 +1,3 @@ -let m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), - vec4(4.0f, 5.0f, 6.0f, 7.0f), - vec4(8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), + vec4(4.0f, 5.0f, 6.0f, 7.0f), + vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.glsl index 2b8f5786b9..766e72cdd8 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +mat3x4 m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.hlsl index fae68dfa2d..b23383ef7d 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); +static float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.msl index 3608220014..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x4 m = float3x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.spvasm index 9740914c4c..d29b311ecf 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 26 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -27,10 +27,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %18 = OpConstantComposite %v4float %float_8 %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat3v4float %8 %13 %18 + %19 = OpConstantComposite %mat3v4float %8 %13 %18 +%_ptr_Private_mat3v4float = OpTypePointer Private %mat3v4float + %m = OpVariable %_ptr_Private_mat3v4float Private %19 %void = OpTypeVoid - %20 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %20 - %23 = OpLabel + %22 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %22 + %25 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.wgsl index 7ce7445f9f..a0c86ae2df 100644 --- a/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/inferred/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat3x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl index 05ed798b95..6b2bb52cfa 100644 --- a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl @@ -1 +1 @@ -let m = mat3x4(); +var m = mat3x4(); diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.glsl index 34483858b9..845aed19c2 100644 --- a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat3x4 m = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)); +mat3x4 m = mat3x4(vec4(0.0f), vec4(0.0f), vec4(0.0f)); diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.hlsl index 38ea52306f..3f3c45b168 100644 --- a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3x4 m = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); +static float3x4 m = float3x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.msl index deba45f734..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3x4 m = float3x4(float4(0.0f), float4(0.0f), float4(0.0f)); - diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.spvasm index e561e11635..329a1ab38a 100644 --- a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 9 +; Bound: 11 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -12,10 +12,12 @@ %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 %mat3v4float = OpTypeMatrix %v4float 3 - %m = OpConstantNull %mat3v4float + %4 = OpConstantNull %mat3v4float +%_ptr_Private_mat3v4float = OpTypePointer Private %mat3v4float + %m = OpVariable %_ptr_Private_mat3v4float Private %4 %void = OpTypeVoid - %5 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %5 - %8 = OpLabel + %7 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %7 + %10 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.wgsl index 05ed798b95..6b2bb52cfa 100644 --- a/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat3x4/zero/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat3x4(); +var m = mat3x4(); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl index 44099e2039..d82b3ff796 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl @@ -1,7 +1,7 @@ -let m = mat4x2(mat4x2(0.0f, 1.0f, - 2.0f, 3.0f, - 4.0f, 5.0f, - 6.0f, 7.0f)); +var m = mat4x2(mat4x2(0.0f, 1.0f, + 2.0f, 3.0f, + 4.0f, 5.0f, + 6.0f, 7.0f)); fn f() -> mat4x2 { let m_1 = mat4x2(m); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.glsl index 1adb3c88c3..e5a475dfcc 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); mat4x2 f() { - mat4x2 m_1 = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); + mat4x2 m_1 = mat4x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.hlsl index a8a20db5c1..b957caa4c6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); +static float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); float4x2 f() { - const float4x2 m_1 = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); + const float4x2 m_1 = float4x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.msl index dcef3ec151..21148953a4 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); - float4x2 f() { - float4x2 const m_1 = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); + thread float4x2 tint_symbol = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); + float4x2 const m_1 = float4x2(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.spvasm index 54757df210..f40139edf8 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 28 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -25,15 +25,18 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %15 = OpConstantComposite %v2float %float_6 %float_7 - %m = OpConstantComposite %mat4v2float %6 %9 %12 %15 + %16 = OpConstantComposite %mat4v2float %6 %9 %12 %15 +%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float + %m = OpVariable %_ptr_Private_mat4v2float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void - %21 = OpTypeFunction %mat4v2float -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void + %23 = OpTypeFunction %mat4v2float +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat4v2float None %21 - %23 = OpLabel - OpReturnValue %m + %f = OpFunction %mat4v2float None %23 + %25 = OpLabel + %27 = OpLoad %mat4v2float %m + OpReturnValue %27 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.wgsl index 6ae1b50e0b..6eb8cc6f13 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat4x2(mat4x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat4x2(mat4x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f)); fn f() -> mat4x2 { let m_1 = mat4x2(m); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl index 51b68392bf..1332e8557f 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x2(0.0f, 1.0f, - 2.0f, 3.0f, - 4.0f, 5.0f, - 6.0f, 7.0f); +var m = mat4x2(0.0f, 1.0f, + 2.0f, 3.0f, + 4.0f, 5.0f, + 6.0f, 7.0f); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.glsl index 93ae98cd4b..2fbbb7e9fe 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.hlsl index 2acab36b4d..e97d2792c8 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); +static float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.msl index 0597230800..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.spvasm index ef14ca069e..fd79610037 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %15 = OpConstantComposite %v2float %float_6 %float_7 - %m = OpConstantComposite %mat4v2float %6 %9 %12 %15 + %16 = OpConstantComposite %mat4v2float %6 %9 %12 %15 +%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float + %m = OpVariable %_ptr_Private_mat4v2float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.wgsl index f8b02e2c49..5ca62398bf 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f); +var m = mat4x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl index 80b3345e34..74227f4276 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x2(vec2(0.0f, 1.0f), - vec2(2.0f, 3.0f), - vec2(4.0f, 5.0f), - vec2(6.0f, 7.0f)); +var m = mat4x2(vec2(0.0f, 1.0f), + vec2(2.0f, 3.0f), + vec2(4.0f, 5.0f), + vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.glsl index 93ae98cd4b..2fbbb7e9fe 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.hlsl index 2acab36b4d..e97d2792c8 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); +static float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.msl index 0597230800..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.spvasm index ef14ca069e..fd79610037 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %15 = OpConstantComposite %v2float %float_6 %float_7 - %m = OpConstantComposite %mat4v2float %6 %9 %12 %15 + %16 = OpConstantComposite %mat4v2float %6 %9 %12 %15 +%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float + %m = OpVariable %_ptr_Private_mat4v2float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.wgsl index 2d10da9ad2..a425e47410 100644 --- a/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/explicit/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +var m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl index 45b9ed0326..70ea4dfe6e 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl @@ -1,7 +1,7 @@ -let m = mat4x2(mat4x2(0.0f, 1.0f, - 2.0f, 3.0f, - 4.0f, 5.0f, - 6.0f, 7.0f)); +var m = mat4x2(mat4x2(0.0f, 1.0f, + 2.0f, 3.0f, + 4.0f, 5.0f, + 6.0f, 7.0f)); fn f() -> mat4x2 { let m_1 = mat4x2(m); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.glsl index 1adb3c88c3..e5a475dfcc 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); mat4x2 f() { - mat4x2 m_1 = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); + mat4x2 m_1 = mat4x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.hlsl index a8a20db5c1..b957caa4c6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); +static float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); float4x2 f() { - const float4x2 m_1 = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); + const float4x2 m_1 = float4x2(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.msl index dcef3ec151..21148953a4 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); - float4x2 f() { - float4x2 const m_1 = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); + thread float4x2 tint_symbol = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); + float4x2 const m_1 = float4x2(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.spvasm index 54757df210..f40139edf8 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 24 +; Bound: 28 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -25,15 +25,18 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %15 = OpConstantComposite %v2float %float_6 %float_7 - %m = OpConstantComposite %mat4v2float %6 %9 %12 %15 + %16 = OpConstantComposite %mat4v2float %6 %9 %12 %15 +%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float + %m = OpVariable %_ptr_Private_mat4v2float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void - %21 = OpTypeFunction %mat4v2float -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void + %23 = OpTypeFunction %mat4v2float +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat4v2float None %21 - %23 = OpLabel - OpReturnValue %m + %f = OpFunction %mat4v2float None %23 + %25 = OpLabel + %27 = OpLoad %mat4v2float %m + OpReturnValue %27 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.wgsl index ace9fa2086..11bedce44c 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat4x2(mat4x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f)); +var m = mat4x2(mat4x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f)); fn f() -> mat4x2 { let m_1 = mat4x2(m); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl index f0946b93a5..61644c1c71 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl @@ -1,4 +1,4 @@ -let m = mat4x2(0.0, 1.0, - 2.0, 3.0, - 4.0, 5.0, - 6.0, 7.0); +var m = mat4x2(0.0, 1.0, + 2.0, 3.0, + 4.0, 5.0, + 6.0, 7.0); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.glsl index 93ae98cd4b..2fbbb7e9fe 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.hlsl index 2acab36b4d..e97d2792c8 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); +static float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.msl index 0597230800..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.spvasm index ef14ca069e..fd79610037 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %15 = OpConstantComposite %v2float %float_6 %float_7 - %m = OpConstantComposite %mat4v2float %6 %9 %12 %15 + %16 = OpConstantComposite %mat4v2float %6 %9 %12 %15 +%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float + %m = OpVariable %_ptr_Private_mat4v2float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.wgsl index 8f695084f5..3f217927c0 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x2(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0); +var m = mat4x2(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl index f5a544c0fb..f4ad0c1485 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x2(0.0f, 1.0f, - 2.0f, 3.0f, - 4.0f, 5.0f, - 6.0f, 7.0f); +var m = mat4x2(0.0f, 1.0f, + 2.0f, 3.0f, + 4.0f, 5.0f, + 6.0f, 7.0f); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.glsl index 93ae98cd4b..2fbbb7e9fe 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.hlsl index 2acab36b4d..e97d2792c8 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); +static float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.msl index 0597230800..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.spvasm index ef14ca069e..fd79610037 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %15 = OpConstantComposite %v2float %float_6 %float_7 - %m = OpConstantComposite %mat4v2float %6 %9 %12 %15 + %16 = OpConstantComposite %mat4v2float %6 %9 %12 %15 +%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float + %m = OpVariable %_ptr_Private_mat4v2float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.wgsl index 5c582f071c..94293b0801 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f); +var m = mat4x2(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl index 2d90c356dd..8d088c5ee7 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl @@ -1,4 +1,4 @@ -let m = mat4x2(vec2(0.0, 1.0), - vec2(2.0, 3.0), - vec2(4.0, 5.0), - vec2(6.0, 7.0)); +var m = mat4x2(vec2(0.0, 1.0), + vec2(2.0, 3.0), + vec2(4.0, 5.0), + vec2(6.0, 7.0)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.glsl index 93ae98cd4b..2fbbb7e9fe 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.hlsl index 2acab36b4d..e97d2792c8 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); +static float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.msl index 0597230800..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.spvasm index ef14ca069e..fd79610037 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %15 = OpConstantComposite %v2float %float_6 %float_7 - %m = OpConstantComposite %mat4v2float %6 %9 %12 %15 + %16 = OpConstantComposite %mat4v2float %6 %9 %12 %15 +%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float + %m = OpVariable %_ptr_Private_mat4v2float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.wgsl index 17866498cb..571207b86f 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x2(vec2(0.0, 1.0), vec2(2.0, 3.0), vec2(4.0, 5.0), vec2(6.0, 7.0)); +var m = mat4x2(vec2(0.0, 1.0), vec2(2.0, 3.0), vec2(4.0, 5.0), vec2(6.0, 7.0)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl index 952511e952..8da6415cd6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x2(vec2(0.0f, 1.0f), - vec2(2.0f, 3.0f), - vec2(4.0f, 5.0f), - vec2(6.0f, 7.0f)); +var m = mat4x2(vec2(0.0f, 1.0f), + vec2(2.0f, 3.0f), + vec2(4.0f, 5.0f), + vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.glsl index 93ae98cd4b..2fbbb7e9fe 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +mat4x2 m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.hlsl index 2acab36b4d..e97d2792c8 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); +static float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.msl index 0597230800..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x2 m = float4x2(float2(0.0f, 1.0f), float2(2.0f, 3.0f), float2(4.0f, 5.0f), float2(6.0f, 7.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.spvasm index ef14ca069e..fd79610037 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 21 +; Bound: 23 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -24,10 +24,12 @@ %float_6 = OpConstant %float 6 %float_7 = OpConstant %float 7 %15 = OpConstantComposite %v2float %float_6 %float_7 - %m = OpConstantComposite %mat4v2float %6 %9 %12 %15 + %16 = OpConstantComposite %mat4v2float %6 %9 %12 %15 +%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float + %m = OpVariable %_ptr_Private_mat4v2float Private %16 %void = OpTypeVoid - %17 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %17 - %20 = OpLabel + %19 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %19 + %22 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.wgsl index e585e38033..e024293935 100644 --- a/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/inferred/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); +var m = mat4x2(vec2(0.0f, 1.0f), vec2(2.0f, 3.0f), vec2(4.0f, 5.0f), vec2(6.0f, 7.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl index 474bd21a2a..4c85dffa66 100644 --- a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl @@ -1 +1 @@ -let m = mat4x2(); +var m = mat4x2(); diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.glsl index f767bee0a9..9e082c7ff6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x2 m = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)); +mat4x2 m = mat4x2(vec2(0.0f), vec2(0.0f), vec2(0.0f), vec2(0.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.hlsl index 4ceb8f1a25..f402a95105 100644 --- a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x2 m = float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx); +static float4x2 m = float4x2((0.0f).xx, (0.0f).xx, (0.0f).xx, (0.0f).xx); diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.msl index ef2e67540b..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x2 m = float4x2(float2(0.0f), float2(0.0f), float2(0.0f), float2(0.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.spvasm index bdaaa7de78..328b41856d 100644 --- a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 9 +; Bound: 11 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -12,10 +12,12 @@ %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 %mat4v2float = OpTypeMatrix %v2float 4 - %m = OpConstantNull %mat4v2float + %4 = OpConstantNull %mat4v2float +%_ptr_Private_mat4v2float = OpTypePointer Private %mat4v2float + %m = OpVariable %_ptr_Private_mat4v2float Private %4 %void = OpTypeVoid - %5 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %5 - %8 = OpLabel + %7 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %7 + %10 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.wgsl index 474bd21a2a..4c85dffa66 100644 --- a/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x2/zero/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x2(); +var m = mat4x2(); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl index f940087bcd..9b7dee42fc 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl @@ -1,7 +1,7 @@ -let m = mat4x3(mat4x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f, - 6.0f, 7.0f, 8.0f, - 9.0f, 10.0f, 11.0f)); +var m = mat4x3(mat4x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f, + 6.0f, 7.0f, 8.0f, + 9.0f, 10.0f, 11.0f)); fn f() -> mat4x3 { let m_1 = mat4x3(m); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.glsl index f50674701d..9b28954648 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); mat4x3 f() { - mat4x3 m_1 = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); + mat4x3 m_1 = mat4x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.hlsl index 8adbbb39d6..284dccbd44 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); +static float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); float4x3 f() { - const float4x3 m_1 = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); + const float4x3 m_1 = float4x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.msl index b4c5eab896..73272195cf 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); - float4x3 f() { - float4x3 const m_1 = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); + thread float4x3 tint_symbol = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); + float4x3 const m_1 = float4x3(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.spvasm index be135b05ec..8cfb499643 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 28 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,15 +29,18 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %19 = OpConstantComposite %v3float %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat4v3float %7 %11 %15 %19 + %20 = OpConstantComposite %mat4v3float %7 %11 %15 %19 +%_ptr_Private_mat4v3float = OpTypePointer Private %mat4v3float + %m = OpVariable %_ptr_Private_mat4v3float Private %20 %void = OpTypeVoid - %21 = OpTypeFunction %void - %25 = OpTypeFunction %mat4v3float -%unused_entry_point = OpFunction %void None %21 - %24 = OpLabel + %23 = OpTypeFunction %void + %27 = OpTypeFunction %mat4v3float +%unused_entry_point = OpFunction %void None %23 + %26 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat4v3float None %25 - %27 = OpLabel - OpReturnValue %m + %f = OpFunction %mat4v3float None %27 + %29 = OpLabel + %31 = OpLoad %mat4v3float %m + OpReturnValue %31 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.wgsl index 4daec06f0a..d406f38987 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat4x3(mat4x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat4x3(mat4x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f)); fn f() -> mat4x3 { let m_1 = mat4x3(m); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl index 4dcaf4c892..afb562feaa 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f, - 6.0f, 7.0f, 8.0f, - 9.0f, 10.0f, 11.0f); +var m = mat4x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f, + 6.0f, 7.0f, 8.0f, + 9.0f, 10.0f, 11.0f); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.glsl index 532369fbf2..06560c7397 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.hlsl index 254cc408e6..6b34e6e1fa 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); +static float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.msl index d935650860..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.spvasm index cf9f4f3c7b..f5592ed4ba 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 25 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,10 +28,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %19 = OpConstantComposite %v3float %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat4v3float %7 %11 %15 %19 + %20 = OpConstantComposite %mat4v3float %7 %11 %15 %19 +%_ptr_Private_mat4v3float = OpTypePointer Private %mat4v3float + %m = OpVariable %_ptr_Private_mat4v3float Private %20 %void = OpTypeVoid - %21 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %21 - %24 = OpLabel + %23 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %23 + %26 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.wgsl index dbe4773a8f..aaa7fd78ac 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f); +var m = mat4x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl index 74b3e9c652..00f6cb1bff 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x3(vec3(0.0f, 1.0f, 2.0f), - vec3(3.0f, 4.0f, 5.0f), - vec3(6.0f, 7.0f, 8.0f), - vec3(9.0f, 10.0f, 11.0f)); +var m = mat4x3(vec3(0.0f, 1.0f, 2.0f), + vec3(3.0f, 4.0f, 5.0f), + vec3(6.0f, 7.0f, 8.0f), + vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.glsl index 532369fbf2..06560c7397 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.hlsl index 254cc408e6..6b34e6e1fa 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); +static float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.msl index d935650860..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.spvasm index cf9f4f3c7b..f5592ed4ba 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 25 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,10 +28,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %19 = OpConstantComposite %v3float %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat4v3float %7 %11 %15 %19 + %20 = OpConstantComposite %mat4v3float %7 %11 %15 %19 +%_ptr_Private_mat4v3float = OpTypePointer Private %mat4v3float + %m = OpVariable %_ptr_Private_mat4v3float Private %20 %void = OpTypeVoid - %21 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %21 - %24 = OpLabel + %23 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %23 + %26 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.wgsl index 2196b1e2f5..8e07672901 100644 --- a/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/explicit/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +var m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl index aba260df79..ad7c1b29fd 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl @@ -1,7 +1,7 @@ -let m = mat4x3(mat4x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f, - 6.0f, 7.0f, 8.0f, - 9.0f, 10.0f, 11.0f)); +var m = mat4x3(mat4x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f, + 6.0f, 7.0f, 8.0f, + 9.0f, 10.0f, 11.0f)); fn f() -> mat4x3 { let m_1 = mat4x3(m); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.glsl index f50674701d..9b28954648 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); mat4x3 f() { - mat4x3 m_1 = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); + mat4x3 m_1 = mat4x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.hlsl index 8adbbb39d6..284dccbd44 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); +static float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); float4x3 f() { - const float4x3 m_1 = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); + const float4x3 m_1 = float4x3(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.msl index b4c5eab896..73272195cf 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); - float4x3 f() { - float4x3 const m_1 = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); + thread float4x3 tint_symbol = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); + float4x3 const m_1 = float4x3(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.spvasm index be135b05ec..8cfb499643 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 28 +; Bound: 32 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -29,15 +29,18 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %19 = OpConstantComposite %v3float %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat4v3float %7 %11 %15 %19 + %20 = OpConstantComposite %mat4v3float %7 %11 %15 %19 +%_ptr_Private_mat4v3float = OpTypePointer Private %mat4v3float + %m = OpVariable %_ptr_Private_mat4v3float Private %20 %void = OpTypeVoid - %21 = OpTypeFunction %void - %25 = OpTypeFunction %mat4v3float -%unused_entry_point = OpFunction %void None %21 - %24 = OpLabel + %23 = OpTypeFunction %void + %27 = OpTypeFunction %mat4v3float +%unused_entry_point = OpFunction %void None %23 + %26 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat4v3float None %25 - %27 = OpLabel - OpReturnValue %m + %f = OpFunction %mat4v3float None %27 + %29 = OpLabel + %31 = OpLoad %mat4v3float %m + OpReturnValue %31 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.wgsl index d7e3f242a7..58662e48c7 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat4x3(mat4x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f)); +var m = mat4x3(mat4x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f)); fn f() -> mat4x3 { let m_1 = mat4x3(m); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl index 32326a9ed8..449400b741 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl @@ -1,4 +1,4 @@ -let m = mat4x3(0.0, 1.0, 2.0, - 3.0, 4.0, 5.0, - 6.0, 7.0, 8.0, - 9.0, 10.0, 11.0); +var m = mat4x3(0.0, 1.0, 2.0, + 3.0, 4.0, 5.0, + 6.0, 7.0, 8.0, + 9.0, 10.0, 11.0); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.glsl index 532369fbf2..06560c7397 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.hlsl index 254cc408e6..6b34e6e1fa 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); +static float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.msl index d935650860..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.spvasm index cf9f4f3c7b..f5592ed4ba 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 25 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,10 +28,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %19 = OpConstantComposite %v3float %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat4v3float %7 %11 %15 %19 + %20 = OpConstantComposite %mat4v3float %7 %11 %15 %19 +%_ptr_Private_mat4v3float = OpTypePointer Private %mat4v3float + %m = OpVariable %_ptr_Private_mat4v3float Private %20 %void = OpTypeVoid - %21 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %21 - %24 = OpLabel + %23 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %23 + %26 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.wgsl index 209a37625f..b8f80a723a 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x3(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0); +var m = mat4x3(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl index f9dd14646a..dfa9afebf0 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x3(0.0f, 1.0f, 2.0f, - 3.0f, 4.0f, 5.0f, - 6.0f, 7.0f, 8.0f, - 9.0f, 10.0f, 11.0f); +var m = mat4x3(0.0f, 1.0f, 2.0f, + 3.0f, 4.0f, 5.0f, + 6.0f, 7.0f, 8.0f, + 9.0f, 10.0f, 11.0f); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.glsl index 532369fbf2..06560c7397 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.hlsl index 254cc408e6..6b34e6e1fa 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); +static float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.msl index d935650860..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.spvasm index cf9f4f3c7b..f5592ed4ba 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 25 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,10 +28,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %19 = OpConstantComposite %v3float %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat4v3float %7 %11 %15 %19 + %20 = OpConstantComposite %mat4v3float %7 %11 %15 %19 +%_ptr_Private_mat4v3float = OpTypePointer Private %mat4v3float + %m = OpVariable %_ptr_Private_mat4v3float Private %20 %void = OpTypeVoid - %21 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %21 - %24 = OpLabel + %23 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %23 + %26 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.wgsl index 424df3dd4b..11bbddb918 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f); +var m = mat4x3(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl index 8a80c15412..cd71d8c3e6 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl @@ -1,4 +1,4 @@ -let m = mat4x3(vec3(0.0, 1.0, 2.0), - vec3(3.0, 4.0, 5.0), - vec3(6.0, 7.0, 8.0), - vec3(9.0, 10.0, 11.0)); +var m = mat4x3(vec3(0.0, 1.0, 2.0), + vec3(3.0, 4.0, 5.0), + vec3(6.0, 7.0, 8.0), + vec3(9.0, 10.0, 11.0)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.glsl index 532369fbf2..06560c7397 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.hlsl index 254cc408e6..6b34e6e1fa 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); +static float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.msl index d935650860..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.spvasm index cf9f4f3c7b..f5592ed4ba 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 25 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,10 +28,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %19 = OpConstantComposite %v3float %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat4v3float %7 %11 %15 %19 + %20 = OpConstantComposite %mat4v3float %7 %11 %15 %19 +%_ptr_Private_mat4v3float = OpTypePointer Private %mat4v3float + %m = OpVariable %_ptr_Private_mat4v3float Private %20 %void = OpTypeVoid - %21 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %21 - %24 = OpLabel + %23 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %23 + %26 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.wgsl index 6e9e96bbfd..2ec81b06a8 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x3(vec3(0.0, 1.0, 2.0), vec3(3.0, 4.0, 5.0), vec3(6.0, 7.0, 8.0), vec3(9.0, 10.0, 11.0)); +var m = mat4x3(vec3(0.0, 1.0, 2.0), vec3(3.0, 4.0, 5.0), vec3(6.0, 7.0, 8.0), vec3(9.0, 10.0, 11.0)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl index d6c8650f72..f55af6c7cb 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x3(vec3(0.0f, 1.0f, 2.0f), - vec3(3.0f, 4.0f, 5.0f), - vec3(6.0f, 7.0f, 8.0f), - vec3(9.0f, 10.0f, 11.0f)); +var m = mat4x3(vec3(0.0f, 1.0f, 2.0f), + vec3(3.0f, 4.0f, 5.0f), + vec3(6.0f, 7.0f, 8.0f), + vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.glsl index 532369fbf2..06560c7397 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +mat4x3 m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.hlsl index 254cc408e6..6b34e6e1fa 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); +static float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.msl index d935650860..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x3 m = float4x3(float3(0.0f, 1.0f, 2.0f), float3(3.0f, 4.0f, 5.0f), float3(6.0f, 7.0f, 8.0f), float3(9.0f, 10.0f, 11.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.spvasm index cf9f4f3c7b..f5592ed4ba 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 25 +; Bound: 27 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -28,10 +28,12 @@ %float_10 = OpConstant %float 10 %float_11 = OpConstant %float 11 %19 = OpConstantComposite %v3float %float_9 %float_10 %float_11 - %m = OpConstantComposite %mat4v3float %7 %11 %15 %19 + %20 = OpConstantComposite %mat4v3float %7 %11 %15 %19 +%_ptr_Private_mat4v3float = OpTypePointer Private %mat4v3float + %m = OpVariable %_ptr_Private_mat4v3float Private %20 %void = OpTypeVoid - %21 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %21 - %24 = OpLabel + %23 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %23 + %26 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.wgsl index eddcb09456..7eb4b32d47 100644 --- a/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/inferred/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); +var m = mat4x3(vec3(0.0f, 1.0f, 2.0f), vec3(3.0f, 4.0f, 5.0f), vec3(6.0f, 7.0f, 8.0f), vec3(9.0f, 10.0f, 11.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl index b8e7cf08cd..e23b03f16d 100644 --- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl @@ -1 +1 @@ -let m = mat4x3(); +var m = mat4x3(); diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.glsl index a60311adb2..b24fd7aded 100644 --- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4x3 m = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)); +mat4x3 m = mat4x3(vec3(0.0f), vec3(0.0f), vec3(0.0f), vec3(0.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.hlsl index 8741443e20..297a867820 100644 --- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x3 m = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); +static float4x3 m = float4x3((0.0f).xxx, (0.0f).xxx, (0.0f).xxx, (0.0f).xxx); diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.msl index 88679a8ff9..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x3 m = float4x3(float3(0.0f), float3(0.0f), float3(0.0f), float3(0.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.spvasm index 833cf99542..53ffa7d21c 100644 --- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 9 +; Bound: 11 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -12,10 +12,12 @@ %float = OpTypeFloat 32 %v3float = OpTypeVector %float 3 %mat4v3float = OpTypeMatrix %v3float 4 - %m = OpConstantNull %mat4v3float + %4 = OpConstantNull %mat4v3float +%_ptr_Private_mat4v3float = OpTypePointer Private %mat4v3float + %m = OpVariable %_ptr_Private_mat4v3float Private %4 %void = OpTypeVoid - %5 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %5 - %8 = OpLabel + %7 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %7 + %10 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.wgsl index b8e7cf08cd..e23b03f16d 100644 --- a/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x3/zero/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x3(); +var m = mat4x3(); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl index bc5556d3c9..ff2b04a2c7 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl @@ -1,7 +1,7 @@ -let m = mat4x4(mat4x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f, - 12.0f, 13.0f, 14.0f, 15.0f)); +var m = mat4x4(mat4x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f, + 12.0f, 13.0f, 14.0f, 15.0f)); fn f() -> mat4x4 { let m_1 = mat4x4(m); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.glsl index 737abbe027..5b8ecf497d 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); mat4 f() { - mat4 m_1 = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); + mat4 m_1 = mat4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.hlsl index cdde3bc260..fe1a3a7e28 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); +static float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); float4x4 f() { - const float4x4 m_1 = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); + const float4x4 m_1 = float4x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.msl index 54f69fa1e9..71f0986e53 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); - float4x4 f() { - float4x4 const m_1 = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); + thread float4x4 tint_symbol = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); + float4x4 const m_1 = float4x4(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.spvasm index 43fad62d50..e503126c9f 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,15 +33,18 @@ %float_14 = OpConstant %float 14 %float_15 = OpConstant %float 15 %23 = OpConstantComposite %v4float %float_12 %float_13 %float_14 %float_15 - %m = OpConstantComposite %mat4v4float %8 %13 %18 %23 + %24 = OpConstantComposite %mat4v4float %8 %13 %18 %23 +%_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float + %m = OpVariable %_ptr_Private_mat4v4float Private %24 %void = OpTypeVoid - %25 = OpTypeFunction %void - %29 = OpTypeFunction %mat4v4float -%unused_entry_point = OpFunction %void None %25 - %28 = OpLabel + %27 = OpTypeFunction %void + %31 = OpTypeFunction %mat4v4float +%unused_entry_point = OpFunction %void None %27 + %30 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat4v4float None %29 - %31 = OpLabel - OpReturnValue %m + %f = OpFunction %mat4v4float None %31 + %33 = OpLabel + %35 = OpLoad %mat4v4float %m + OpReturnValue %35 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.wgsl index 908d9b9f77..ddab90cff7 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat4x4(mat4x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f)); +var m = mat4x4(mat4x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f)); fn f() -> mat4x4 { let m_1 = mat4x4(m); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl index 8ab5b1608f..bdd6737c66 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f, - 12.0f, 13.0f, 14.0f, 15.0f); +var m = mat4x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f, + 12.0f, 13.0f, 14.0f, 15.0f); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.glsl index b86a544c92..5f8a2263f6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.hlsl index 270799912a..6b506f6515 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); +static float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.msl index 053e23dbe9..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.spvasm index 7006fcd399..ac2d6d7bef 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,10 +32,12 @@ %float_14 = OpConstant %float 14 %float_15 = OpConstant %float 15 %23 = OpConstantComposite %v4float %float_12 %float_13 %float_14 %float_15 - %m = OpConstantComposite %mat4v4float %8 %13 %18 %23 + %24 = OpConstantComposite %mat4v4float %8 %13 %18 %23 +%_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float + %m = OpVariable %_ptr_Private_mat4v4float Private %24 %void = OpTypeVoid - %25 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %25 - %28 = OpLabel + %27 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %27 + %30 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.wgsl index 36fe95df21..adc3d0cafb 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f); +var m = mat4x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl index be1d34217f..62b2ea3788 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), - vec4(4.0f, 5.0f, 6.0f, 7.0f), - vec4(8.0f, 9.0f, 10.0f, 11.0f), - vec4(12.0f, 13.0f, 14.0f, 15.0f)); +var m = mat4x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), + vec4(4.0f, 5.0f, 6.0f, 7.0f), + vec4(8.0f, 9.0f, 10.0f, 11.0f), + vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.glsl index b86a544c92..5f8a2263f6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.hlsl index 270799912a..6b506f6515 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); +static float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.msl index 053e23dbe9..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.spvasm index 7006fcd399..ac2d6d7bef 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,10 +32,12 @@ %float_14 = OpConstant %float 14 %float_15 = OpConstant %float 15 %23 = OpConstantComposite %v4float %float_12 %float_13 %float_14 %float_15 - %m = OpConstantComposite %mat4v4float %8 %13 %18 %23 + %24 = OpConstantComposite %mat4v4float %8 %13 %18 %23 +%_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float + %m = OpVariable %_ptr_Private_mat4v4float Private %24 %void = OpTypeVoid - %25 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %25 - %28 = OpLabel + %27 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %27 + %30 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.wgsl index a09649c479..e3c85d64ca 100644 --- a/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/explicit/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +var m = mat4x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl index 2b9f7e9356..3024289809 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl @@ -1,7 +1,7 @@ -let m = mat4x4(mat4x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f, - 12.0f, 13.0f, 14.0f, 15.0f)); +var m = mat4x4(mat4x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f, + 12.0f, 13.0f, 14.0f, 15.0f)); fn f() -> mat4x4 { let m_1 = mat4x4(m); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.glsl index 737abbe027..5b8ecf497d 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.glsl @@ -4,9 +4,9 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); mat4 f() { - mat4 m_1 = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); + mat4 m_1 = mat4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.hlsl index cdde3bc260..fe1a3a7e28 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.hlsl @@ -3,9 +3,9 @@ void unused_entry_point() { return; } -static const float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); +static float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); float4x4 f() { - const float4x4 m_1 = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); + const float4x4 m_1 = float4x4(m); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.msl index 54f69fa1e9..71f0986e53 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.msl @@ -1,10 +1,9 @@ #include using namespace metal; -constant float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); - float4x4 f() { - float4x4 const m_1 = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); + thread float4x4 tint_symbol = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); + float4x4 const m_1 = float4x4(tint_symbol); return m_1; } diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.spvasm index 43fad62d50..e503126c9f 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 32 +; Bound: 36 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -33,15 +33,18 @@ %float_14 = OpConstant %float 14 %float_15 = OpConstant %float 15 %23 = OpConstantComposite %v4float %float_12 %float_13 %float_14 %float_15 - %m = OpConstantComposite %mat4v4float %8 %13 %18 %23 + %24 = OpConstantComposite %mat4v4float %8 %13 %18 %23 +%_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float + %m = OpVariable %_ptr_Private_mat4v4float Private %24 %void = OpTypeVoid - %25 = OpTypeFunction %void - %29 = OpTypeFunction %mat4v4float -%unused_entry_point = OpFunction %void None %25 - %28 = OpLabel + %27 = OpTypeFunction %void + %31 = OpTypeFunction %mat4v4float +%unused_entry_point = OpFunction %void None %27 + %30 = OpLabel OpReturn OpFunctionEnd - %f = OpFunction %mat4v4float None %29 - %31 = OpLabel - OpReturnValue %m + %f = OpFunction %mat4v4float None %31 + %33 = OpLabel + %35 = OpLoad %mat4v4float %m + OpReturnValue %35 OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.wgsl index b9e9f8f0e0..aa96555bca 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/identity/f32.wgsl.expected.wgsl @@ -1,4 +1,4 @@ -let m = mat4x4(mat4x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f)); +var m = mat4x4(mat4x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f)); fn f() -> mat4x4 { let m_1 = mat4x4(m); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl index 571610f480..3339d4da54 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl @@ -1,4 +1,4 @@ -let m = mat4x4(0.0, 1.0, 2.0, 3.0, - 4.0, 5.0, 6.0, 7.0, - 8.0, 9.0, 10.0, 11.0, - 12.0, 13.0, 14.0, 15.0); +var m = mat4x4(0.0, 1.0, 2.0, 3.0, + 4.0, 5.0, 6.0, 7.0, + 8.0, 9.0, 10.0, 11.0, + 12.0, 13.0, 14.0, 15.0); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.glsl index b86a544c92..5f8a2263f6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.hlsl index 270799912a..6b506f6515 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); +static float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.msl index 053e23dbe9..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.spvasm index 7006fcd399..ac2d6d7bef 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,10 +32,12 @@ %float_14 = OpConstant %float 14 %float_15 = OpConstant %float 15 %23 = OpConstantComposite %v4float %float_12 %float_13 %float_14 %float_15 - %m = OpConstantComposite %mat4v4float %8 %13 %18 %23 + %24 = OpConstantComposite %mat4v4float %8 %13 %18 %23 +%_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float + %m = OpVariable %_ptr_Private_mat4v4float Private %24 %void = OpTypeVoid - %25 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %25 - %28 = OpLabel + %27 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %27 + %30 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.wgsl index 33b0598be3..83572f2a94 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x4(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0); +var m = mat4x4(0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl index a47089b116..178b95bd82 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x4(0.0f, 1.0f, 2.0f, 3.0f, - 4.0f, 5.0f, 6.0f, 7.0f, - 8.0f, 9.0f, 10.0f, 11.0f, - 12.0f, 13.0f, 14.0f, 15.0f); +var m = mat4x4(0.0f, 1.0f, 2.0f, 3.0f, + 4.0f, 5.0f, 6.0f, 7.0f, + 8.0f, 9.0f, 10.0f, 11.0f, + 12.0f, 13.0f, 14.0f, 15.0f); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.glsl index b86a544c92..5f8a2263f6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.hlsl index 270799912a..6b506f6515 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); +static float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.msl index 053e23dbe9..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.spvasm index 7006fcd399..ac2d6d7bef 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,10 +32,12 @@ %float_14 = OpConstant %float 14 %float_15 = OpConstant %float 15 %23 = OpConstantComposite %v4float %float_12 %float_13 %float_14 %float_15 - %m = OpConstantComposite %mat4v4float %8 %13 %18 %23 + %24 = OpConstantComposite %mat4v4float %8 %13 %18 %23 +%_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float + %m = OpVariable %_ptr_Private_mat4v4float Private %24 %void = OpTypeVoid - %25 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %25 - %28 = OpLabel + %27 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %27 + %30 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.wgsl index 2374280d5d..ae47f65b4b 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/scalars/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f); +var m = mat4x4(0.0f, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 9.0f, 10.0f, 11.0f, 12.0f, 13.0f, 14.0f, 15.0f); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl index a11a785eb2..52c70d1877 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl @@ -1,4 +1,4 @@ -let m = mat4x4(vec4(0.0, 1.0, 2.0, 3.0), - vec4(4.0, 5.0, 6.0, 7.0), - vec4(8.0, 9.0, 10.0, 11.0), - vec4(12.0, 13.0, 14.0, 15.0)); +var m = mat4x4(vec4(0.0, 1.0, 2.0, 3.0), + vec4(4.0, 5.0, 6.0, 7.0), + vec4(8.0, 9.0, 10.0, 11.0), + vec4(12.0, 13.0, 14.0, 15.0)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.glsl index b86a544c92..5f8a2263f6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.hlsl index 270799912a..6b506f6515 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); +static float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.msl index 053e23dbe9..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.spvasm index 7006fcd399..ac2d6d7bef 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,10 +32,12 @@ %float_14 = OpConstant %float 14 %float_15 = OpConstant %float 15 %23 = OpConstantComposite %v4float %float_12 %float_13 %float_14 %float_15 - %m = OpConstantComposite %mat4v4float %8 %13 %18 %23 + %24 = OpConstantComposite %mat4v4float %8 %13 %18 %23 +%_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float + %m = OpVariable %_ptr_Private_mat4v4float Private %24 %void = OpTypeVoid - %25 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %25 - %28 = OpLabel + %27 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %27 + %30 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.wgsl index faf14ff03c..13ec29a7b9 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x4(vec4(0.0, 1.0, 2.0, 3.0), vec4(4.0, 5.0, 6.0, 7.0), vec4(8.0, 9.0, 10.0, 11.0), vec4(12.0, 13.0, 14.0, 15.0)); +var m = mat4x4(vec4(0.0, 1.0, 2.0, 3.0), vec4(4.0, 5.0, 6.0, 7.0), vec4(8.0, 9.0, 10.0, 11.0), vec4(12.0, 13.0, 14.0, 15.0)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl index 77740a21b2..1e8e479cd0 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl @@ -1,4 +1,4 @@ -let m = mat4x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), - vec4(4.0f, 5.0f, 6.0f, 7.0f), - vec4(8.0f, 9.0f, 10.0f, 11.0f), - vec4(12.0f, 13.0f, 14.0f, 15.0f)); +var m = mat4x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), + vec4(4.0f, 5.0f, 6.0f, 7.0f), + vec4(8.0f, 9.0f, 10.0f, 11.0f), + vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.glsl index b86a544c92..5f8a2263f6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +mat4 m = mat4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.hlsl index 270799912a..6b506f6515 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); +static float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.msl index 053e23dbe9..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x4 m = float4x4(float4(0.0f, 1.0f, 2.0f, 3.0f), float4(4.0f, 5.0f, 6.0f, 7.0f), float4(8.0f, 9.0f, 10.0f, 11.0f), float4(12.0f, 13.0f, 14.0f, 15.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.spvasm index 7006fcd399..ac2d6d7bef 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 29 +; Bound: 31 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -32,10 +32,12 @@ %float_14 = OpConstant %float 14 %float_15 = OpConstant %float 15 %23 = OpConstantComposite %v4float %float_12 %float_13 %float_14 %float_15 - %m = OpConstantComposite %mat4v4float %8 %13 %18 %23 + %24 = OpConstantComposite %mat4v4float %8 %13 %18 %23 +%_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float + %m = OpVariable %_ptr_Private_mat4v4float Private %24 %void = OpTypeVoid - %25 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %25 - %28 = OpLabel + %27 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %27 + %30 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.wgsl index 7bbde6baa9..9934a44967 100644 --- a/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/inferred/vectors/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); +var m = mat4x4(vec4(0.0f, 1.0f, 2.0f, 3.0f), vec4(4.0f, 5.0f, 6.0f, 7.0f), vec4(8.0f, 9.0f, 10.0f, 11.0f), vec4(12.0f, 13.0f, 14.0f, 15.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl index 1f8286bd01..9a80a22bed 100644 --- a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl @@ -1 +1 @@ -let m = mat4x4(); +var m = mat4x4(); diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.glsl index 1acbb86af8..b5f43a3a5c 100644 --- a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const mat4 m = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); +mat4 m = mat4(vec4(0.0f), vec4(0.0f), vec4(0.0f), vec4(0.0f)); diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.hlsl index 1efc2bbc97..a1f75e203f 100644 --- a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4x4 m = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); +static float4x4 m = float4x4((0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx, (0.0f).xxxx); diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.msl index 9389ca4b76..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4x4 m = float4x4(float4(0.0f), float4(0.0f), float4(0.0f), float4(0.0f)); - diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.spvasm index 7f7ca39378..fc3f2dd6cf 100644 --- a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 9 +; Bound: 11 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -12,10 +12,12 @@ %float = OpTypeFloat 32 %v4float = OpTypeVector %float 4 %mat4v4float = OpTypeMatrix %v4float 4 - %m = OpConstantNull %mat4v4float + %4 = OpConstantNull %mat4v4float +%_ptr_Private_mat4v4float = OpTypePointer Private %mat4v4float + %m = OpVariable %_ptr_Private_mat4v4float Private %4 %void = OpTypeVoid - %5 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %5 - %8 = OpLabel + %7 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %7 + %10 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.wgsl index 1f8286bd01..9a80a22bed 100644 --- a/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/mat4x4/zero/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let m = mat4x4(); +var m = mat4x4(); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl index c215909294..3b03f91f63 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl @@ -1 +1 @@ -let v = vec2(false, true); +var v = vec2(false, true); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.glsl index bfd0cb766d..4d0120f6c5 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const bvec2 v = bvec2(false, true); +bvec2 v = bvec2(false, true); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.hlsl index 0ba8ae6725..7c65ba8487 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const bool2 v = bool2(false, true); +static bool2 v = bool2(false, true); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.msl index 15bd21b7a2..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant bool2 v = bool2(false, true); - diff --git a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.spvasm index a686023b87..f3a92363a9 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2bool = OpTypeVector %bool 2 %3 = OpConstantNull %bool %true = OpConstantTrue %bool - %v = OpConstantComposite %v2bool %3 %true + %5 = OpConstantComposite %v2bool %3 %true +%_ptr_Private_v2bool = OpTypePointer Private %v2bool + %v = OpVariable %_ptr_Private_v2bool Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.wgsl index c215909294..3b03f91f63 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/bool.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(false, true); +var v = vec2(false, true); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl index 074655c917..c64a997db5 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl @@ -1 +1 @@ -let v = vec2(0.0f, 1.0f); +var v = vec2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.glsl index af91949ceb..e6f149f1be 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const vec2 v = vec2(0.0f, 1.0f); +vec2 v = vec2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.hlsl index 8802bbb621..53ed02812f 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2 v = float2(0.0f, 1.0f); +static float2 v = float2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.msl index f343a2593e..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2 v = float2(0.0f, 1.0f); - diff --git a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.spvasm index 8e31d05873..26be8307aa 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2float = OpTypeVector %float 2 %3 = OpConstantNull %float %float_1 = OpConstant %float 1 - %v = OpConstantComposite %v2float %3 %float_1 + %5 = OpConstantComposite %v2float %3 %float_1 +%_ptr_Private_v2float = OpTypePointer Private %v2float + %v = OpVariable %_ptr_Private_v2float Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.wgsl index 074655c917..c64a997db5 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(0.0f, 1.0f); +var v = vec2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl index ee90f91d6d..684570e0a3 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl @@ -1 +1 @@ -let v = vec2(0, 1); +var v = vec2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.glsl index ebef7ff07d..cc388f0c86 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const ivec2 v = ivec2(0, 1); +ivec2 v = ivec2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.hlsl index afa632e39a..203fe9a8f2 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const int2 v = int2(0, 1); +static int2 v = int2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.msl index af85d231cc..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant int2 v = int2(0, 1); - diff --git a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.spvasm index 1c6792f770..3fdf50d78d 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2int = OpTypeVector %int 2 %3 = OpConstantNull %int %int_1 = OpConstant %int 1 - %v = OpConstantComposite %v2int %3 %int_1 + %5 = OpConstantComposite %v2int %3 %int_1 +%_ptr_Private_v2int = OpTypePointer Private %v2int + %v = OpVariable %_ptr_Private_v2int Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.wgsl index ee90f91d6d..684570e0a3 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/i32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(0, 1); +var v = vec2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl index 1b3006c3a7..1d75b1f36f 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl @@ -1 +1 @@ -let v = vec2(0u, 1u); +var v = vec2(0u, 1u); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.glsl index 96300974e8..0319a076ab 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const uvec2 v = uvec2(0u, 1u); +uvec2 v = uvec2(0u, 1u); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.hlsl index c2987138f9..3138b6c630 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const uint2 v = uint2(0u, 1u); +static uint2 v = uint2(0u, 1u); diff --git a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.msl index 764c49a343..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant uint2 v = uint2(0u, 1u); - diff --git a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.spvasm index 7f95ffdd15..37aa2cb1d0 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2uint = OpTypeVector %uint 2 %3 = OpConstantNull %uint %uint_1 = OpConstant %uint 1 - %v = OpConstantComposite %v2uint %3 %uint_1 + %5 = OpConstantComposite %v2uint %3 %uint_1 +%_ptr_Private_v2uint = OpTypePointer Private %v2uint + %v = OpVariable %_ptr_Private_v2uint Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.wgsl index 1b3006c3a7..1d75b1f36f 100644 --- a/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/explicit/u32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(0u, 1u); +var v = vec2(0u, 1u); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl index e0e5dc904f..eba6e76b86 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl @@ -1 +1 @@ -let v = vec2(0.0, 1.0); +var v = vec2(0.0, 1.0); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.glsl index af91949ceb..e6f149f1be 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const vec2 v = vec2(0.0f, 1.0f); +vec2 v = vec2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.hlsl index 8802bbb621..53ed02812f 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2 v = float2(0.0f, 1.0f); +static float2 v = float2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.msl index f343a2593e..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2 v = float2(0.0f, 1.0f); - diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.spvasm index 8e31d05873..26be8307aa 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2float = OpTypeVector %float 2 %3 = OpConstantNull %float %float_1 = OpConstant %float 1 - %v = OpConstantComposite %v2float %3 %float_1 + %5 = OpConstantComposite %v2float %3 %float_1 +%_ptr_Private_v2float = OpTypePointer Private %v2float + %v = OpVariable %_ptr_Private_v2float Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.wgsl index e0e5dc904f..eba6e76b86 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(0.0, 1.0); +var v = vec2(0.0, 1.0); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl index de5642e08a..6aabaca620 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl @@ -1 +1 @@ -let v = vec2(0, 1); +var v = vec2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.glsl index ebef7ff07d..cc388f0c86 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const ivec2 v = ivec2(0, 1); +ivec2 v = ivec2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.hlsl index afa632e39a..203fe9a8f2 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const int2 v = int2(0, 1); +static int2 v = int2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.msl index af85d231cc..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant int2 v = int2(0, 1); - diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.spvasm index 1c6792f770..3fdf50d78d 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2int = OpTypeVector %int 2 %3 = OpConstantNull %int %int_1 = OpConstant %int 1 - %v = OpConstantComposite %v2int %3 %int_1 + %5 = OpConstantComposite %v2int %3 %int_1 +%_ptr_Private_v2int = OpTypePointer Private %v2int + %v = OpVariable %_ptr_Private_v2int Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.wgsl index de5642e08a..6aabaca620 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/abstract-int.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(0, 1); +var v = vec2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl index f5aced36db..c5bc0b15f0 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl @@ -1 +1 @@ -let v = vec2(false, true); +var v = vec2(false, true); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.glsl index bfd0cb766d..4d0120f6c5 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const bvec2 v = bvec2(false, true); +bvec2 v = bvec2(false, true); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.hlsl index 0ba8ae6725..7c65ba8487 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const bool2 v = bool2(false, true); +static bool2 v = bool2(false, true); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.msl index 15bd21b7a2..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant bool2 v = bool2(false, true); - diff --git a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.spvasm index a686023b87..f3a92363a9 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2bool = OpTypeVector %bool 2 %3 = OpConstantNull %bool %true = OpConstantTrue %bool - %v = OpConstantComposite %v2bool %3 %true + %5 = OpConstantComposite %v2bool %3 %true +%_ptr_Private_v2bool = OpTypePointer Private %v2bool + %v = OpVariable %_ptr_Private_v2bool Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.wgsl index f5aced36db..c5bc0b15f0 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/bool.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(false, true); +var v = vec2(false, true); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl index 3ca3308d24..03994f3402 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl @@ -1 +1 @@ -let v = vec2(0.0f, 1.0f); +var v = vec2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.glsl index af91949ceb..e6f149f1be 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const vec2 v = vec2(0.0f, 1.0f); +vec2 v = vec2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.hlsl index 8802bbb621..53ed02812f 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float2 v = float2(0.0f, 1.0f); +static float2 v = float2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.msl index f343a2593e..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float2 v = float2(0.0f, 1.0f); - diff --git a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.spvasm index 8e31d05873..26be8307aa 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2float = OpTypeVector %float 2 %3 = OpConstantNull %float %float_1 = OpConstant %float 1 - %v = OpConstantComposite %v2float %3 %float_1 + %5 = OpConstantComposite %v2float %3 %float_1 +%_ptr_Private_v2float = OpTypePointer Private %v2float + %v = OpVariable %_ptr_Private_v2float Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.wgsl index 3ca3308d24..03994f3402 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(0.0f, 1.0f); +var v = vec2(0.0f, 1.0f); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl index 7207f3436b..4ea409db46 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl @@ -1 +1 @@ -let v = vec2(0i, 1i); +var v = vec2(0i, 1i); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.glsl index ebef7ff07d..cc388f0c86 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const ivec2 v = ivec2(0, 1); +ivec2 v = ivec2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.hlsl index afa632e39a..203fe9a8f2 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const int2 v = int2(0, 1); +static int2 v = int2(0, 1); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.msl index af85d231cc..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant int2 v = int2(0, 1); - diff --git a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.spvasm index 1c6792f770..3fdf50d78d 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2int = OpTypeVector %int 2 %3 = OpConstantNull %int %int_1 = OpConstant %int 1 - %v = OpConstantComposite %v2int %3 %int_1 + %5 = OpConstantComposite %v2int %3 %int_1 +%_ptr_Private_v2int = OpTypePointer Private %v2int + %v = OpVariable %_ptr_Private_v2int Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.wgsl index 7207f3436b..4ea409db46 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/i32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(0i, 1i); +var v = vec2(0i, 1i); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl index bd3e939b06..dafac2d000 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl @@ -1 +1 @@ -let v = vec2(0u, 1u); +var v = vec2(0u, 1u); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.glsl index 96300974e8..0319a076ab 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const uvec2 v = uvec2(0u, 1u); +uvec2 v = uvec2(0u, 1u); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.hlsl index c2987138f9..3138b6c630 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const uint2 v = uint2(0u, 1u); +static uint2 v = uint2(0u, 1u); diff --git a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.msl index 764c49a343..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant uint2 v = uint2(0u, 1u); - diff --git a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.spvasm index 7f95ffdd15..37aa2cb1d0 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v2uint = OpTypeVector %uint 2 %3 = OpConstantNull %uint %uint_1 = OpConstant %uint 1 - %v = OpConstantComposite %v2uint %3 %uint_1 + %5 = OpConstantComposite %v2uint %3 %uint_1 +%_ptr_Private_v2uint = OpTypePointer Private %v2uint + %v = OpVariable %_ptr_Private_v2uint Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.wgsl index bd3e939b06..dafac2d000 100644 --- a/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec2/inferred/u32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec2(0u, 1u); +var v = vec2(0u, 1u); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl index 0acf3bf9cb..aeee5a282d 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl @@ -1 +1 @@ -let v = vec3(false, true, false); +var v = vec3(false, true, false); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.glsl index e7d7818003..872f1a2d9d 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const bvec3 v = bvec3(false, true, false); +bvec3 v = bvec3(false, true, false); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.hlsl index d5acfa022d..420e0c3155 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const bool3 v = bool3(false, true, false); +static bool3 v = bool3(false, true, false); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.msl index 0cd9b5b483..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant bool3 v = bool3(false, true, false); - diff --git a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.spvasm index 4abfaa676d..587225f83c 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v3bool = OpTypeVector %bool 3 %3 = OpConstantNull %bool %true = OpConstantTrue %bool - %v = OpConstantComposite %v3bool %3 %true %3 + %5 = OpConstantComposite %v3bool %3 %true %3 +%_ptr_Private_v3bool = OpTypePointer Private %v3bool + %v = OpVariable %_ptr_Private_v3bool Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.wgsl index 0acf3bf9cb..aeee5a282d 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/bool.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(false, true, false); +var v = vec3(false, true, false); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl index 0978438943..2815001caf 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl @@ -1 +1 @@ -let v = vec3(0.0f, 1.0f, 2.0f); +var v = vec3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.glsl index 9f73b75785..f63fa393dd 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const vec3 v = vec3(0.0f, 1.0f, 2.0f); +vec3 v = vec3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.hlsl index daa5a1c21d..f2ffb86b97 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3 v = float3(0.0f, 1.0f, 2.0f); +static float3 v = float3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.msl index b0b245a391..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3 v = float3(0.0f, 1.0f, 2.0f); - diff --git a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.spvasm index 5dde9d6dc8..5df28a4d64 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 11 +; Bound: 13 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,10 +14,12 @@ %3 = OpConstantNull %float %float_1 = OpConstant %float 1 %float_2 = OpConstant %float 2 - %v = OpConstantComposite %v3float %3 %float_1 %float_2 + %6 = OpConstantComposite %v3float %3 %float_1 %float_2 +%_ptr_Private_v3float = OpTypePointer Private %v3float + %v = OpVariable %_ptr_Private_v3float Private %6 %void = OpTypeVoid - %7 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %7 - %10 = OpLabel + %9 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %9 + %12 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.wgsl index 0978438943..2815001caf 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(0.0f, 1.0f, 2.0f); +var v = vec3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl index 605fa301ee..434bb562a3 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl @@ -1 +1 @@ -let v = vec3(0i, 1i, 2i); +var v = vec3(0i, 1i, 2i); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.glsl index 0392e707da..26b55814d3 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const ivec3 v = ivec3(0, 1, 2); +ivec3 v = ivec3(0, 1, 2); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.hlsl index 9bc1dc4652..fcb08024ed 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const int3 v = int3(0, 1, 2); +static int3 v = int3(0, 1, 2); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.msl index 63fbce8f89..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant int3 v = int3(0, 1, 2); - diff --git a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.spvasm index 20bcaa80ae..68ed2d6a15 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 11 +; Bound: 13 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,10 +14,12 @@ %3 = OpConstantNull %int %int_1 = OpConstant %int 1 %int_2 = OpConstant %int 2 - %v = OpConstantComposite %v3int %3 %int_1 %int_2 + %6 = OpConstantComposite %v3int %3 %int_1 %int_2 +%_ptr_Private_v3int = OpTypePointer Private %v3int + %v = OpVariable %_ptr_Private_v3int Private %6 %void = OpTypeVoid - %7 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %7 - %10 = OpLabel + %9 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %9 + %12 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.wgsl index 605fa301ee..434bb562a3 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/i32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(0i, 1i, 2i); +var v = vec3(0i, 1i, 2i); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl index 111a1d3ad0..ab0e79742a 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl @@ -1 +1 @@ -let v = vec3(0u, 1u, 2u); +var v = vec3(0u, 1u, 2u); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.glsl index 1aabf2da89..7187970bdf 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const uvec3 v = uvec3(0u, 1u, 2u); +uvec3 v = uvec3(0u, 1u, 2u); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.hlsl index 18899ea0d3..3190b32f53 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const uint3 v = uint3(0u, 1u, 2u); +static uint3 v = uint3(0u, 1u, 2u); diff --git a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.msl index 6090ecfdc8..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant uint3 v = uint3(0u, 1u, 2u); - diff --git a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.spvasm index 74c3ed3b3e..1e4e51f397 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 11 +; Bound: 13 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,10 +14,12 @@ %3 = OpConstantNull %uint %uint_1 = OpConstant %uint 1 %uint_2 = OpConstant %uint 2 - %v = OpConstantComposite %v3uint %3 %uint_1 %uint_2 + %6 = OpConstantComposite %v3uint %3 %uint_1 %uint_2 +%_ptr_Private_v3uint = OpTypePointer Private %v3uint + %v = OpVariable %_ptr_Private_v3uint Private %6 %void = OpTypeVoid - %7 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %7 - %10 = OpLabel + %9 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %9 + %12 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.wgsl index 111a1d3ad0..ab0e79742a 100644 --- a/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/explicit/u32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(0u, 1u, 2u); +var v = vec3(0u, 1u, 2u); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl index 376f901c51..2b4faacadf 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl @@ -1 +1 @@ -let v = vec3(0.0, 1.0, 2.0); +var v = vec3(0.0, 1.0, 2.0); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.glsl index 9f73b75785..f63fa393dd 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const vec3 v = vec3(0.0f, 1.0f, 2.0f); +vec3 v = vec3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.hlsl index daa5a1c21d..f2ffb86b97 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3 v = float3(0.0f, 1.0f, 2.0f); +static float3 v = float3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.msl index b0b245a391..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3 v = float3(0.0f, 1.0f, 2.0f); - diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.spvasm index 5dde9d6dc8..5df28a4d64 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 11 +; Bound: 13 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,10 +14,12 @@ %3 = OpConstantNull %float %float_1 = OpConstant %float 1 %float_2 = OpConstant %float 2 - %v = OpConstantComposite %v3float %3 %float_1 %float_2 + %6 = OpConstantComposite %v3float %3 %float_1 %float_2 +%_ptr_Private_v3float = OpTypePointer Private %v3float + %v = OpVariable %_ptr_Private_v3float Private %6 %void = OpTypeVoid - %7 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %7 - %10 = OpLabel + %9 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %9 + %12 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.wgsl index 376f901c51..2b4faacadf 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(0.0, 1.0, 2.0); +var v = vec3(0.0, 1.0, 2.0); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl index 7b9ebcb87e..1c301e1061 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl @@ -1 +1 @@ -let v = vec3(0, 1, 2); +var v = vec3(0, 1, 2); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.glsl index 0392e707da..26b55814d3 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const ivec3 v = ivec3(0, 1, 2); +ivec3 v = ivec3(0, 1, 2); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.hlsl index 9bc1dc4652..fcb08024ed 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const int3 v = int3(0, 1, 2); +static int3 v = int3(0, 1, 2); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.msl index 63fbce8f89..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant int3 v = int3(0, 1, 2); - diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.spvasm index 20bcaa80ae..68ed2d6a15 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 11 +; Bound: 13 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,10 +14,12 @@ %3 = OpConstantNull %int %int_1 = OpConstant %int 1 %int_2 = OpConstant %int 2 - %v = OpConstantComposite %v3int %3 %int_1 %int_2 + %6 = OpConstantComposite %v3int %3 %int_1 %int_2 +%_ptr_Private_v3int = OpTypePointer Private %v3int + %v = OpVariable %_ptr_Private_v3int Private %6 %void = OpTypeVoid - %7 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %7 - %10 = OpLabel + %9 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %9 + %12 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.wgsl index 7b9ebcb87e..1c301e1061 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/abstract-int.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(0, 1, 2); +var v = vec3(0, 1, 2); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl index 9f3a1f3852..741e88269e 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl @@ -1 +1 @@ -let v = vec3(false, true, false); +var v = vec3(false, true, false); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.glsl index e7d7818003..872f1a2d9d 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const bvec3 v = bvec3(false, true, false); +bvec3 v = bvec3(false, true, false); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.hlsl index d5acfa022d..420e0c3155 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const bool3 v = bool3(false, true, false); +static bool3 v = bool3(false, true, false); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.msl index 0cd9b5b483..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant bool3 v = bool3(false, true, false); - diff --git a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.spvasm index 4abfaa676d..587225f83c 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v3bool = OpTypeVector %bool 3 %3 = OpConstantNull %bool %true = OpConstantTrue %bool - %v = OpConstantComposite %v3bool %3 %true %3 + %5 = OpConstantComposite %v3bool %3 %true %3 +%_ptr_Private_v3bool = OpTypePointer Private %v3bool + %v = OpVariable %_ptr_Private_v3bool Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.wgsl index 9f3a1f3852..741e88269e 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/bool.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(false, true, false); +var v = vec3(false, true, false); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl index e09c928751..05ccfdd0c6 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl @@ -1 +1 @@ -let v = vec3(0.0f, 1.0f, 2.0f); +var v = vec3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.glsl index 9f73b75785..f63fa393dd 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const vec3 v = vec3(0.0f, 1.0f, 2.0f); +vec3 v = vec3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.hlsl index daa5a1c21d..f2ffb86b97 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float3 v = float3(0.0f, 1.0f, 2.0f); +static float3 v = float3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.msl index b0b245a391..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float3 v = float3(0.0f, 1.0f, 2.0f); - diff --git a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.spvasm index 5dde9d6dc8..5df28a4d64 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 11 +; Bound: 13 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,10 +14,12 @@ %3 = OpConstantNull %float %float_1 = OpConstant %float 1 %float_2 = OpConstant %float 2 - %v = OpConstantComposite %v3float %3 %float_1 %float_2 + %6 = OpConstantComposite %v3float %3 %float_1 %float_2 +%_ptr_Private_v3float = OpTypePointer Private %v3float + %v = OpVariable %_ptr_Private_v3float Private %6 %void = OpTypeVoid - %7 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %7 - %10 = OpLabel + %9 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %9 + %12 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.wgsl index e09c928751..05ccfdd0c6 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(0.0f, 1.0f, 2.0f); +var v = vec3(0.0f, 1.0f, 2.0f); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl index 73cd9730fb..1fbcabec46 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl @@ -1 +1 @@ -let v = vec3(0i, 1i, 2i); +var v = vec3(0i, 1i, 2i); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.glsl index 0392e707da..26b55814d3 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const ivec3 v = ivec3(0, 1, 2); +ivec3 v = ivec3(0, 1, 2); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.hlsl index 9bc1dc4652..fcb08024ed 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const int3 v = int3(0, 1, 2); +static int3 v = int3(0, 1, 2); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.msl index 63fbce8f89..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant int3 v = int3(0, 1, 2); - diff --git a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.spvasm index 20bcaa80ae..68ed2d6a15 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 11 +; Bound: 13 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,10 +14,12 @@ %3 = OpConstantNull %int %int_1 = OpConstant %int 1 %int_2 = OpConstant %int 2 - %v = OpConstantComposite %v3int %3 %int_1 %int_2 + %6 = OpConstantComposite %v3int %3 %int_1 %int_2 +%_ptr_Private_v3int = OpTypePointer Private %v3int + %v = OpVariable %_ptr_Private_v3int Private %6 %void = OpTypeVoid - %7 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %7 - %10 = OpLabel + %9 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %9 + %12 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.wgsl index 73cd9730fb..1fbcabec46 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/i32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(0i, 1i, 2i); +var v = vec3(0i, 1i, 2i); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl index 0040d27e6c..8b6ff5af38 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl @@ -1 +1 @@ -let v = vec3(0u, 1u, 2u); +var v = vec3(0u, 1u, 2u); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.glsl index 1aabf2da89..7187970bdf 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const uvec3 v = uvec3(0u, 1u, 2u); +uvec3 v = uvec3(0u, 1u, 2u); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.hlsl index 18899ea0d3..3190b32f53 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const uint3 v = uint3(0u, 1u, 2u); +static uint3 v = uint3(0u, 1u, 2u); diff --git a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.msl index 6090ecfdc8..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant uint3 v = uint3(0u, 1u, 2u); - diff --git a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.spvasm index 74c3ed3b3e..1e4e51f397 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 11 +; Bound: 13 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -14,10 +14,12 @@ %3 = OpConstantNull %uint %uint_1 = OpConstant %uint 1 %uint_2 = OpConstant %uint 2 - %v = OpConstantComposite %v3uint %3 %uint_1 %uint_2 + %6 = OpConstantComposite %v3uint %3 %uint_1 %uint_2 +%_ptr_Private_v3uint = OpTypePointer Private %v3uint + %v = OpVariable %_ptr_Private_v3uint Private %6 %void = OpTypeVoid - %7 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %7 - %10 = OpLabel + %9 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %9 + %12 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.wgsl index 0040d27e6c..8b6ff5af38 100644 --- a/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec3/inferred/u32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec3(0u, 1u, 2u); +var v = vec3(0u, 1u, 2u); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl index baeff0f35f..118eaf5ec2 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl @@ -1 +1 @@ -let v = vec4(false, true, false, true); +var v = vec4(false, true, false, true); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.glsl index 11236dbca8..6b3de93f5e 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const bvec4 v = bvec4(false, true, false, true); +bvec4 v = bvec4(false, true, false, true); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.hlsl index af7e30f4e6..0c15046878 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const bool4 v = bool4(false, true, false, true); +static bool4 v = bool4(false, true, false, true); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.msl index 840b113e49..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant bool4 v = bool4(false, true, false, true); - diff --git a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.spvasm index e5ad22903a..32c8adc58a 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v4bool = OpTypeVector %bool 4 %3 = OpConstantNull %bool %true = OpConstantTrue %bool - %v = OpConstantComposite %v4bool %3 %true %3 %true + %5 = OpConstantComposite %v4bool %3 %true %3 %true +%_ptr_Private_v4bool = OpTypePointer Private %v4bool + %v = OpVariable %_ptr_Private_v4bool Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.wgsl index baeff0f35f..118eaf5ec2 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/bool.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(false, true, false, true); +var v = vec4(false, true, false, true); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl index 5a04e5ba0d..9ade06d992 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl @@ -1 +1 @@ -let v = vec4(0.f, 1.f, 2.f, 3.f); +var v = vec4(0.f, 1.f, 2.f, 3.f); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.glsl index 254bda9e7a..b0532140e8 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const vec4 v = vec4(0.0f, 1.0f, 2.0f, 3.0f); +vec4 v = vec4(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.hlsl index bd679f3022..f518edb05e 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4 v = float4(0.0f, 1.0f, 2.0f, 3.0f); +static float4 v = float4(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.msl index 568e746ed8..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4 v = float4(0.0f, 1.0f, 2.0f, 3.0f); - diff --git a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.spvasm index a45788b046..d98cea524e 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 12 +; Bound: 14 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,10 +15,12 @@ %float_1 = OpConstant %float 1 %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 - %v = OpConstantComposite %v4float %3 %float_1 %float_2 %float_3 + %7 = OpConstantComposite %v4float %3 %float_1 %float_2 %float_3 +%_ptr_Private_v4float = OpTypePointer Private %v4float + %v = OpVariable %_ptr_Private_v4float Private %7 %void = OpTypeVoid - %8 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %8 - %11 = OpLabel + %10 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %10 + %13 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.wgsl index 89c6254ef3..27e5285207 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(0.0f, 1.0f, 2.0f, 3.0f); +var v = vec4(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl index 38a4ff8f91..b274f75d6a 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl @@ -1 +1 @@ -let v = vec4(0i, 1i, 2i, 3i); +var v = vec4(0i, 1i, 2i, 3i); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.glsl index 77c907bcd1..b7c56a238e 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const ivec4 v = ivec4(0, 1, 2, 3); +ivec4 v = ivec4(0, 1, 2, 3); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.hlsl index 58b86cecad..baeb4274da 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const int4 v = int4(0, 1, 2, 3); +static int4 v = int4(0, 1, 2, 3); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.msl index f00d2ebbd7..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant int4 v = int4(0, 1, 2, 3); - diff --git a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.spvasm index 8518f9987e..98f034707a 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 12 +; Bound: 14 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,10 +15,12 @@ %int_1 = OpConstant %int 1 %int_2 = OpConstant %int 2 %int_3 = OpConstant %int 3 - %v = OpConstantComposite %v4int %3 %int_1 %int_2 %int_3 + %7 = OpConstantComposite %v4int %3 %int_1 %int_2 %int_3 +%_ptr_Private_v4int = OpTypePointer Private %v4int + %v = OpVariable %_ptr_Private_v4int Private %7 %void = OpTypeVoid - %8 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %8 - %11 = OpLabel + %10 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %10 + %13 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.wgsl index 38a4ff8f91..b274f75d6a 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/i32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(0i, 1i, 2i, 3i); +var v = vec4(0i, 1i, 2i, 3i); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl index ef7c7662f5..0c12dbf6a7 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl @@ -1 +1 @@ -let v = vec4(0u, 1u, 2u, 3u); +var v = vec4(0u, 1u, 2u, 3u); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.glsl index a6bfcaefda..8414d82aa8 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const uvec4 v = uvec4(0u, 1u, 2u, 3u); +uvec4 v = uvec4(0u, 1u, 2u, 3u); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.hlsl index 014390a471..2ab778a964 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const uint4 v = uint4(0u, 1u, 2u, 3u); +static uint4 v = uint4(0u, 1u, 2u, 3u); diff --git a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.msl index 83695b894d..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant uint4 v = uint4(0u, 1u, 2u, 3u); - diff --git a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.spvasm index 2424ee0051..b2ae7f4d89 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 12 +; Bound: 14 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,10 +15,12 @@ %uint_1 = OpConstant %uint 1 %uint_2 = OpConstant %uint 2 %uint_3 = OpConstant %uint 3 - %v = OpConstantComposite %v4uint %3 %uint_1 %uint_2 %uint_3 + %7 = OpConstantComposite %v4uint %3 %uint_1 %uint_2 %uint_3 +%_ptr_Private_v4uint = OpTypePointer Private %v4uint + %v = OpVariable %_ptr_Private_v4uint Private %7 %void = OpTypeVoid - %8 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %8 - %11 = OpLabel + %10 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %10 + %13 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.wgsl index ef7c7662f5..0c12dbf6a7 100644 --- a/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/explicit/u32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(0u, 1u, 2u, 3u); +var v = vec4(0u, 1u, 2u, 3u); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl index bb1280e19d..3d81ce6ada 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl @@ -1 +1 @@ -let v = vec4(0.0, 1.0, 2.0, 3.0); +var v = vec4(0.0, 1.0, 2.0, 3.0); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.glsl index 254bda9e7a..b0532140e8 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const vec4 v = vec4(0.0f, 1.0f, 2.0f, 3.0f); +vec4 v = vec4(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.hlsl index bd679f3022..f518edb05e 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4 v = float4(0.0f, 1.0f, 2.0f, 3.0f); +static float4 v = float4(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.msl index 568e746ed8..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4 v = float4(0.0f, 1.0f, 2.0f, 3.0f); - diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.spvasm index a45788b046..d98cea524e 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 12 +; Bound: 14 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,10 +15,12 @@ %float_1 = OpConstant %float 1 %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 - %v = OpConstantComposite %v4float %3 %float_1 %float_2 %float_3 + %7 = OpConstantComposite %v4float %3 %float_1 %float_2 %float_3 +%_ptr_Private_v4float = OpTypePointer Private %v4float + %v = OpVariable %_ptr_Private_v4float Private %7 %void = OpTypeVoid - %8 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %8 - %11 = OpLabel + %10 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %10 + %13 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.wgsl index bb1280e19d..3d81ce6ada 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-float.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(0.0, 1.0, 2.0, 3.0); +var v = vec4(0.0, 1.0, 2.0, 3.0); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl index ab60e6e781..f59b42c3ec 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl @@ -1 +1 @@ -let v = vec4(0, 1, 2, 3); +var v = vec4(0, 1, 2, 3); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.glsl index 77c907bcd1..b7c56a238e 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const ivec4 v = ivec4(0, 1, 2, 3); +ivec4 v = ivec4(0, 1, 2, 3); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.hlsl index 58b86cecad..baeb4274da 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const int4 v = int4(0, 1, 2, 3); +static int4 v = int4(0, 1, 2, 3); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.msl index f00d2ebbd7..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant int4 v = int4(0, 1, 2, 3); - diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.spvasm index 8518f9987e..98f034707a 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 12 +; Bound: 14 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,10 +15,12 @@ %int_1 = OpConstant %int 1 %int_2 = OpConstant %int 2 %int_3 = OpConstant %int 3 - %v = OpConstantComposite %v4int %3 %int_1 %int_2 %int_3 + %7 = OpConstantComposite %v4int %3 %int_1 %int_2 %int_3 +%_ptr_Private_v4int = OpTypePointer Private %v4int + %v = OpVariable %_ptr_Private_v4int Private %7 %void = OpTypeVoid - %8 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %8 - %11 = OpLabel + %10 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %10 + %13 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.wgsl index ab60e6e781..f59b42c3ec 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/abstract-int.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(0, 1, 2, 3); +var v = vec4(0, 1, 2, 3); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl index baeff0f35f..118eaf5ec2 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl @@ -1 +1 @@ -let v = vec4(false, true, false, true); +var v = vec4(false, true, false, true); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.glsl index 11236dbca8..6b3de93f5e 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const bvec4 v = bvec4(false, true, false, true); +bvec4 v = bvec4(false, true, false, true); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.hlsl index af7e30f4e6..0c15046878 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const bool4 v = bool4(false, true, false, true); +static bool4 v = bool4(false, true, false, true); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.msl index 840b113e49..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant bool4 v = bool4(false, true, false, true); - diff --git a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.spvasm index e5ad22903a..32c8adc58a 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 10 +; Bound: 12 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -13,10 +13,12 @@ %v4bool = OpTypeVector %bool 4 %3 = OpConstantNull %bool %true = OpConstantTrue %bool - %v = OpConstantComposite %v4bool %3 %true %3 %true + %5 = OpConstantComposite %v4bool %3 %true %3 %true +%_ptr_Private_v4bool = OpTypePointer Private %v4bool + %v = OpVariable %_ptr_Private_v4bool Private %5 %void = OpTypeVoid - %6 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %6 - %9 = OpLabel + %8 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %8 + %11 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.wgsl index baeff0f35f..118eaf5ec2 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/bool.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(false, true, false, true); +var v = vec4(false, true, false, true); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl index 89c6254ef3..27e5285207 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl @@ -1 +1 @@ -let v = vec4(0.0f, 1.0f, 2.0f, 3.0f); +var v = vec4(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.glsl index 254bda9e7a..b0532140e8 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const vec4 v = vec4(0.0f, 1.0f, 2.0f, 3.0f); +vec4 v = vec4(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.hlsl index bd679f3022..f518edb05e 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const float4 v = float4(0.0f, 1.0f, 2.0f, 3.0f); +static float4 v = float4(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.msl index 568e746ed8..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant float4 v = float4(0.0f, 1.0f, 2.0f, 3.0f); - diff --git a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.spvasm index a45788b046..d98cea524e 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 12 +; Bound: 14 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,10 +15,12 @@ %float_1 = OpConstant %float 1 %float_2 = OpConstant %float 2 %float_3 = OpConstant %float 3 - %v = OpConstantComposite %v4float %3 %float_1 %float_2 %float_3 + %7 = OpConstantComposite %v4float %3 %float_1 %float_2 %float_3 +%_ptr_Private_v4float = OpTypePointer Private %v4float + %v = OpVariable %_ptr_Private_v4float Private %7 %void = OpTypeVoid - %8 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %8 - %11 = OpLabel + %10 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %10 + %13 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.wgsl index 89c6254ef3..27e5285207 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/f32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(0.0f, 1.0f, 2.0f, 3.0f); +var v = vec4(0.0f, 1.0f, 2.0f, 3.0f); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl index 38a4ff8f91..b274f75d6a 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl @@ -1 +1 @@ -let v = vec4(0i, 1i, 2i, 3i); +var v = vec4(0i, 1i, 2i, 3i); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.glsl index 77c907bcd1..b7c56a238e 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const ivec4 v = ivec4(0, 1, 2, 3); +ivec4 v = ivec4(0, 1, 2, 3); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.hlsl index 58b86cecad..baeb4274da 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const int4 v = int4(0, 1, 2, 3); +static int4 v = int4(0, 1, 2, 3); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.msl index f00d2ebbd7..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant int4 v = int4(0, 1, 2, 3); - diff --git a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.spvasm index 8518f9987e..98f034707a 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 12 +; Bound: 14 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,10 +15,12 @@ %int_1 = OpConstant %int 1 %int_2 = OpConstant %int 2 %int_3 = OpConstant %int 3 - %v = OpConstantComposite %v4int %3 %int_1 %int_2 %int_3 + %7 = OpConstantComposite %v4int %3 %int_1 %int_2 %int_3 +%_ptr_Private_v4int = OpTypePointer Private %v4int + %v = OpVariable %_ptr_Private_v4int Private %7 %void = OpTypeVoid - %8 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %8 - %11 = OpLabel + %10 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %10 + %13 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.wgsl index 38a4ff8f91..b274f75d6a 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/i32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(0i, 1i, 2i, 3i); +var v = vec4(0i, 1i, 2i, 3i); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl index ef7c7662f5..0c12dbf6a7 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl @@ -1 +1 @@ -let v = vec4(0u, 1u, 2u, 3u); +var v = vec4(0u, 1u, 2u, 3u); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.glsl b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.glsl index a6bfcaefda..8414d82aa8 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.glsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.glsl @@ -4,4 +4,4 @@ layout(local_size_x = 1, local_size_y = 1, local_size_z = 1) in; void unused_entry_point() { return; } -const uvec4 v = uvec4(0u, 1u, 2u, 3u); +uvec4 v = uvec4(0u, 1u, 2u, 3u); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.hlsl b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.hlsl index 014390a471..2ab778a964 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.hlsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.hlsl @@ -3,4 +3,4 @@ void unused_entry_point() { return; } -static const uint4 v = uint4(0u, 1u, 2u, 3u); +static uint4 v = uint4(0u, 1u, 2u, 3u); diff --git a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.msl b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.msl index 83695b894d..466ceaa5d6 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.msl +++ b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.msl @@ -1,5 +1,3 @@ #include using namespace metal; -constant uint4 v = uint4(0u, 1u, 2u, 3u); - diff --git a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.spvasm b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.spvasm index 2424ee0051..b2ae7f4d89 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.spvasm +++ b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.spvasm @@ -1,7 +1,7 @@ ; SPIR-V ; Version: 1.3 ; Generator: Google Tint Compiler; 0 -; Bound: 12 +; Bound: 14 ; Schema: 0 OpCapability Shader OpMemoryModel Logical GLSL450 @@ -15,10 +15,12 @@ %uint_1 = OpConstant %uint 1 %uint_2 = OpConstant %uint 2 %uint_3 = OpConstant %uint 3 - %v = OpConstantComposite %v4uint %3 %uint_1 %uint_2 %uint_3 + %7 = OpConstantComposite %v4uint %3 %uint_1 %uint_2 %uint_3 +%_ptr_Private_v4uint = OpTypePointer Private %v4uint + %v = OpVariable %_ptr_Private_v4uint Private %7 %void = OpTypeVoid - %8 = OpTypeFunction %void -%unused_entry_point = OpFunction %void None %8 - %11 = OpLabel + %10 = OpTypeFunction %void +%unused_entry_point = OpFunction %void None %10 + %13 = OpLabel OpReturn OpFunctionEnd diff --git a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.wgsl b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.wgsl index ef7c7662f5..0c12dbf6a7 100644 --- a/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.wgsl +++ b/test/tint/expressions/type_ctor/vec4/inferred/u32.wgsl.expected.wgsl @@ -1 +1 @@ -let v = vec4(0u, 1u, 2u, 3u); +var v = vec4(0u, 1u, 2u, 3u);