dawn-cmake/test/array
James Price 4cc4315d6c Allow array size to be a module-scope constant
Change ast::Array to use an ast::Expression for its `size` field. The
WGSL frontend now parses the array size as an `primary_expression`,
and the Resolver is responsible for validating the expression is a
signed or unsigned integer, and either a literal or a non-overridable
module-scope constant.

The Resolver evaluates the constant value of the size expression, and
so the resolved sem::Array type still has a constant size as before.

Fixed: tint:1068
Fixed: tint:1117

Change-Id: Icfa141482ea1e47ea8c21a25e9eb48221f176e9a
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/63061
Auto-Submit: James Price <jrprice@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-09-02 13:49:59 +00:00
..
assign_to_function_var.wgsl wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
assign_to_function_var.wgsl.expected.hlsl transform: Don't unroll arrays in DecomposeMemoryAccess 2021-07-16 19:47:44 +00:00
assign_to_function_var.wgsl.expected.msl writer/msl: Use UniqueIdentifier() for padding field names 2021-06-30 16:01:40 +00:00
assign_to_function_var.wgsl.expected.spvasm Add optional access to ptr<> 2021-06-04 22:17:37 +00:00
assign_to_function_var.wgsl.expected.wgsl wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
assign_to_private_var.wgsl wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
assign_to_private_var.wgsl.expected.hlsl transform: Don't unroll arrays in DecomposeMemoryAccess 2021-07-16 19:47:44 +00:00
assign_to_private_var.wgsl.expected.msl writer/msl: Use UniqueIdentifier() for padding field names 2021-06-30 16:01:40 +00:00
assign_to_private_var.wgsl.expected.spvasm Add optional access to ptr<> 2021-06-04 22:17:37 +00:00
assign_to_private_var.wgsl.expected.wgsl wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
assign_to_storage_var.wgsl wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
assign_to_storage_var.wgsl.expected.hlsl transform: Don't unroll arrays in DecomposeMemoryAccess 2021-07-16 19:47:44 +00:00
assign_to_storage_var.wgsl.expected.msl writer/msl: Use UniqueIdentifier() for padding field names 2021-06-30 16:01:40 +00:00
assign_to_storage_var.wgsl.expected.spvasm Add optional access to ptr<> 2021-06-04 22:17:37 +00:00
assign_to_storage_var.wgsl.expected.wgsl wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
assign_to_subexpr.wgsl writer/msl: Wrap each array type in a struct 2021-06-02 17:23:03 +00:00
assign_to_subexpr.wgsl.expected.hlsl writer/hlsl: Don't wrap arrays in structures 2021-07-05 15:20:57 +00:00
assign_to_subexpr.wgsl.expected.msl transform/msl: Run InlinePointerLets and Simplify 2021-06-18 09:47:23 +00:00
assign_to_subexpr.wgsl.expected.spvasm transform/spirv: Use InlinePointerLets & Simplify 2021-06-10 17:34:44 +00:00
assign_to_subexpr.wgsl.expected.wgsl writer/msl: Wrap each array type in a struct 2021-06-02 17:23:03 +00:00
assign_to_workgroup_var.wgsl wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
assign_to_workgroup_var.wgsl.expected.hlsl transform: Don't unroll arrays in DecomposeMemoryAccess 2021-07-16 19:47:44 +00:00
assign_to_workgroup_var.wgsl.expected.msl writer/msl: Use UniqueIdentifier() for padding field names 2021-06-30 16:01:40 +00:00
assign_to_workgroup_var.wgsl.expected.spvasm Add optional access to ptr<> 2021-06-04 22:17:37 +00:00
assign_to_workgroup_var.wgsl.expected.wgsl wgsl: Deprecate [[access]] decorations 2021-06-04 20:41:47 +00:00
function_parameter.wgsl validation: compute shader must include 'workgroup_size' in its attributes 2021-06-29 18:39:44 +00:00
function_parameter.wgsl.expected.hlsl writer/hlsl: Don't wrap arrays in structures 2021-07-05 15:20:57 +00:00
function_parameter.wgsl.expected.msl Add transform/WrapArraysInStructs 2021-06-16 09:19:36 +00:00
function_parameter.wgsl.expected.spvasm writer/msl: Wrap each array type in a struct 2021-06-02 17:23:03 +00:00
function_parameter.wgsl.expected.wgsl validation: compute shader must include 'workgroup_size' in its attributes 2021-06-29 18:39:44 +00:00
function_return_type.wgsl validation: compute shader must include 'workgroup_size' in its attributes 2021-06-29 18:39:44 +00:00
function_return_type.wgsl.expected.hlsl writer/hlsl: Don't wrap arrays in structures 2021-07-05 15:20:57 +00:00
function_return_type.wgsl.expected.msl Add transform/WrapArraysInStructs 2021-06-16 09:19:36 +00:00
function_return_type.wgsl.expected.spvasm writer/msl: Wrap each array type in a struct 2021-06-02 17:23:03 +00:00
function_return_type.wgsl.expected.wgsl validation: compute shader must include 'workgroup_size' in its attributes 2021-06-29 18:39:44 +00:00
size.wgsl Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
size.wgsl.expected.hlsl Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
size.wgsl.expected.msl Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
size.wgsl.expected.spvasm Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
size.wgsl.expected.wgsl Allow array size to be a module-scope constant 2021-09-02 13:49:59 +00:00
type_constructor.wgsl validation: compute shader must include 'workgroup_size' in its attributes 2021-06-29 18:39:44 +00:00
type_constructor.wgsl.expected.hlsl writer/hlsl: Don't wrap arrays in structures 2021-07-05 15:20:57 +00:00
type_constructor.wgsl.expected.msl Restore "MSL writer: make signed int overflow defined behaviour" 2021-07-30 18:59:06 +00:00
type_constructor.wgsl.expected.spvasm writer/msl: Hoist array and struct initializers 2021-06-01 12:08:20 +00:00
type_constructor.wgsl.expected.wgsl validation: compute shader must include 'workgroup_size' in its attributes 2021-06-29 18:39:44 +00:00